@bikdotai/bik-component-library 0.0.742-beta.30 → 0.0.742-beta.40
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/components/TypographyStyle.d.ts +8 -0
- package/dist/cjs/components/TypographyStyle.js +14 -13
- package/dist/cjs/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/toaster/Toaster.d.ts +2 -0
- package/dist/cjs/components/toaster/Toaster.js +1 -1
- package/dist/cjs/components/toaster/Toaster.styled.js +1 -1
- package/dist/cjs/constants/Theme.d.ts +4 -0
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/esm/components/TypographyStyle.d.ts +8 -0
- package/dist/esm/components/TypographyStyle.js +13 -12
- package/dist/esm/components/carousel-preview/CarouselPreview.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +2 -0
- package/dist/esm/components/toaster/Toaster.js +1 -1
- package/dist/esm/components/toaster/Toaster.styled.js +1 -1
- package/dist/esm/constants/Theme.d.ts +4 -0
- package/dist/esm/constants/Theme.js +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
interface customStyles {
|
|
2
|
+
fontWeight?: number;
|
|
3
|
+
fontSize?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
}
|
|
1
6
|
export declare const TitleXlarge: import("styled-components").StyledComponent<"div", any, {
|
|
2
7
|
numberOfLines?: number | undefined;
|
|
3
8
|
color?: string | undefined;
|
|
@@ -37,6 +42,7 @@ export declare const BodyPrimary: import("styled-components").StyledComponent<"d
|
|
|
37
42
|
export declare const BodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
38
43
|
numberOfLines?: number | undefined;
|
|
39
44
|
color?: string | undefined;
|
|
45
|
+
customStyles?: customStyles | undefined;
|
|
40
46
|
}, never>;
|
|
41
47
|
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
42
48
|
numberOfLines?: number | undefined;
|
|
@@ -50,6 +56,7 @@ export declare const BodyPrimaryLink: import("styled-components").StyledComponen
|
|
|
50
56
|
export declare const BodySecondaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
51
57
|
numberOfLines?: number | undefined;
|
|
52
58
|
color?: string | undefined;
|
|
59
|
+
customStyles?: customStyles | undefined;
|
|
53
60
|
}, never>;
|
|
54
61
|
export declare const BodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
55
62
|
numberOfLines?: number | undefined;
|
|
@@ -111,3 +118,4 @@ export declare const Tiny: import("styled-components").StyledComponent<"div", an
|
|
|
111
118
|
numberOfLines?: number | undefined;
|
|
112
119
|
color?: string | undefined;
|
|
113
120
|
}, never>;
|
|
121
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>e+"px",l=o.default.div`
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const n=e=>void 0===e||null==e?"":e+"px",l=o.default.div`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
4
4
|
font-weight: ${t.FONTS.titleXLarge.fontWeight};
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
display: -webkit-box;
|
|
80
80
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
81
|
-
`,
|
|
81
|
+
`,h=o.default.div`
|
|
82
82
|
font-family: Inter;
|
|
83
83
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
84
84
|
font-weight: ${t.FONTS.bodyPrimary.fontWeight};
|
|
@@ -88,11 +88,12 @@
|
|
|
88
88
|
overflow: hidden;
|
|
89
89
|
display: -webkit-box;
|
|
90
90
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
|
-
`,
|
|
91
|
+
`,g=o.default.div`
|
|
92
92
|
font-family: Inter;
|
|
93
|
+
width: ${e=>{var t;return n(null===(t=e.customStyles)||void 0===t?void 0:t.width)}};
|
|
93
94
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
94
|
-
font-weight: ${t.FONTS.bodySecondary.fontWeight};
|
|
95
|
-
font-size: ${n(t.FONTS.bodySecondary.fontSize)};
|
|
95
|
+
font-weight: ${e=>{var i;return(null===(i=e.customStyles)||void 0===i?void 0:i.fontWeight)||t.FONTS.bodySecondary.fontWeight}};
|
|
96
|
+
font-size: ${e=>{var i;return n(null===(i=e.customStyles)||void 0===i?void 0:i.fontSize)||n(t.FONTS.bodySecondary.fontSize)}};
|
|
96
97
|
line-height: ${n(t.FONTS.bodySecondary.lineHeight)};
|
|
97
98
|
-webkit-box-orient: vertical;
|
|
98
99
|
overflow: hidden;
|
|
@@ -114,12 +115,12 @@
|
|
|
114
115
|
-webkit-text-fill-color: transparent;
|
|
115
116
|
background-clip: text;
|
|
116
117
|
text-fill-color: transparent;
|
|
117
|
-
`,p=o.default(
|
|
118
|
+
`,p=o.default(h)`
|
|
118
119
|
text-decoration: underline;
|
|
119
120
|
color: ${t.COLORS.content.brand};
|
|
120
121
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
121
122
|
cursor: pointer;
|
|
122
|
-
`,w=o.default(
|
|
123
|
+
`,w=o.default(g)`
|
|
123
124
|
text-decoration: underline;
|
|
124
125
|
color: ${t.COLORS.content.brand};
|
|
125
126
|
text-decoration-color: ${t.COLORS.content.brand};
|
|
@@ -136,7 +137,7 @@
|
|
|
136
137
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
137
138
|
word-break: break-word;
|
|
138
139
|
overflow-wrap: break-word;
|
|
139
|
-
`,
|
|
140
|
+
`,s=o.default.div`
|
|
140
141
|
font-family: Inter;
|
|
141
142
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
142
143
|
font-weight: ${t.FONTS.caption.fontWeight};
|
|
@@ -152,7 +153,7 @@
|
|
|
152
153
|
-webkit-text-fill-color: transparent;
|
|
153
154
|
background-clip: text;
|
|
154
155
|
text-fill-color: transparent;
|
|
155
|
-
|
|
156
|
+
`,x=o.default.div`
|
|
156
157
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
157
158
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
158
159
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -161,7 +162,7 @@
|
|
|
161
162
|
overflow: hidden;
|
|
162
163
|
display: -webkit-box;
|
|
163
164
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
164
|
-
|
|
165
|
+
`,$=o.default.div`
|
|
165
166
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
166
167
|
font-weight: ${t.FONTS.tiny.fontWeight};
|
|
167
168
|
font-size: ${n(t.FONTS.tiny.fontSize)};
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
overflow: hidden;
|
|
213
214
|
display: -webkit-box;
|
|
214
215
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
215
|
-
`,
|
|
216
|
+
`,v=o.default.div`
|
|
216
217
|
font-family: Inter;
|
|
217
218
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
218
219
|
font-weight: ${t.FONTS.subHeading.fontWeight};
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
overflow: hidden;
|
|
223
224
|
display: -webkit-box;
|
|
224
225
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
225
|
-
`,
|
|
226
|
+
`,T=o.default.div`
|
|
226
227
|
font-family: Inter;
|
|
227
228
|
color: ${e=>e.color||t.COLORS.text.primary};
|
|
228
229
|
font-weight: ${t.FONTS.bodyRegular.fontWeight};
|
|
@@ -292,4 +293,4 @@
|
|
|
292
293
|
overflow: hidden;
|
|
293
294
|
display: -webkit-box;
|
|
294
295
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
295
|
-
`;exports.AiBodyCaption=
|
|
296
|
+
`;exports.AiBodyCaption=s,exports.AiBodyTiny=$,exports.BodyCaption=y,exports.BodyLarge=O,exports.BodyPrimary=h,exports.BodyPrimaryLink=p,exports.BodyRegular=T,exports.BodySecondary=g,exports.BodySecondaryLink=w,exports.BodySmall=z,exports.BodyTiny=x,exports.ButtonLarge=m,exports.ButtonLargeAI=u,exports.ButtonRegular=k,exports.ButtonRegularAI=S,exports.Caption=F,exports.CaptionBold=R,exports.Display=c,exports.SmallRegular=f,exports.SubHeading=v,exports.TextPlaceholder=N,exports.Tiny=C,exports.TitleFour=L,exports.TitleLarge=r,exports.TitleMedium=a,exports.TitleRegular=d,exports.TitleSmall=b,exports.TitleXlarge=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),l=require("react-slick"),s=require("./CarouselPreview.style.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),l=require("react-slick"),s=require("./CarouselPreview.style.js"),o=require("./CarouselPreviewCard.js"),t=require("../template-context-mapper/context/templateModalContext.js"),a=require("../template-preview/helpers/templateMiscHelper.js"),n=require("../template-preview/RCS/RCSPreview.styled.js"),i=require("./CustomCarouselArrows.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(r),c=d(l);const v=u.default.forwardRef((r=>{let{channel:l,template:i,isPreview:d,removeBottomBorder:u,borderRadius:c,showArrows:v,hideBorder:w,showSampleValues:C}=r;var m,h;const{sliderRef:x,selectedCarouselIndex:j,cardCount:f,setIsCarouselHovered:P,cardIndex:b,showVariablePicker:R}=t.useTemplateModalContext(),g=-1==b?a.determineCardIndex(l):b,I=null===(h=null===(m=null==i?void 0:i.components)||void 0===m?void 0:m[g])||void 0===h?void 0:h.cards,S=(null==I?void 0:I.length)?e.jsx(p,{cards:I,cardCount:null!=f?f:0,selectedCarouselIndex:null!=j?j:-1,sliderRef:x,isPreview:d,showArrows:v,channel:l,template:i,setIsCarouselHovered:P,showSampleValues:!!C,showVariablePicker:R}):null;return a.isRCSChannel(l)?e.jsx(n.RCSCarousalContainer,Object.assign({borderRadius:c},{children:S})):e.jsxs(s.Container,Object.assign({removeBottomBorder:u,borderRadius:c,hideBorder:w},{children:[e.jsx(o.default,{channel:l,currentTemplate:i,carouselCardIndex:-1,isPreview:d,width:"77%"}),S]}))})),p=r=>{let{cards:l,cardCount:t,selectedCarouselIndex:a,sliderRef:n,isPreview:d,showArrows:u,channel:v,template:p,setIsCarouselHovered:w,showSampleValues:C,showVariablePicker:m}=r;return e.jsx(s.CarouselSlickContainer,Object.assign({cardCount:t,selectedCarouselIndex:a,onMouseEnter:()=>!m&&(null==w?void 0:w(!0)),onMouseLeave:()=>!m&&(null==w?void 0:w(!1))},{children:e.jsx(c.default,Object.assign({ref:n,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!d,centerMode:!0,arrows:u,adaptiveHeight:!0,nextArrow:e.jsx(i.CustomCarouselRightArrow,{isPreview:null!=d&&d}),prevArrow:e.jsx(i.CustomCarouselLeftArrow,{isPreview:null!=d&&d})},{children:null==l?void 0:l.map(((r,l)=>{var s,t;const a={components:r.components,mapping:null===(t=null===(s=null==p?void 0:p.mapping)||void 0===s?void 0:s.cards)||void 0===t?void 0:t[l],content:null==p?void 0:p.content,templateType:null==p?void 0:p.templateType};return e.jsx(o.default,{channel:v,currentTemplate:a,carouselCardIndex:l,isPreview:d,width:"100%",showSampleValues:C},l)}))}))}))};exports.CarouselPreview=v;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");const r=n.forwardRef(((r,o)=>{let{options:i,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:d,onDropdownItemClick:p,useDefaultCursor:f,focusedIndex:j=-1}=r;const b=n.useRef(null),x=n.useRef(null),g=n.useCallback((()=>{b.current&&b.current.disconnect(),b.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==d||d())})),x.current&&b.current.observe(x.current)}),[d]);n.useEffect((()=>(g(),()=>{b.current&&b.current.disconnect()})),[g,i]);const I=new Map;let h=-1;return i.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(h++,I.set(e,h))}));else{const n=e;n.disabled||(h++,I.set(n,h))}})),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const d=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:a},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,s)=>{const d=I.get(n),b=d===j&&!n.disabled;return e.jsx(t.MenuItem,{version:a,last:s===i.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:n,useDefaultCursor:f,isFocused:b,dataIndex:d,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${s}`)})),d?e.jsx("span",{ref:x}):null]}),r)}const b=n,g=I.get(b),h=g===j&&!b.disabled;return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:a,last:d,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:b,useDefaultCursor:f,isFocused:h,dataIndex:g,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("./MenuItem.js"),s=require("./MenuList.styled.js");const r=n.forwardRef(((r,o)=>{let{options:i,isMultiSelect:c,showDescription:l,onSelect:u,version:a,onInfiniteScroll:d,onDropdownItemClick:p,useDefaultCursor:f,focusedIndex:j=-1}=r;const b=n.useRef(null),x=n.useRef(null),g=n.useCallback((()=>{b.current&&b.current.disconnect(),b.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==d||d())})),x.current&&b.current.observe(x.current)}),[d]);n.useEffect((()=>(g(),()=>{b.current&&b.current.disconnect()})),[g,i]);const I=new Map;let h=-1;return i.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(h++,I.set(e,h))}));else{const n=e;n.disabled||(h++,I.set(n,h))}})),e.jsx(e.Fragment,{children:i.map(((n,r)=>{const d=r===i.length-1;if(n.options){const i=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===a?2:0}},{children:[e.jsxs(s.StyledGroupedLabel,Object.assign({version:a},{children:[i.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((n,s)=>{const d=I.get(n),b=d===j&&!n.disabled;return e.jsx(t.MenuItem,{version:a,last:s===i.options.length-1,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:n,useDefaultCursor:f,isFocused:b,dataIndex:d,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${s}`)})),d?e.jsx("span",{ref:x}):null]}),r)}const b=n,g=I.get(b),h=g===j&&!b.disabled;return e.jsxs("div",{children:[e.jsx(t.MenuItem,{version:a,last:d,onSelect:u,showDescription:l,onDropdownItemClick:p,isMultiSelect:c,option:b,useDefaultCursor:f,isFocused:h,dataIndex:g,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},b.value),d?e.jsx("span",{ref:x}):null]},r)}))})}));exports.MenuList=r;
|
package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),i=require("../../../assets/icons/chevronRight.svg.js"),o=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),s=require("../../button/Button.js"),d=require("../../icon-button/IconButton.js"),c=require("../../product-picker-v2/modal.js"),u=require("../../product-picker-v2/type.js"),p=require("../Badge/index.js"),v=require("../context/templateModalContext.js"),h=require("./EditWhatsAppTemplateV2.js"),m=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var g=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var y=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@bikdotai/bik-models/growth/models/bik-store"),l=require("../../../assets/icons/arrow_back.svg.js"),n=require("../../../assets/icons/chevronLeft.svg.js"),i=require("../../../assets/icons/chevronRight.svg.js"),o=require("../../../assets/icons/PlusIcon.js"),r=require("lodash"),a=require("react"),s=require("../../button/Button.js"),d=require("../../icon-button/IconButton.js"),c=require("../../product-picker-v2/modal.js"),u=require("../../product-picker-v2/type.js"),p=require("../Badge/index.js"),v=require("../context/templateModalContext.js"),h=require("./EditWhatsAppTemplateV2.js"),m=require("./ProductBox.js");require("../../template-preview/TemplatePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreview.js"),require("../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js");var g=require("../../../constants/Theme.js");require("../../curtain/CurtainHelper.js"),require("../../variable-picker-v3/model.js"),require("../../template-preview/models/TemplateMeta.js");var y=require("../../template-preview/models/WhatsAppTemplate.js");require("../../template-preview/models/Channels.js");var x=require("../../template-preview/helpers/templateMiscHelper.js"),j=require("../../TypographyStyle.js");exports.default=f=>{let{template:b,whatsappSpecificPickerMeta:C,showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}=f;var q,w,P,T,B,L,R,E;const{selectedCarouselIndex:M,setTemplate:A,pickerConf:D,isProductCarouselType:F,pod:V,cardCount:W,carouselProducts:N,setCarouselProducts:$,isError:_,cardImages:z,disableEditVariable:G,onDeleteSelectedProducts:H,setSelectedCarouselIndex:K,setVariableCallback:J,setShowVariablePicker:Q,sliderRef:U}=v.useTemplateModalContext(),[X,Y]=a.useState(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(w=null===(q=null==b?void 0:b.mapping)||void 0===q?void 0:q.body)||void 0===w?void 0:w.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(T=null===(P=null==b?void 0:b.mapping)||void 0===P?void 0:P.body)||void 0===T?void 0:T.length)?"(Step 2/2)":"")),[Z,ee]=a.useState(!1),[te,le]=a.useState(!1),ne=M===(null!=W?W:-1)-1,ie=(null!=M?M:-1)<1;a.useEffect((()=>{var e,t,l,n;Y(x.isRCSChannel(null==b?void 0:b.channel)?"Carousel Cards":-1==M?"First Message (Step 1/2)":F?"Product Carousel "+((null===(t=null===(e=null==b?void 0:b.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(n=null===(l=null==b?void 0:b.mapping)||void 0===l?void 0:l.body)||void 0===n?void 0:n.length)?"(Step 2/2)":""))}),[M]),a.useEffect((()=>{Q(!1)}),[M]);const oe=e=>{null==$||$([{name:"variable",productName:e.actualValue}])};return a.useEffect((()=>{-1===M&&x.isRCSChannel(null==b?void 0:b.channel)&&(null==K||K(0))}),[M,null==b?void 0:b.channel]),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center"}},{children:[!x.isRCSChannel(null==b?void 0:b.channel)&&null!=M&&M>=0&&!!(null===(L=null===(B=null==b?void 0:b.mapping)||void 0===B?void 0:B.body)||void 0===L?void 0:L.length)&&e.jsx(d.IconButton,{Icon:l.default,onClick:()=>{null==K||K(-1)}}),e.jsx(j.TitleMedium,Object.assign({style:{marginLeft:10}},{children:X}))]})),F&&(null!==(R=null==N?void 0:N.length)&&void 0!==R?R:0)>0&&null!=M&&M>=0&&e.jsxs("div",Object.assign({style:{display:"flex",rowGap:8,marginBottom:16,marginLeft:10,marginRight:10,flexDirection:"column"}},{children:[e.jsx(m.ProductBox,{editItem:()=>{1===(null==N?void 0:N.length)&&"variable"===N[0].name?(J((()=>oe)),Q(!0)):ee(!Z)},cardBody:1===(null==N?void 0:N.length)&&"variable"===N[0].name?`${N[0].productName}`:`${null==N?void 0:N.length} Products Selected`,hideIcon:1===(null==N?void 0:N.length)&&"variable"===N[0].name,deleteItem:()=>{var e;if(1===(null==N?void 0:N.length)&&"variable"===N[0].name)return void(null==$||$([]));const t=r.cloneDeep(Object.assign({},b));t&&(z&&z.length>0?null==z||z.forEach(((e,l)=>{var n;t.components[1].cards[l].components[0].example.header_handle=[null!==(n=z[l])&&void 0!==n?n:"https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})):null===(e=null==t?void 0:t.components[1].cards)||void 0===e||e.forEach(((e,l)=>{t.components[1].cards[l].components[0].example.header_handle=["https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})),null==A||A(t)),null==$||$([]),null==H||H()}}),N&&(null==N?void 0:N.length)>0&&"variable"!=N[0].name&&e.jsx(s.Button,{disabled:(null!==(E=null==N?void 0:N.length)&&void 0!==E?E:0)<=1,style:{alignSelf:"flex-end"},onClick:()=>{le(!0),ee(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!G&&F&&0===(null==N?void 0:N.length)&&null!=M&&M>=0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{marginLeft:12}},{children:[e.jsx(j.TitleRegular,{children:"Product(s)"}),e.jsx(j.BodySecondary,{children:`Select ${null!=W?W:1} products`})]})),e.jsxs("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:_?16:12,marginRight:_?16:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex",width:18,height:18}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{ee(!0)}}),V===y.POD.CHATBOT&&e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8,flex:1}}),e.jsx(j.BodyCaption,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),e.jsx("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8,flex:1}})]})),e.jsx(s.Button,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%",border:_?`2px dashed ${g.COLORS.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s) Variable",buttonType:_?"tertiaryGray":"dashBold",LeadingIcon:()=>e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(o.default,{width:18,height:18,color:g.COLORS.content.secondary})})),onClick:e=>{J((()=>oe)),Q(!0)}})]})]})),_&&e.jsx("div",Object.assign({style:{marginLeft:10,marginBottom:16}},{children:e.jsx(p.Badge,{padding:"8px",errorText:"Please add products"})}))]}),!F&&(null!=M?M:-1)>-1&&e.jsxs("div",Object.assign({style:{display:"flex",background:g.COLORS.surface.hovered,alignItems:"center"}},{children:[e.jsx(d.IconButton,{Icon:n.default,disabled:ie,width:8,height:14,svgStyle:ie?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickPrev(),(null!=M?M:-1)<1||null==K||K((e=>e-1))}}),e.jsx(j.TitleRegular,Object.assign({style:{flex:1,display:"flex",justifyContent:"center"},color:g.COLORS.content.secondary},{children:`Card ${(null!=M?M:0)+1}/${W}`})),e.jsx(d.IconButton,{Icon:i.default,width:8,height:14,disabled:ne,svgStyle:ne?{}:{color:g.COLORS.content.secondary},onClick:()=>{var e;null===(e=null==U?void 0:U.current)||void 0===e||e.slickNext(),(null!=M?M:-1)>=(null!=W?W:-1)-1||null==K||K((e=>e+1))}})]})),e.jsx(h.default,{whatsappSpecificPickerMeta:C,template:b,onTemplateChange:e=>{null==A||A(e)},showVariableModal:O,variableListForImage:I,discountCode:S,setDiscountCode:k}),Z&&D&&e.jsx(c.ProductPickerModal,{zIndex:200,startupScreen:te?u.ScreenName.RearrangeProducts:u.ScreenName.Collections,rearrangeEnabled:!0,storeId:D.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const l of e){const e=null==l?void 0:l.collectionId,n=l.productId,i=l.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),n in t[e].products||(t[e].products[n]={variants:{},name:(null==l?void 0:l.productName)||"",image:(null==l?void 0:l.productImage)||""}),t[e].products[n].variants[i]={name:(null==l?void 0:l.name)||"",price:"",image:(null==l?void 0:l.image)||"",quantity:l.quantity||0,displayOrder:l.displayOrder}}return t}return{}})(null!=N?N:[]),collectionFetcher:D.fetchCollections,productFetcher:D.fetchProducts,onAdd:(e,t)=>{var l,n,i,o,a,s;le(!1);const d=[];delete e.isCustom;for(const t of Object.keys(e)){const r=e[t].products;if(void 0!==r&&Object.keys(r).length)for(const e of Object.keys(r)){const c=r[e].variants;if(void 0!==c&&Object.keys(c).length)for(const u of Object.keys(c)){const{name:p,image:v,quantity:h,displayOrder:m}=c[u],g={name:p,image:null!==(n=null!=v?v:null===(l=r[e])||void 0===l?void 0:l.image)&&void 0!==n?n:"",quantity:h,variantId:u,productId:e,displayOrder:m,collectionId:t,productName:null!==(o=null===(i=r[e])||void 0===i?void 0:i.name)&&void 0!==o?o:"",productImage:null!==(s=null===(a=r[e])||void 0===a?void 0:a.image)&&void 0!==s?s:""};d.push(g)}}}const c=d.sort(((e,t)=>e.displayOrder-t.displayOrder)),u=d.map((e=>e.image)),p=r.cloneDeep(Object.assign({},b));p&&(u.forEach(((e,t)=>{var l;p.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(l=null==z?void 0:z[t])&&void 0!==l?l:""]})),null==A||A(p)),null==$||$(c),ee(!1)},searchInCollectionFetcher:D.searchInCollection,searchFetcher:D.searchProducts,visible:Z,onClose:()=>{ee(!1)},exactLimit:null!=W?W:1,appType:D.appType||t.ApplicationType.BIK})]}))};
|
|
@@ -11,6 +11,8 @@ export type ToasterProps = {
|
|
|
11
11
|
subText?: string;
|
|
12
12
|
position?: ToastPosition;
|
|
13
13
|
type?: 'info' | 'success' | 'error' | 'default' | 'warning';
|
|
14
|
+
duration?: number;
|
|
15
|
+
blocking?: boolean;
|
|
14
16
|
closeOnClick?: boolean;
|
|
15
17
|
hideProgressBar?: boolean;
|
|
16
18
|
autoClose?: number | false | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../assets/icons/alert_triangle.svg.js"),o=require("../../assets/icons/check.svg.js"),n=require("../../assets/icons/cross.svg.js"),s=require("../../assets/icons/errorInfo.svg.js"),i=require("../../assets/icons/info.svg.js"),r=require("react"),l=require("react-dom"),u=require("react-toastify"),c=require("../button/Button.js"),a=require("./Toaster.styled.js"),d=require("../TypographyStyle.js"),x=require("../../constants/Theme.js");function h(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var p=h(r),y=h(l);const g=e=>t.jsxs(d.BodySecondary,Object.assign({color:"#9E9E9E",customStyles:{fontWeight:600,fontSize:14,width:25}},{children:[e.duration,"s"]})),v=e=>{const o="default"===e.type?x.COLORS.content.primary:"success"===e.type?x.COLORS.content.positive:"error"===e.type?x.COLORS.content.negative:"warning"===e.type?x.COLORS.content.warning:x.COLORS.content.brand,{timerValue:s}=r.useContext(b),i=(!e.blocking||-1!==s)&&(e.blocking&&s>0);return t.jsx("div",Object.assign({tabIndex:i?-1:0,role:"button",style:{width:s>0?25:20,display:"flex",cursor:i?"not-allowed":"pointer",alignSelf:""+(e.alignTop?"flex-start":"center"),opacity:i?.5:1},onClick:()=>{!i&&e.closeToast&&e.closeToast()},onKeyDown:t=>{"Enter"===t.key&&!i&&e.closeToast&&e.closeToast()}},{children:s>0?t.jsx(g,{duration:s}):t.jsx(n.default,{height:20,width:20,color:o})}))},f=e=>{var o,n;const s=x.COLORS.content.placeholder,{toasterText:i}=r.useContext(b);return t.jsx(t.Fragment,{children:t.jsxs("div",Object.assign({style:{display:"flex",flexGrow:1}},{children:[t.jsx("div",Object.assign({style:{flexGrow:1,marginRight:32,display:"flex",alignItems:"center"}},{children:t.jsxs("div",{children:[e.subText?t.jsx(d.TitleSmall,Object.assign({color:"inherit"},{children:null!==(o=e.toastText)&&void 0!==o?o:i})):t.jsx(d.BodySecondary,Object.assign({color:"inherit"},{children:null!==(n=e.toastText)&&void 0!==n?n:i})),e.subText&&t.jsx("div",Object.assign({style:{marginTop:2}},{children:t.jsx(d.BodyCaption,Object.assign({color:x.COLORS.content.secondary},{children:e.subText}))}))]})})),e.showButton&&t.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px",marginRight:{showSecondButton:4,showButton:0}[e.showSecondButton?"showSecondButton":"showButton"]}},{children:t.jsx(c.Button,{buttonText:e.buttonText,buttonType:"tertiaryGray",color:x.COLORS.content.secondary,onClick:e.onButtonClick})})),e.showSecondButton&&t.jsx("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px"}},{children:t.jsx(c.Button,{buttonText:e.secondButtonText,buttonType:"tertiaryGray",color:x.COLORS.content.secondary,onClick:e.onSecondButtonClick})})),e.showButton||e.showSecondButton?t.jsx("div",{style:{height:28,alignSelf:"center",marginLeft:8,marginRight:8,borderRight:`1px solid ${s}`,borderRadius:1}}):null]}))})},b=p.default.createContext({toasterText:"",timerValue:-1});exports.Toaster=n=>{const l=r.useRef(n.toastId||"default-toast"),[c,d]=r.useState(n.text),[h,p]=r.useState(n.duration||-1),g=u.cssTransition({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit"}),j="default"===n.type?null:"success"===n.type?t.jsx(o.default,{width:20,height:20,color:x.COLORS.content.positive}):"error"===n.type?t.jsx(s.default,{width:20,height:20,color:x.COLORS.content.negative}):"warning"===n.type?t.jsx(e.default,{width:20,height:20,color:x.COLORS.content.warning}):t.jsx(i.default,{width:20,height:20,color:x.COLORS.content.brand});r.useEffect((()=>{l.current&&l.current===n.toastId?(d(n.text),u.toast.update(l.current,{autoClose:n.autoClose})):l.current&&l.current!==n.toastId&&T(n.text)}),[n.toastId,n.text]),r.useEffect((()=>{if(!n.duration)return;p(n.duration);const t=setInterval((()=>{p((e=>{const o=e-1;return o<=0?(clearInterval(t),-1):o}))}),1e3);return()=>clearInterval(t)}),[n.duration,n.toastId]);const T=e=>{var o,s,i,r,c,a,d,x,h,p,y,b,T,B,C,O;void 0!==n.hideLeftIcon||n.leftIcon?u.toast(t.jsx(f,{toastText:e,type:n.type||"info",buttonText:null===(o=n.buttonProps)||void 0===o?void 0:o.buttonText,secondButtonText:null===(s=n.secondButtonProps)||void 0===s?void 0:s.buttonText,showButton:null===(i=n.buttonProps)||void 0===i?void 0:i.showButton,showSecondButton:null===(r=n.secondButtonProps)||void 0===r?void 0:r.showButton,onButtonClick:null===(c=n.buttonProps)||void 0===c?void 0:c.onButtonClick,onSecondButtonClick:null===(a=n.secondButtonProps)||void 0===a?void 0:a.onButtonClick,subText:n.subText}),{onClose:n.onCloseToast?n.onCloseToast:()=>({}),icon:!0!==n.hideLeftIcon&&(n.leftIcon?n.leftIcon:"default"!==n.type&&t.jsx("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:j}))),type:n.type,closeButton:t.jsx(v,{type:n.type||"default",alignTop:!(!n.subText||(null===(d=n.buttonProps)||void 0===d?void 0:d.showButton)||(null===(x=n.secondButtonProps)||void 0===x?void 0:x.showButton)),blocking:n.blocking}),toastId:n.toastId||"default-toast",transition:g}):l.current=u.toast(t.jsx(f,{toastText:e,type:n.type||"info",buttonText:null===(h=n.buttonProps)||void 0===h?void 0:h.buttonText,secondButtonText:null===(p=n.secondButtonProps)||void 0===p?void 0:p.buttonText,showButton:null===(y=n.buttonProps)||void 0===y?void 0:y.showButton,showSecondButton:null===(b=n.secondButtonProps)||void 0===b?void 0:b.showButton,onButtonClick:null===(T=n.buttonProps)||void 0===T?void 0:T.onButtonClick,onSecondButtonClick:null===(B=n.secondButtonProps)||void 0===B?void 0:B.onButtonClick,subText:n.subText}),{onClose:n.onCloseToast?n.onCloseToast:()=>({}),type:n.type,icon:"default"!==n.type&&t.jsx("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:j})),closeButton:t.jsx(v,{type:n.type||"default",alignTop:!(!n.subText||(null===(C=n.buttonProps)||void 0===C?void 0:C.showButton)||(null===(O=n.secondButtonProps)||void 0===O?void 0:O.showButton)),blocking:n.blocking}),toastId:n.toastId||"default-toast",transition:g})};return r.useEffect((()=>{T()}),[]),y.default.createPortal(t.jsx(a.ToasterStyled,Object.assign({width:n.width,height:n.height,zIndex:n.zIndex,isSubTextIncluded:!!n.subText,type:n.type},{children:t.jsx(b.Provider,Object.assign({value:{toasterText:c,timerValue:h}},{children:t.jsx(u.ToastContainer,{position:n.position||"top-right",closeOnClick:n.closeOnClick||!1,hideProgressBar:n.hideProgressBar||!1,draggable:!1,autoClose:n.autoClose||!1,theme:"colored"})}))})),document.body)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),t=require("../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),t=require("../../constants/Theme.js"),d=require("../../constants/zindex.js");function b(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}const l=b(c).default("div","production"===process.env.NODE_ENV?{target:"e1tdeuzc0"}:{target:"e1tdeuzc0",label:"ToasterStyled"})("--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-text-color-success:",t.COLORS.content.primary,";--toastify-text-color-error:",t.COLORS.content.primary,";--toastify-text-color-warning:",t.COLORS.content.primary,";--toastify-text-color-info:",t.COLORS.content.primary,";--toastify-color-info:",t.COLORS.background.brandLight,";--toastify-color-success:",t.COLORS.background.positive.light,";--toastify-color-error:",t.COLORS.background.negative.light,";--toastify-color-warning:",t.COLORS.background.warning.light,";--toastify-text-color-light:",t.COLORS.content.primary,";--toastify-toast-width:fit-content;--toastify-toast-min-height:",(c=>c.height||(c.isSubTextIncluded?"70px":"56px")),";--toastify-toast-max-height:",(c=>c.height||"fit-content"),";font-family:inherit;z-index:",(c=>c.zIndex||d.ComponentZindex.TOASTER),";.custom-position{position:relative;}.Toastify__toast-container{padding:0;}.Toastify__toast--success{border:1px solid ",t.COLORS.stroke.positive.lightAlt,";}.Toastify__toast--info{border:1px solid ",t.COLORS.stroke.brandLightAlt,";}.Toastify__toast--default{border:1px solid ",t.COLORS.stroke.primary,";}.Toastify__toast--error{border:1px solid ",t.COLORS.stroke.negative.lightAlt,";}.Toastify__toast--warning{border:1px solid ",t.COLORS.stroke.warning.lightAlt,";}.Toastify__toast{padding:",(c=>c.isSubTextIncluded?"16px":"12px"),";max-width:",(c=>c.width),";border-radius:8px;}.Toastify__progress-bar{height:4px;}.Toastify__close-button{display:block;margin:auto;}.Toastify__toast-icon{align-self:center;margin-inline-end:12px;height:",(c=>c.isSubTextIncluded?"38px":"20px"),";}.Toastify__toast-body{padding:0;}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--default{background:",t.COLORS.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info{background:",t.COLORS.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:",t.COLORS.content.warning,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success{background:",t.COLORS.content.positive,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:",t.COLORS.content.negative,";}.Toastify__toast-body>div:last-child{display:flex;}.Toastify__slide-enter{animation:slideIn 1s ease forwards,bounce cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.5s both;}.Toastify__slide-exit{animation:slideOut 0.5s ease-in-out forwards;}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0);}40%{transform:translateX(-20px);}60%{transform:translateX(20px);}}@keyframes slideIn{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes slideOut{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvYXN0ZXIuc3R5bGVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHd0MiLCJmaWxlIjoiVG9hc3Rlci5zdHlsZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3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;
|
|
@@ -69,6 +69,8 @@ export declare const COLORS: {
|
|
|
69
69
|
blue: {
|
|
70
70
|
light: string;
|
|
71
71
|
};
|
|
72
|
+
white: string;
|
|
73
|
+
lightbrand: string;
|
|
72
74
|
};
|
|
73
75
|
icon: {
|
|
74
76
|
placeholder: string;
|
|
@@ -360,6 +362,8 @@ export declare const DEFAULT_THEME: {
|
|
|
360
362
|
blue: {
|
|
361
363
|
light: string;
|
|
362
364
|
};
|
|
365
|
+
white: string;
|
|
366
|
+
lightbrand: string;
|
|
363
367
|
};
|
|
364
368
|
icon: {
|
|
365
369
|
placeholder: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",100:"#F3EDF9",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"},bikAi:{500:"linear-gradient(93deg, #FF166A 0.37%, #FB5F08 100%)",100:"linear-gradient(93deg, #FEBAD2 0.37%, #FDD1B9 100%)",50:"linear-gradient(93deg, #FFE6EE 0.37%, #FFF0E7 100%)"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],pureWhite:e.grayscale.white,brandTint:e.brand[100],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"}},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70],ai:e.bikAi[500],aiLight:e.bikAi[50]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F",ai:e.bikAi[500]},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"},ai:{lightAlt:"#FEBAD2",vibrant:"#F23275"}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};exports.BASE_COLORS=e,exports.COLORS=t,exports.DEFAULT_THEME=n,exports.FONTS=i;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",100:"#F3EDF9",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"},bikAi:{500:"linear-gradient(93deg, #FF166A 0.37%, #FB5F08 100%)",100:"linear-gradient(93deg, #FEBAD2 0.37%, #FDD1B9 100%)",50:"linear-gradient(93deg, #FFE6EE 0.37%, #FFF0E7 100%)"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],pureWhite:e.grayscale.white,brandTint:e.brand[100],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"},white:e.grayscale.white,lightbrand:"#F3EDF9"},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70],ai:e.bikAi[500],aiLight:e.bikAi[50]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F",ai:e.bikAi[500]},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"},ai:{lightAlt:"#FEBAD2",vibrant:"#F23275"}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};exports.BASE_COLORS=e,exports.COLORS=t,exports.DEFAULT_THEME=n,exports.FONTS=i;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
interface customStyles {
|
|
2
|
+
fontWeight?: number;
|
|
3
|
+
fontSize?: number;
|
|
4
|
+
width?: number;
|
|
5
|
+
}
|
|
1
6
|
export declare const TitleXlarge: import("styled-components").StyledComponent<"div", any, {
|
|
2
7
|
numberOfLines?: number | undefined;
|
|
3
8
|
color?: string | undefined;
|
|
@@ -37,6 +42,7 @@ export declare const BodyPrimary: import("styled-components").StyledComponent<"d
|
|
|
37
42
|
export declare const BodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
38
43
|
numberOfLines?: number | undefined;
|
|
39
44
|
color?: string | undefined;
|
|
45
|
+
customStyles?: customStyles | undefined;
|
|
40
46
|
}, never>;
|
|
41
47
|
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
42
48
|
numberOfLines?: number | undefined;
|
|
@@ -50,6 +56,7 @@ export declare const BodyPrimaryLink: import("styled-components").StyledComponen
|
|
|
50
56
|
export declare const BodySecondaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
51
57
|
numberOfLines?: number | undefined;
|
|
52
58
|
color?: string | undefined;
|
|
59
|
+
customStyles?: customStyles | undefined;
|
|
53
60
|
}, never>;
|
|
54
61
|
export declare const BodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
55
62
|
numberOfLines?: number | undefined;
|
|
@@ -111,3 +118,4 @@ export declare const Tiny: import("styled-components").StyledComponent<"div", an
|
|
|
111
118
|
numberOfLines?: number | undefined;
|
|
112
119
|
color?: string | undefined;
|
|
113
120
|
}, never>;
|
|
121
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants/Theme.js";const o=e=>e+"px",n=e.div`
|
|
1
|
+
import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants/Theme.js";const o=e=>void 0===e||null==e?"":e+"px",n=e.div`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||i.text.primary};
|
|
4
4
|
font-weight: ${t.titleXLarge.fontWeight};
|
|
@@ -90,9 +90,10 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
90
90
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
91
91
|
`,g=e.div`
|
|
92
92
|
font-family: Inter;
|
|
93
|
+
width: ${e=>{var i;return o(null===(i=e.customStyles)||void 0===i?void 0:i.width)}};
|
|
93
94
|
color: ${e=>e.color||i.text.primary};
|
|
94
|
-
font-weight: ${t.bodySecondary.fontWeight};
|
|
95
|
-
font-size: ${o(t.bodySecondary.fontSize)};
|
|
95
|
+
font-weight: ${e=>{var i;return(null===(i=e.customStyles)||void 0===i?void 0:i.fontWeight)||t.bodySecondary.fontWeight}};
|
|
96
|
+
font-size: ${e=>{var i;return o(null===(i=e.customStyles)||void 0===i?void 0:i.fontSize)||o(t.bodySecondary.fontSize)}};
|
|
96
97
|
line-height: ${o(t.bodySecondary.lineHeight)};
|
|
97
98
|
-webkit-box-orient: vertical;
|
|
98
99
|
overflow: hidden;
|
|
@@ -124,7 +125,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
124
125
|
color: ${i.content.brand};
|
|
125
126
|
text-decoration-color: ${i.content.brand};
|
|
126
127
|
cursor: pointer;
|
|
127
|
-
`,
|
|
128
|
+
`,y=e.div`
|
|
128
129
|
font-family: Inter;
|
|
129
130
|
color: ${e=>e.color||i.text.primary};
|
|
130
131
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -136,7 +137,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
136
137
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
137
138
|
word-break: break-word;
|
|
138
139
|
overflow-wrap: break-word;
|
|
139
|
-
`,
|
|
140
|
+
`,p=e.div`
|
|
140
141
|
font-family: Inter;
|
|
141
142
|
color: ${e=>e.color||i.text.primary};
|
|
142
143
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -161,7 +162,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
161
162
|
overflow: hidden;
|
|
162
163
|
display: -webkit-box;
|
|
163
164
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
164
|
-
`,
|
|
165
|
+
`,s=e.div`
|
|
165
166
|
color: ${e=>e.color||i.text.primary};
|
|
166
167
|
font-weight: ${t.tiny.fontWeight};
|
|
167
168
|
font-size: ${o(t.tiny.fontSize)};
|
|
@@ -176,7 +177,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
176
177
|
-webkit-text-fill-color: transparent;
|
|
177
178
|
background-clip: text;
|
|
178
179
|
text-fill-color: transparent;
|
|
179
|
-
`,
|
|
180
|
+
`,k=e.div`
|
|
180
181
|
font-family: Inter;
|
|
181
182
|
color: ${e=>e.color||i.text.primary};
|
|
182
183
|
font-weight: ${t.buttonLarge.fontWeight};
|
|
@@ -222,7 +223,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
222
223
|
overflow: hidden;
|
|
223
224
|
display: -webkit-box;
|
|
224
225
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
225
|
-
`,
|
|
226
|
+
`,S=e.div`
|
|
226
227
|
font-family: Inter;
|
|
227
228
|
color: ${e=>e.color||i.text.primary};
|
|
228
229
|
font-weight: ${t.bodyRegular.fontWeight};
|
|
@@ -232,7 +233,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
232
233
|
overflow: hidden;
|
|
233
234
|
display: -webkit-box;
|
|
234
235
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
235
|
-
`,
|
|
236
|
+
`,L=e.div`
|
|
236
237
|
font-family: Inter;
|
|
237
238
|
color: ${i.text.primary};
|
|
238
239
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -252,7 +253,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
252
253
|
overflow: hidden;
|
|
253
254
|
display: -webkit-box;
|
|
254
255
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
255
|
-
`,
|
|
256
|
+
`,W=e.div`
|
|
256
257
|
font-family: Inter;
|
|
257
258
|
color: ${i.text.primary};
|
|
258
259
|
font-weight: ${t.title4.fontWeight};
|
|
@@ -262,7 +263,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
262
263
|
overflow: hidden;
|
|
263
264
|
display: -webkit-box;
|
|
264
265
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
265
|
-
`,
|
|
266
|
+
`,O=e.div`
|
|
266
267
|
font-family: Inter;
|
|
267
268
|
color: ${i.text.primary};
|
|
268
269
|
font-weight: ${t.bodySmall.fontWeight};
|
|
@@ -292,4 +293,4 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
292
293
|
overflow: hidden;
|
|
293
294
|
display: -webkit-box;
|
|
294
295
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
295
|
-
`;export{
|
|
296
|
+
`;export{p as AiBodyCaption,s as AiBodyTiny,y as BodyCaption,c as BodyLarge,h as BodyPrimary,$ as BodyPrimaryLink,S as BodyRegular,g as BodySecondary,m as BodySecondaryLink,O as BodySmall,x as BodyTiny,k as ButtonLarge,v as ButtonLargeAI,u as ButtonRegular,w as ButtonRegularAI,L as Caption,I as CaptionBold,d as Display,a as SmallRegular,z as SubHeading,H as TextPlaceholder,R as Tiny,W as TitleFour,l as TitleLarge,r as TitleMedium,f as TitleRegular,b as TitleSmall,n as TitleXlarge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import l from"react-slick";import{Container as t,CarouselSlickContainer as s}from"./CarouselPreview.style.js";import
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"react";import l from"react-slick";import{Container as t,CarouselSlickContainer as s}from"./CarouselPreview.style.js";import i from"./CarouselPreviewCard.js";import{useTemplateModalContext as a}from"../template-context-mapper/context/templateModalContext.js";import{determineCardIndex as n,isRCSChannel as d}from"../template-preview/helpers/templateMiscHelper.js";import{RCSCarousalContainer as c}from"../template-preview/RCS/RCSPreview.styled.js";import{CustomCarouselRightArrow as u,CustomCarouselLeftArrow as m}from"./CustomCarouselArrows.js";const p=o.forwardRef((o=>{let{channel:l,template:s,isPreview:u,removeBottomBorder:m,borderRadius:p,showArrows:w,hideBorder:h,showSampleValues:C}=o;var f,x;const{sliderRef:P,selectedCarouselIndex:b,cardCount:j,setIsCarouselHovered:g,cardIndex:I,showVariablePicker:R}=a(),S=-1==I?n(l):I,V=null===(x=null===(f=null==s?void 0:s.components)||void 0===f?void 0:f[S])||void 0===x?void 0:x.cards,A=(null==V?void 0:V.length)?e(v,{cards:V,cardCount:null!=j?j:0,selectedCarouselIndex:null!=b?b:-1,sliderRef:P,isPreview:u,showArrows:w,channel:l,template:s,setIsCarouselHovered:g,showSampleValues:!!C,showVariablePicker:R}):null;return d(l)?e(c,Object.assign({borderRadius:p},{children:A})):r(t,Object.assign({removeBottomBorder:m,borderRadius:p,hideBorder:h},{children:[e(i,{channel:l,currentTemplate:s,carouselCardIndex:-1,isPreview:u,width:"77%"}),A]}))})),v=r=>{let{cards:o,cardCount:t,selectedCarouselIndex:a,sliderRef:n,isPreview:d,showArrows:c,channel:p,template:v,setIsCarouselHovered:w,showSampleValues:h,showVariablePicker:C}=r;return e(s,Object.assign({cardCount:t,selectedCarouselIndex:a,onMouseEnter:()=>!C&&(null==w?void 0:w(!0)),onMouseLeave:()=>!C&&(null==w?void 0:w(!1))},{children:e(l,Object.assign({ref:n,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!d,centerMode:!0,arrows:c,adaptiveHeight:!0,nextArrow:e(u,{isPreview:null!=d&&d}),prevArrow:e(m,{isPreview:null!=d&&d})},{children:null==o?void 0:o.map(((r,o)=>{var l,t;const s={components:r.components,mapping:null===(t=null===(l=null==v?void 0:v.mapping)||void 0===l?void 0:l.cards)||void 0===t?void 0:t[o],content:null==v?void 0:v.content,templateType:null==v?void 0:v.templateType};return e(i,{channel:p,currentTemplate:s,carouselCardIndex:o,isPreview:d,width:"100%",showSampleValues:h},o)}))}))}))};export{p as CarouselPreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{forwardRef as r,useRef as o,useCallback as s,useEffect as i}from"react";import{MenuItem as c}from"./MenuItem.js";import{StyledGroupedLabel as l}from"./MenuList.styled.js";const u=r(((r,u)=>{let{options:a,isMultiSelect:d,showDescription:p,onSelect:f,version:m,onInfiniteScroll:g,onDropdownItemClick:h,useDefaultCursor:b,focusedIndex:I=-1}=r;const
|
|
1
|
+
import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import{forwardRef as r,useRef as o,useCallback as s,useEffect as i}from"react";import{MenuItem as c}from"./MenuItem.js";import{StyledGroupedLabel as l}from"./MenuList.styled.js";const u=r(((r,u)=>{let{options:a,isMultiSelect:d,showDescription:p,onSelect:f,version:m,onInfiniteScroll:g,onDropdownItemClick:h,useDefaultCursor:b,focusedIndex:I=-1}=r;const v=o(null),D=o(null),j=s((()=>{v.current&&v.current.disconnect(),v.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==g||g())})),D.current&&v.current.observe(D.current)}),[g]);i((()=>(j(),()=>{v.current&&v.current.disconnect()})),[j,a]);const w=new Map;let S=-1;return a.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||(S++,w.set(e,S))}));else{const n=e;n.disabled||(S++,w.set(n,S))}})),e(n,{children:a.map(((n,r)=>{const o=r===a.length-1;if(n.options){const s=n;return t("div",Object.assign({style:{marginTop:"2.0"===m?2:0}},{children:[t(l,Object.assign({version:m},{children:[s.leadingIcon?e("span",Object.assign({style:{marginRight:8}},{children:s.leadingIcon})):null,s.label]})),s.options.map(((n,t)=>{const o=w.get(n),i=o===I&&!n.disabled;return e(c,{version:m,last:t===s.options.length-1,onSelect:f,showDescription:p,onDropdownItemClick:h,isMultiSelect:d,option:n,useDefaultCursor:b,isFocused:i,dataIndex:o,ref:e=>{u&&"object"==typeof u&&u.current&&e&&e&&e&&e&&(u.current[r]=e)}},`${r}-${t}`)})),o?e("span",{ref:D}):null]}),r)}const s=n,i=w.get(s),g=i===I&&!s.disabled;return t("div",{children:[e(c,{version:m,last:o,onSelect:f,showDescription:p,onDropdownItemClick:h,isMultiSelect:d,option:s,useDefaultCursor:b,isFocused:g,dataIndex:i,ref:e=>{u&&"object"==typeof u&&u.current&&e&&(u.current[r]=e)}},s.value),o?e("span",{ref:D}):null]},r)}))})}));export{u as MenuList};
|
package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{ApplicationType as o}from"@bikdotai/bik-models/growth/models/bik-store";import i from"../../../assets/icons/arrow_back.svg.js";import n from"../../../assets/icons/chevronLeft.svg.js";import r from"../../../assets/icons/chevronRight.svg.js";import a from"../../../assets/icons/PlusIcon.js";import{cloneDeep as d}from"lodash";import{useState as s,useEffect as c}from"react";import{Button as u}from"../../button/Button.js";import{IconButton as p}from"../../icon-button/IconButton.js";import{ProductPickerModal as m}from"../../product-picker-v2/modal.js";import{ScreenName as v}from"../../product-picker-v2/type.js";import{Badge as h}from"../Badge/index.js";import{useTemplateModalContext as g}from"../context/templateModalContext.js";import f from"./EditWhatsAppTemplateV2.js";import{ProductBox as y}from"./ProductBox.js";import"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as b}from"../../../constants/Theme.js";import"../../curtain/CurtainHelper.js";import"../../variable-picker-v3/model.js";import"../../template-preview/models/TemplateMeta.js";import{POD as j}from"../../template-preview/models/WhatsAppTemplate.js";import"../../template-preview/models/Channels.js";import{isRCSChannel as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as l}from"react/jsx-runtime";import{ApplicationType as o}from"@bikdotai/bik-models/growth/models/bik-store";import i from"../../../assets/icons/arrow_back.svg.js";import n from"../../../assets/icons/chevronLeft.svg.js";import r from"../../../assets/icons/chevronRight.svg.js";import a from"../../../assets/icons/PlusIcon.js";import{cloneDeep as d}from"lodash";import{useState as s,useEffect as c}from"react";import{Button as u}from"../../button/Button.js";import{IconButton as p}from"../../icon-button/IconButton.js";import{ProductPickerModal as m}from"../../product-picker-v2/modal.js";import{ScreenName as v}from"../../product-picker-v2/type.js";import{Badge as h}from"../Badge/index.js";import{useTemplateModalContext as g}from"../context/templateModalContext.js";import f from"./EditWhatsAppTemplateV2.js";import{ProductBox as y}from"./ProductBox.js";import"../../template-preview/TemplatePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreview.js";import"../../template-preview/WhatsApp/WhatsAppLikePreviewV2.js";import{COLORS as b}from"../../../constants/Theme.js";import"../../curtain/CurtainHelper.js";import"../../variable-picker-v3/model.js";import"../../template-preview/models/TemplateMeta.js";import{POD as j}from"../../template-preview/models/WhatsAppTemplate.js";import"../../template-preview/models/Channels.js";import{isRCSChannel as x}from"../../template-preview/helpers/templateMiscHelper.js";import{TitleMedium as C,TitleRegular as I,BodySecondary as k,BodyCaption as w}from"../../TypographyStyle.js";const O=O=>{let{template:P,whatsappSpecificPickerMeta:T,showVariableModal:S,variableListForImage:L,discountCode:B,setDiscountCode:E}=O;var A,M,V,D,F,R,W,$;const{selectedCarouselIndex:q,setTemplate:N,pickerConf:_,isProductCarouselType:z,pod:G,cardCount:H,carouselProducts:K,setCarouselProducts:J,isError:Q,cardImages:U,disableEditVariable:X,onDeleteSelectedProducts:Y,setSelectedCarouselIndex:Z,setVariableCallback:ee,setShowVariablePicker:te,sliderRef:le}=g(),[oe,ie]=s(x(null==P?void 0:P.channel)?"Carousel Cards":-1==q?"First Message (Step 1/2)":z?"Product Carousel "+((null===(M=null===(A=null==P?void 0:P.mapping)||void 0===A?void 0:A.body)||void 0===M?void 0:M.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(D=null===(V=null==P?void 0:P.mapping)||void 0===V?void 0:V.body)||void 0===D?void 0:D.length)?"(Step 2/2)":"")),[ne,re]=s(!1),[ae,de]=s(!1),se=q===(null!=H?H:-1)-1,ce=(null!=q?q:-1)<1;c((()=>{var e,t,l,o;ie(x(null==P?void 0:P.channel)?"Carousel Cards":-1==q?"First Message (Step 1/2)":z?"Product Carousel "+((null===(t=null===(e=null==P?void 0:P.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length)?"(Step 2/2)":""):"Carousel Cards "+((null===(o=null===(l=null==P?void 0:P.mapping)||void 0===l?void 0:l.body)||void 0===o?void 0:o.length)?"(Step 2/2)":""))}),[q]),c((()=>{te(!1)}),[q]);const ue=e=>{null==J||J([{name:"variable",productName:e.actualValue}])};return c((()=>{-1===q&&x(null==P?void 0:P.channel)&&(null==Z||Z(0))}),[q,null==P?void 0:P.channel]),e("div",Object.assign({style:{display:"flex",flexDirection:"column",gap:"16px"}},{children:[e("div",Object.assign({style:{display:"flex",flexDirection:"row",alignItems:"center"}},{children:[!x(null==P?void 0:P.channel)&&null!=q&&q>=0&&!!(null===(R=null===(F=null==P?void 0:P.mapping)||void 0===F?void 0:F.body)||void 0===R?void 0:R.length)&&t(p,{Icon:i,onClick:()=>{null==Z||Z(-1)}}),t(C,Object.assign({style:{marginLeft:10}},{children:oe}))]})),z&&(null!==(W=null==K?void 0:K.length)&&void 0!==W?W:0)>0&&null!=q&&q>=0&&e("div",Object.assign({style:{display:"flex",rowGap:8,marginBottom:16,marginLeft:10,marginRight:10,flexDirection:"column"}},{children:[t(y,{editItem:()=>{1===(null==K?void 0:K.length)&&"variable"===K[0].name?(ee((()=>ue)),te(!0)):re(!ne)},cardBody:1===(null==K?void 0:K.length)&&"variable"===K[0].name?`${K[0].productName}`:`${null==K?void 0:K.length} Products Selected`,hideIcon:1===(null==K?void 0:K.length)&&"variable"===K[0].name,deleteItem:()=>{var e;if(1===(null==K?void 0:K.length)&&"variable"===K[0].name)return void(null==J||J([]));const t=d(Object.assign({},P));t&&(U&&U.length>0?null==U||U.forEach(((e,l)=>{var o;t.components[1].cards[l].components[0].example.header_handle=[null!==(o=U[l])&&void 0!==o?o:"https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})):null===(e=null==t?void 0:t.components[1].cards)||void 0===e||e.forEach(((e,l)=>{t.components[1].cards[l].components[0].example.header_handle=["https://res.cloudinary.com/drqhot9ot/image/upload/v1708753454/fake-product.png"]})),null==N||N(t)),null==J||J([]),null==Y||Y()}}),K&&(null==K?void 0:K.length)>0&&"variable"!=K[0].name&&t(u,{disabled:(null!==($=null==K?void 0:K.length)&&void 0!==$?$:0)<=1,style:{alignSelf:"flex-end"},onClick:()=>{de(!0),re(!0)},buttonText:"Rearrange Products",buttonType:"tertiary"})]})),!X&&z&&0===(null==K?void 0:K.length)&&null!=q&&q>=0&&e(l,{children:[e("div",Object.assign({style:{marginLeft:12}},{children:[t(I,{children:"Product(s)"}),t(k,{children:`Select ${null!=H?H:1} products`})]})),e("div",Object.assign({style:{marginTop:16,marginBottom:16,marginLeft:Q?16:12,marginRight:Q?16:12,flexDirection:"column",display:"flex",alignItems:"center"}},{children:[t(u,{matchParentWidth:!0,style:{flex:1,display:"flex",width:"100%",marginBottom:12,border:Q?`2px dashed ${b.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s)",buttonType:Q?"tertiaryGray":"dashBold",LeadingIcon:()=>t("div",Object.assign({style:{display:"flex",width:18,height:18}},{children:t(a,{width:18,height:18,color:b.content.secondary})})),onClick:e=>{re(!0)}}),G===j.CHATBOT&&e(l,{children:[e("div",Object.assign({style:{display:"flex",flex:1,alignItems:"center",justifyContent:"space-between",flexDirection:"row",width:"100%"}},{children:[t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginRight:8,flex:1}}),t(w,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8,flex:1}})]})),t(u,{matchParentWidth:!0,style:{flex:1,display:"flex",marginTop:12,width:"100%",border:Q?`2px dashed ${b.content.negative}`:void 0},size:"medium",buttonText:"Add Product(s) Variable",buttonType:Q?"tertiaryGray":"dashBold",LeadingIcon:()=>t("div",Object.assign({style:{display:"flex"}},{children:t(a,{width:18,height:18,color:b.content.secondary})})),onClick:e=>{ee((()=>ue)),te(!0)}})]})]})),Q&&t("div",Object.assign({style:{marginLeft:10,marginBottom:16}},{children:t(h,{padding:"8px",errorText:"Please add products"})}))]}),!z&&(null!=q?q:-1)>-1&&e("div",Object.assign({style:{display:"flex",background:b.surface.hovered,alignItems:"center"}},{children:[t(p,{Icon:n,disabled:ce,width:8,height:14,svgStyle:ce?{}:{color:b.content.secondary},onClick:()=>{var e;null===(e=null==le?void 0:le.current)||void 0===e||e.slickPrev(),(null!=q?q:-1)<1||null==Z||Z((e=>e-1))}}),t(I,Object.assign({style:{flex:1,display:"flex",justifyContent:"center"},color:b.content.secondary},{children:`Card ${(null!=q?q:0)+1}/${H}`})),t(p,{Icon:r,width:8,height:14,disabled:se,svgStyle:se?{}:{color:b.content.secondary},onClick:()=>{var e;null===(e=null==le?void 0:le.current)||void 0===e||e.slickNext(),(null!=q?q:-1)>=(null!=H?H:-1)-1||null==Z||Z((e=>e+1))}})]})),t(f,{whatsappSpecificPickerMeta:T,template:P,onTemplateChange:e=>{null==N||N(e)},showVariableModal:S,variableListForImage:L,discountCode:B,setDiscountCode:E}),ne&&_&&t(m,{zIndex:200,startupScreen:ae?v.RearrangeProducts:v.Collections,rearrangeEnabled:!0,storeId:_.storeId,selectedItems:(e=>{if(e.length>0){const t={};for(const l of e){const e=null==l?void 0:l.collectionId,o=l.productId,i=l.variantId;e in t||(t[e]={products:{},name:"",image:"",isSmartCollection:!1}),o in t[e].products||(t[e].products[o]={variants:{},name:(null==l?void 0:l.productName)||"",image:(null==l?void 0:l.productImage)||""}),t[e].products[o].variants[i]={name:(null==l?void 0:l.name)||"",price:"",image:(null==l?void 0:l.image)||"",quantity:l.quantity||0,displayOrder:l.displayOrder}}return t}return{}})(null!=K?K:[]),collectionFetcher:_.fetchCollections,productFetcher:_.fetchProducts,onAdd:(e,t)=>{var l,o,i,n,r,a;de(!1);const s=[];delete e.isCustom;for(const t of Object.keys(e)){const d=e[t].products;if(void 0!==d&&Object.keys(d).length)for(const e of Object.keys(d)){const c=d[e].variants;if(void 0!==c&&Object.keys(c).length)for(const u of Object.keys(c)){const{name:p,image:m,quantity:v,displayOrder:h}=c[u],g={name:p,image:null!==(o=null!=m?m:null===(l=d[e])||void 0===l?void 0:l.image)&&void 0!==o?o:"",quantity:v,variantId:u,productId:e,displayOrder:h,collectionId:t,productName:null!==(n=null===(i=d[e])||void 0===i?void 0:i.name)&&void 0!==n?n:"",productImage:null!==(a=null===(r=d[e])||void 0===r?void 0:r.image)&&void 0!==a?a:""};s.push(g)}}}const c=s.sort(((e,t)=>e.displayOrder-t.displayOrder)),u=s.map((e=>e.image)),p=d(Object.assign({},P));p&&(u.forEach(((e,t)=>{var l;p.components[1].cards[t].components[0].example.header_handle=e?[e]:[null!==(l=null==U?void 0:U[t])&&void 0!==l?l:""]})),null==N||N(p)),null==J||J(c),re(!1)},searchInCollectionFetcher:_.searchInCollection,searchFetcher:_.searchProducts,visible:ne,onClose:()=>{re(!1)},exactLimit:null!=H?H:1,appType:_.appType||o.BIK})]}))};export{O as default};
|
|
@@ -11,6 +11,8 @@ export type ToasterProps = {
|
|
|
11
11
|
subText?: string;
|
|
12
12
|
position?: ToastPosition;
|
|
13
13
|
type?: 'info' | 'success' | 'error' | 'default' | 'warning';
|
|
14
|
+
duration?: number;
|
|
15
|
+
blocking?: boolean;
|
|
14
16
|
closeOnClick?: boolean;
|
|
15
17
|
hideProgressBar?: boolean;
|
|
16
18
|
autoClose?: number | false | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import n from"../../assets/icons/alert_triangle.svg.js";import s from"../../assets/icons/check.svg.js";import i from"../../assets/icons/cross.svg.js";import
|
|
1
|
+
import{jsx as t,Fragment as o,jsxs as e}from"react/jsx-runtime";import n from"../../assets/icons/alert_triangle.svg.js";import s from"../../assets/icons/check.svg.js";import i from"../../assets/icons/cross.svg.js";import r from"../../assets/icons/errorInfo.svg.js";import l from"../../assets/icons/info.svg.js";import c,{useRef as d,useState as a,useEffect as u,useContext as p}from"react";import h from"react-dom";import{cssTransition as g,toast as y,ToastContainer as v}from"react-toastify";import{Button as x}from"../button/Button.js";import{ToasterStyled as b}from"./Toaster.styled.js";import{TitleSmall as f,BodySecondary as T,BodyCaption as B}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";const w=t=>e(T,Object.assign({color:"#9E9E9E",customStyles:{fontWeight:600,fontSize:14,width:25}},{children:[t.duration,"s"]})),C=o=>{const e="default"===o.type?m.content.primary:"success"===o.type?m.content.positive:"error"===o.type?m.content.negative:"warning"===o.type?m.content.warning:m.content.brand,{timerValue:n}=p(k),s=(!o.blocking||-1!==n)&&(o.blocking&&n>0);return t("div",Object.assign({tabIndex:s?-1:0,role:"button",style:{width:n>0?25:20,display:"flex",cursor:s?"not-allowed":"pointer",alignSelf:""+(o.alignTop?"flex-start":"center"),opacity:s?.5:1},onClick:()=>{!s&&o.closeToast&&o.closeToast()},onKeyDown:t=>{"Enter"===t.key&&!s&&o.closeToast&&o.closeToast()}},{children:n>0?t(w,{duration:n}):t(i,{height:20,width:20,color:e})}))},I=n=>{var s,i;const r=m.content.placeholder,{toasterText:l}=p(k);return t(o,{children:e("div",Object.assign({style:{display:"flex",flexGrow:1}},{children:[t("div",Object.assign({style:{flexGrow:1,marginRight:32,display:"flex",alignItems:"center"}},{children:e("div",{children:[n.subText?t(f,Object.assign({color:"inherit"},{children:null!==(s=n.toastText)&&void 0!==s?s:l})):t(T,Object.assign({color:"inherit"},{children:null!==(i=n.toastText)&&void 0!==i?i:l})),n.subText&&t("div",Object.assign({style:{marginTop:2}},{children:t(B,Object.assign({color:m.content.secondary},{children:n.subText}))}))]})})),n.showButton&&t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px",marginRight:{showSecondButton:4,showButton:0}[n.showSecondButton?"showSecondButton":"showButton"]}},{children:t(x,{buttonText:n.buttonText,buttonType:"tertiaryGray",color:m.content.secondary,onClick:n.onButtonClick})})),n.showSecondButton&&t("div",Object.assign({style:{display:"flex",flexDirection:"column",alignSelf:"center",padding:"6px 4px"}},{children:t(x,{buttonText:n.secondButtonText,buttonType:"tertiaryGray",color:m.content.secondary,onClick:n.onSecondButtonClick})})),n.showButton||n.showSecondButton?t("div",{style:{height:28,alignSelf:"center",marginLeft:8,marginRight:8,borderRight:`1px solid ${r}`,borderRadius:1}}):null]}))})},j=o=>{const e=d(o.toastId||"default-toast"),[i,c]=a(o.text),[p,x]=a(o.duration||-1),f=g({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit"}),T="default"===o.type?null:"success"===o.type?t(s,{width:20,height:20,color:m.content.positive}):"error"===o.type?t(r,{width:20,height:20,color:m.content.negative}):"warning"===o.type?t(n,{width:20,height:20,color:m.content.warning}):t(l,{width:20,height:20,color:m.content.brand});u((()=>{e.current&&e.current===o.toastId?(c(o.text),y.update(e.current,{autoClose:o.autoClose})):e.current&&e.current!==o.toastId&&B(o.text)}),[o.toastId,o.text]),u((()=>{if(!o.duration)return;x(o.duration);const t=setInterval((()=>{x((o=>{const e=o-1;return e<=0?(clearInterval(t),-1):e}))}),1e3);return()=>clearInterval(t)}),[o.duration,o.toastId]);const B=n=>{var s,i,r,l,c,d,a,u,p,h,g,v,x,b,B,m;void 0!==o.hideLeftIcon||o.leftIcon?y(t(I,{toastText:n,type:o.type||"info",buttonText:null===(s=o.buttonProps)||void 0===s?void 0:s.buttonText,secondButtonText:null===(i=o.secondButtonProps)||void 0===i?void 0:i.buttonText,showButton:null===(r=o.buttonProps)||void 0===r?void 0:r.showButton,showSecondButton:null===(l=o.secondButtonProps)||void 0===l?void 0:l.showButton,onButtonClick:null===(c=o.buttonProps)||void 0===c?void 0:c.onButtonClick,onSecondButtonClick:null===(d=o.secondButtonProps)||void 0===d?void 0:d.onButtonClick,subText:o.subText}),{onClose:o.onCloseToast?o.onCloseToast:()=>({}),icon:!0!==o.hideLeftIcon&&(o.leftIcon?o.leftIcon:"default"!==o.type&&t("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:T}))),type:o.type,closeButton:t(C,{type:o.type||"default",alignTop:!(!o.subText||(null===(a=o.buttonProps)||void 0===a?void 0:a.showButton)||(null===(u=o.secondButtonProps)||void 0===u?void 0:u.showButton)),blocking:o.blocking}),toastId:o.toastId||"default-toast",transition:f}):e.current=y(t(I,{toastText:n,type:o.type||"info",buttonText:null===(p=o.buttonProps)||void 0===p?void 0:p.buttonText,secondButtonText:null===(h=o.secondButtonProps)||void 0===h?void 0:h.buttonText,showButton:null===(g=o.buttonProps)||void 0===g?void 0:g.showButton,showSecondButton:null===(v=o.secondButtonProps)||void 0===v?void 0:v.showButton,onButtonClick:null===(x=o.buttonProps)||void 0===x?void 0:x.onButtonClick,onSecondButtonClick:null===(b=o.secondButtonProps)||void 0===b?void 0:b.onButtonClick,subText:o.subText}),{onClose:o.onCloseToast?o.onCloseToast:()=>({}),type:o.type,icon:"default"!==o.type&&t("div",Object.assign({style:{display:"flex",alignItems:"flex-start"}},{children:T})),closeButton:t(C,{type:o.type||"default",alignTop:!(!o.subText||(null===(B=o.buttonProps)||void 0===B?void 0:B.showButton)||(null===(m=o.secondButtonProps)||void 0===m?void 0:m.showButton)),blocking:o.blocking}),toastId:o.toastId||"default-toast",transition:f})};return u((()=>{B()}),[]),h.createPortal(t(b,Object.assign({width:o.width,height:o.height,zIndex:o.zIndex,isSubTextIncluded:!!o.subText,type:o.type},{children:t(k.Provider,Object.assign({value:{toasterText:i,timerValue:p}},{children:t(v,{position:o.position||"top-right",closeOnClick:o.closeOnClick||!1,hideProgressBar:o.hideProgressBar||!1,draggable:!1,autoClose:o.autoClose||!1,theme:"colored"})}))})),document.body)},k=c.createContext({toasterText:"",timerValue:-1});export{j as Toaster};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import c from"@emotion/styled/base";import{COLORS as t}from"../../constants/Theme.js";import{ComponentZindex as
|
|
1
|
+
import c from"@emotion/styled/base";import{COLORS as t}from"../../constants/Theme.js";import{ComponentZindex as d}from"../../constants/zindex.js";const b=c("div","production"===process.env.NODE_ENV?{target:"e1tdeuzc0"}:{target:"e1tdeuzc0",label:"ToasterStyled"})("--toastify-color-light:#fff;--toastify-color-dark:#121212;--toastify-text-color-success:",t.content.primary,";--toastify-text-color-error:",t.content.primary,";--toastify-text-color-warning:",t.content.primary,";--toastify-text-color-info:",t.content.primary,";--toastify-color-info:",t.background.brandLight,";--toastify-color-success:",t.background.positive.light,";--toastify-color-error:",t.background.negative.light,";--toastify-color-warning:",t.background.warning.light,";--toastify-text-color-light:",t.content.primary,";--toastify-toast-width:fit-content;--toastify-toast-min-height:",(c=>c.height||(c.isSubTextIncluded?"70px":"56px")),";--toastify-toast-max-height:",(c=>c.height||"fit-content"),";font-family:inherit;z-index:",(c=>c.zIndex||d.TOASTER),";.custom-position{position:relative;}.Toastify__toast-container{padding:0;}.Toastify__toast--success{border:1px solid ",t.stroke.positive.lightAlt,";}.Toastify__toast--info{border:1px solid ",t.stroke.brandLightAlt,";}.Toastify__toast--default{border:1px solid ",t.stroke.primary,";}.Toastify__toast--error{border:1px solid ",t.stroke.negative.lightAlt,";}.Toastify__toast--warning{border:1px solid ",t.stroke.warning.lightAlt,";}.Toastify__toast{padding:",(c=>c.isSubTextIncluded?"16px":"12px"),";max-width:",(c=>c.width),";border-radius:8px;}.Toastify__progress-bar{height:4px;}.Toastify__close-button{display:block;margin:auto;}.Toastify__toast-icon{align-self:center;margin-inline-end:12px;height:",(c=>c.isSubTextIncluded?"38px":"20px"),";}.Toastify__toast-body{padding:0;}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--default{background:",t.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info{background:",t.content.brand,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:",t.content.warning,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success{background:",t.content.positive,";}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:",t.content.negative,";}.Toastify__toast-body>div:last-child{display:flex;}.Toastify__slide-enter{animation:slideIn 1s ease forwards,bounce cubic-bezier(0.68, -0.55, 0.27, 1.55) 0.5s both;}.Toastify__slide-exit{animation:slideOut 0.5s ease-in-out forwards;}@keyframes bounce{0%,20%,50%,80%,100%{transform:translateY(0);}40%{transform:translateX(-20px);}60%{transform:translateX(20px);}}@keyframes slideIn{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes slideOut{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvYXN0ZXIuc3R5bGVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHd0MiLCJmaWxlIjoiVG9hc3Rlci5zdHlsZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IENvbXBvbmVudFppbmRleCB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvemluZGV4XCI7XHJcbmV4cG9ydCBjb25zdCBUb2FzdGVyU3R5bGVkID0gc3R5bGVkLmRpdiBgXG5cdC0tdG9hc3RpZnktY29sb3ItbGlnaHQ6ICNmZmY7XG5cdC0tdG9hc3RpZnktY29sb3ItZGFyazogIzEyMTIxMjtcblx0LS10b2FzdGlmeS10ZXh0LWNvbG9yLXN1Y2Nlc3M6ICR7Q09MT1JTLmNvbnRlbnQucHJpbWFyeX07XG5cdC0tdG9hc3RpZnktdGV4dC1jb2xvci1lcnJvcjogJHtDT0xPUlMuY29udGVudC5wcmltYXJ5fTtcblx0LS10b2FzdGlmeS10ZXh0LWNvbG9yLXdhcm5pbmc6ICR7Q09MT1JTLmNvbnRlbnQucHJpbWFyeX07XG5cdC0tdG9hc3RpZnktdGV4dC1jb2xvci1pbmZvOiAke0NPTE9SUy5jb250ZW50LnByaW1hcnl9O1xuXHQtLXRvYXN0aWZ5LWNvbG9yLWluZm86ICR7Q09MT1JTLmJhY2tncm91bmQuYnJhbmRMaWdodH07XG5cdC0tdG9hc3RpZnktY29sb3Itc3VjY2VzczogJHtDT0xPUlM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gcG9zaXRpb24gKi9cblx0XHRcdG9wYWNpdHk6IDE7XG5cdFx0fVxuXHRcdDEwMCUge1xuXHRcdFx0dHJhbnNmb3JtOiB0cmFuc2xhdGVYKDEwMCUpOyAvKiBTbGlkZSBvdXQgdG8gdGhlIHJpZ2h0ICovXG5cdFx0XHRvcGFjaXR5OiAwO1xuXHRcdH1cblx0fVxuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9VG9hc3Rlci5zdHlsZWQuanMubWFwIl19 */"));export{b as ToasterStyled};
|
|
@@ -69,6 +69,8 @@ export declare const COLORS: {
|
|
|
69
69
|
blue: {
|
|
70
70
|
light: string;
|
|
71
71
|
};
|
|
72
|
+
white: string;
|
|
73
|
+
lightbrand: string;
|
|
72
74
|
};
|
|
73
75
|
icon: {
|
|
74
76
|
placeholder: string;
|
|
@@ -360,6 +362,8 @@ export declare const DEFAULT_THEME: {
|
|
|
360
362
|
blue: {
|
|
361
363
|
light: string;
|
|
362
364
|
};
|
|
365
|
+
white: string;
|
|
366
|
+
lightbrand: string;
|
|
363
367
|
};
|
|
364
368
|
icon: {
|
|
365
369
|
placeholder: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",100:"#F3EDF9",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"},bikAi:{500:"linear-gradient(93deg, #FF166A 0.37%, #FB5F08 100%)",100:"linear-gradient(93deg, #FEBAD2 0.37%, #FDD1B9 100%)",50:"linear-gradient(93deg, #FFE6EE 0.37%, #FFF0E7 100%)"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],pureWhite:e.grayscale.white,brandTint:e.brand[100],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"}},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70],ai:e.bikAi[500],aiLight:e.bikAi[50]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F",ai:e.bikAi[500]},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"},ai:{lightAlt:"#FEBAD2",vibrant:"#F23275"}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};export{e as BASE_COLORS,t as COLORS,n as DEFAULT_THEME,i as FONTS};
|
|
1
|
+
const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",100:"#F3EDF9",50:"#EFE6F9",10:"#F9F3FF"},grayscale:{900:"#212121",700:"#616161",500:"#9E9E9E",400:"#BDBDBD",200:"#E0E0E0",100:"#F0F0F0",70:"#F7F7F7",50:"#FAFAFA",white:"#FFFFFF",alpha:"#00000088"},negative:{900:"#B92321",700:"#D53434",100:"#FFCED4",50:"#FFEBEF"},warning:{900:"#99631B",500:"#FEC02D",100:"#FFEABE",50:"#FFF7E5"},positive:{900:"#00580E",700:"#1A872C",100:"#C3E4C4",50:"#E6F4E7"},bikAi:{500:"linear-gradient(93deg, #FF166A 0.37%, #FB5F08 100%)",100:"linear-gradient(93deg, #FEBAD2 0.37%, #FDD1B9 100%)",50:"linear-gradient(93deg, #FFE6EE 0.37%, #FFF0E7 100%)"}},t={background:{inactive:e.grayscale[200],base:e.grayscale[100],inverse:e.brand[900],inverseLight:e.brand[800],brand:e.brand[500],brandLight:e.brand[50],brandVeryLight:e.brand[10],pureWhite:e.grayscale.white,brandTint:e.brand[100],negative:{vibrant:e.negative[700],light:e.negative[50]},warning:{vibrant:e.warning[500],light:e.warning[50]},positive:{vibrant:e.positive[700],light:e.positive[50]},blue:{light:"#E5F2FF"},white:e.grayscale.white,lightbrand:"#F3EDF9"},icon:{placeholder:"#9E9E9E"},scrim:{standard:"#00000099"},surface:{standard:e.grayscale.white,subdued:e.grayscale[50],hovered:e.grayscale[100],grey:e.grayscale[70],ai:e.bikAi[500],aiLight:e.bikAi[50]},content:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],inactive:e.grayscale[400],brand:e.brand[500],primaryInverse:e.grayscale.white,secondaryInverse:"#ffffffcc",negative:e.negative[900],warning:e.warning[900],positive:e.positive[900],blue:"#28458F",ai:e.bikAi[500]},stroke:{primary:e.grayscale[200],brand:e.brand[500],negative:{lightAlt:e.negative[100],vibrant:e.negative[700]},warning:{lightAlt:e.warning[100],vibrant:e.warning[500]},positive:{lightAlt:e.positive[100],vibrant:e.positive[700]},brandLightAlt:"#DDCCF0",blue:{lightAlt:"#C3D5E5"},ai:{lightAlt:"#FEBAD2",vibrant:"#F23275"}},special:{whatsapp:{brand:"#25D366",gradient:"linear-gradient(360deg, #20B038 0%, #60D66A 100%)",dark:"#455A64",gradientArr:["#20B038","#60D66A"]},brand:{google:"#DD4B39",facebook:"#1877F2"}},text:{primary:e.grayscale[900],secondary:e.grayscale[700],placeholder:e.grayscale[500],disabled:e.grayscale[400],white:e.grayscale.white,brand:e.brand[500],altPrimary:e.brand[900],altSecondary:e.brand[800]}},i={display:{fontWeight:"400",fontSize:32,lineHeight:40,letterSpacing:0},titleXLarge:{fontWeight:"600",fontSize:32,lineHeight:40,letterSpacing:0},titleLarge:{fontWeight:"600",fontSize:28,lineHeight:40,letterSpacing:0},titleMedium:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},titleRegular:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},titleSmall:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},bodyPrimary:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodyLarge:{fontWeight:"400",fontSize:20,lineHeight:28,letterSpacing:0},bodySecondary:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},caption:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},tiny:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},subHeading:{fontWeight:"600",fontSize:10,lineHeight:12,letterSpacing:0},title1:{fontWeight:"600",fontSize:24,lineHeight:32,letterSpacing:0},title1Mobile:{fontWeight:"600",fontSize:20,lineHeight:30,letterSpacing:0},title2:{fontWeight:"600",fontSize:20,lineHeight:28,letterSpacing:0},title2Mobile:{fontWeight:"600",fontSize:18,lineHeight:24,letterSpacing:0},title3:{fontWeight:"600",fontSize:16,lineHeight:24,letterSpacing:0},title3Mobile:{fontWeight:"500",fontSize:14,lineHeight:20,letterSpacing:0},title4:{fontWeight:"400",fontSize:14,lineHeight:20,letterSpacing:0},textPlaceholder:{fontWeight:"400",fontSize:12,lineHeight:16,letterSpacing:0},title4Mobile:{fontWeight:"400",fontSize:10,lineHeight:16,letterSpacing:0},bodyRegularMobile:{fontWeight:"400",fontSize:14,lineHeight:18,letterSpacing:0},bodyRegular:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},bodySmall:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0},buttonLarge:{fontWeight:"600",fontSize:16,lineHeight:20,letterSpacing:0},buttonRegular:{fontWeight:"600",fontSize:14,lineHeight:20,letterSpacing:0},captionMobile:{fontWeight:"500",fontSize:10,lineHeight:12,letterSpacing:0},captionBold:{fontWeight:"700",fontSize:12,lineHeight:16,letterSpacing:0},text1Bold:{fontWeight:"700",fontSize:10,lineHeight:14,letterSpacing:0},toast:{fontWeight:"400",fontSize:16,lineHeight:24,letterSpacing:0},toastMobile:{fontWeight:"400",fontSize:10,lineHeight:12,letterSpacing:0}},n={colorsV2:t,fonts:i};export{e as BASE_COLORS,t as COLORS,n as DEFAULT_THEME,i as FONTS};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bikdotai/bik-component-library",
|
|
3
|
-
"version": "0.0.742-beta.
|
|
3
|
+
"version": "0.0.742-beta.40",
|
|
4
4
|
"description": "Bik Component Library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -159,10 +159,10 @@
|
|
|
159
159
|
"@emotion/react": "^11.0.0",
|
|
160
160
|
"@emotion/styled": "^11.0.0",
|
|
161
161
|
"date-fns": "^2.29.3",
|
|
162
|
-
"react": "^16.8.0 || ^17 || ^18",
|
|
162
|
+
"react": "^16.8.0 || ^17 || ^18 || ^19",
|
|
163
163
|
"react-calendar": "^3.7.0",
|
|
164
164
|
"react-chips": "^0.8.0",
|
|
165
|
-
"react-dom": "^16.8.0 || ^17 || ^18",
|
|
165
|
+
"react-dom": "^16.8.0 || ^17 || ^18 || ^19",
|
|
166
166
|
"react-redux": "^7.2.6",
|
|
167
167
|
"redux": "^4.1.2",
|
|
168
168
|
"styled-components": "^5.3.3"
|