@bikdotai/bik-component-library 0.0.742-beta.70 → 0.0.742-beta.8
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/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/cjs/components/BikGiftedChat/Bubble/types.d.ts +0 -13
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.d.ts +0 -2
- package/dist/cjs/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/cjs/components/BikGiftedChat/GiftedChat/types.d.ts +2 -60
- package/dist/cjs/components/TypographyStyle.d.ts +0 -8
- package/dist/cjs/components/TypographyStyle.js +13 -14
- 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/list-item/themes.d.ts +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/cjs/components/toaster/Toaster.d.ts +0 -2
- 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 +0 -5
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/Bubble.js +1 -1
- package/dist/esm/components/BikGiftedChat/Bubble/types.d.ts +0 -13
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.d.ts +0 -2
- package/dist/esm/components/BikGiftedChat/GiftedChat/Day.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/GiftedChat.js +1 -1
- package/dist/esm/components/BikGiftedChat/GiftedChat/types.d.ts +2 -60
- package/dist/esm/components/TypographyStyle.d.ts +0 -8
- package/dist/esm/components/TypographyStyle.js +12 -13
- 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/list-item/themes.d.ts +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppCarouselTemplateV2.js +1 -1
- package/dist/esm/components/toaster/Toaster.d.ts +0 -2
- 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 +0 -5
- package/dist/esm/constants/Theme.js +1 -1
- package/package.json +3 -3
- package/dist/cjs/components/BikGiftedChat/Bubble/types.js +0 -1
- package/dist/esm/components/BikGiftedChat/Bubble/types.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const e={brand:{900:"#28034E",800:"#4B1583",500:"#731DCF",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],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 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import n,{useMemo as t,useCallback as o}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{useWindowSize as a}from"../../../hooks/useWindowSize.js";import{MESSAGE_CHANNELS as r}from"../GiftedChat/types.js";import{Constants as d,isStringifiedArray as s}from"../GiftedChat/utils.js";const c=n=>{var c,u,v,g;const{currentMessage:m,position:f,renderMessageText:h,renderTicks:y,renderTime:b,renderCustomView:p,isCustomViewBottom:T,isUnsatisfactoryMessageFn:j,messagesGroupedByAiTraceId:I}=n;console.log("sample");const x=a(),k=m,A=t((()=>k.category===d.ChatActivity.Category.ACTIVITY&&k.activityType===d.ChatActivity.Type.PRIVATE_NOTE),[k.category,k.activityType]),C=t((()=>{const[e,i]=s(null==k?void 0:k.message);return e&&i&&Array.isArray(i)}),[null==k?void 0:k.message]),O=t((()=>{var e,i,n;const t={borderRadius:8,minHeight:20,margin:0,flexGrow:x?1:0},o=(null==k?void 0:k.channelId)===r.GMAIL||(null==k?void 0:k.channelName)===r.GMAIL,a=(null==k?void 0:k.channelId)===r.SMTP||(null==k?void 0:k.channelName)===r.SMTP;let d={};if("left"===f)d=Object.assign(Object.assign({},x||o||a?{maxWidth:"100%"}:{}),A?{background:(null===(e=null==k?void 0:k.meta)||void 0===e?void 0:e.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{backgroundColor:(null==k?void 0:k.isPrivateMail)?l.background.blue.light:l.surface.hovered});else if("right"===f){const e=j&&j({aiTraceId:null===(i=k.eventProperties)||void 0===i?void 0:i.aiTraceId,messagesGroupedByAiTraceId:I});d=Object.assign(Object.assign({backgroundColor:"failed"===k.status||e?l.background.negative.light:l.background.brandVeryLight},A?{background:(null===(n=null==k?void 0:k.meta)||void 0===n?void 0:n.aiUsed)?"linear-gradient(90deg, #ffe6ee 0%, #fff0e7 100%)":l.background.warning.light}:{}),!x&&C?{maxWidth:500}:{})}return Object.assign(Object.assign({},t),d)}),[null==k?void 0:k.channelId,null==k?void 0:k.channelName,null===(c=null==k?void 0:k.meta)||void 0===c?void 0:c.aiUsed,null==k?void 0:k.status,null===(u=null==k?void 0:k.eventProperties)||void 0===u?void 0:u.aiTraceId,f,x,A,C,j,I,null==k?void 0:k.isPrivateMail]),M=o((()=>e("div",{children:[!T&&(null==p?void 0:p(n)),null==h?void 0:h(n),T&&(null==p?void 0:p(n))]})),[T,p,h,n]);return i("div",Object.assign({style:{display:"flex",marginTop:6,marginBottom:(null===(g=null===(v=null==m?void 0:m.messageInformation)||void 0===v?void 0:v.reactions)||void 0===g?void 0:g.length)>0?24:6,flexGrow:x?1:0}},{children:i("div",Object.assign({style:O},{children:e("div",{children:[i("div",Object.assign({id:m.chatActivityId||`message-${m.psqlId}`},{children:M()})),e("div",Object.assign({style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",marginLeft:"32px"}},{children:[null==b?void 0:b(n),null==y?void 0:y(m)]}))]})}))}))},u=n.memo(c);export{u as Bubble,u as default};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IMessage, User } from '../types';
|
|
3
|
-
export declare enum GiftedChatAppType {
|
|
4
|
-
Bik = "bik",
|
|
5
|
-
Manifest = "manifest"
|
|
6
|
-
}
|
|
7
3
|
export interface BubbleProps<TMessage extends IMessage = IMessage> {
|
|
8
4
|
currentMessage: TMessage;
|
|
9
5
|
previousMessage?: TMessage;
|
|
@@ -26,13 +22,4 @@ export interface BubbleProps<TMessage extends IMessage = IMessage> {
|
|
|
26
22
|
messagesGroupedByAiTraceId?: any;
|
|
27
23
|
}) => boolean;
|
|
28
24
|
messagesGroupedByAiTraceId?: any;
|
|
29
|
-
containerStyle?: {
|
|
30
|
-
left?: React.CSSProperties;
|
|
31
|
-
right?: React.CSSProperties;
|
|
32
|
-
} | React.CSSProperties;
|
|
33
|
-
bubbleStyles?: {
|
|
34
|
-
left?: React.CSSProperties;
|
|
35
|
-
right?: React.CSSProperties;
|
|
36
|
-
} | React.CSSProperties;
|
|
37
|
-
appType?: GiftedChatAppType;
|
|
38
25
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { GiftedChatAppType } from '../Bubble/types';
|
|
3
2
|
export interface DayProps {
|
|
4
3
|
createdAt?: Date | number | string;
|
|
5
4
|
dateFormat?: string;
|
|
@@ -11,7 +10,6 @@ export interface DayProps {
|
|
|
11
10
|
lastWeek?: string;
|
|
12
11
|
sameElse?: string;
|
|
13
12
|
};
|
|
14
|
-
appType?: GiftedChatAppType;
|
|
15
13
|
}
|
|
16
14
|
export declare const Day: React.NamedExoticComponent<DayProps>;
|
|
17
15
|
export default Day;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{startOfDay as r,isSameYear as n,format as o,differenceInDays as a}from"date-fns";import s,{useMemo as i}from"react";import{COLORS as l}from"../../../constants/Theme.js";import{BodyCaption as d}from"../../TypographyStyle.js";const p=s=>{let{createdAt:p,dateFormat:m="D MMMM YY",dateFormatCalendar:y}=s;const c=i((()=>{if(null==p)return null;const e=r(new Date);let t;if("number"==typeof p)t=r(new Date(p));else if(p instanceof Date)t=r(p);else{if("string"!=typeof p)return null;t=r(new Date(p))}if(!n(e,t))return o(t,"EEEE, d MMMM yy");const s=a(e,t);return s<1?(null==y?void 0:y.sameDay)?y.sameDay.replace(/\[|\]/g,""):"Today":1===s?"Yesterday":o(t,"EEEE, d MMMM yy")}),[p,m,y]);return c?e("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",margin:"12px 0px 12px 8px"}},{children:[t("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}}),t("div",Object.assign({style:{border:`1px solid ${l.stroke.primary}`,borderRadius:"16px",padding:"4px 12px"}},{children:t(d,Object.assign({style:{color:l.content.secondary}},{children:c}))})),t("div",{style:{flex:1,height:"1px",backgroundColor:l.stroke.primary}})]})):null},m=s.memo(p);export{m as Day,m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as r,Fragment as t,jsxs as
|
|
1
|
+
import{__rest as e}from"../../../_virtual/_tslib.js";import{jsx as r,Fragment as t,jsxs as s}from"react/jsx-runtime";import i,{forwardRef as n,useRef as o,useMemo as a,useImperativeHandle as l,useCallback as d}from"react";import{COLORS as g}from"../../../constants/Theme.js";import{useWindowSize as c}from"../../../hooks/useWindowSize.js";import{BodySecondary as u}from"../../TypographyStyle.js";import{Day as m}from"./Day.js";import{getMessagePlacement as p,shouldCenterAlign as v}from"./messageHelpers.js";import{useScrollToBottom as h,useInitialMountScroll as f,useScrollCleanup as y,useRestoreScrollPosition as b,useAutoScrollOnNewMessages as j,useResizeObserverForFirstMessage as x,useScrollHandler as O}from"./scrollHooks.js";import{MESSAGE_CHANNELS as A}from"./types.js";import{normalizeRef as T,isSameDay as w,Constants as M,TOP_THRESHOLD as _}from"./utils.js";var k=n(((n,k)=>{var C;const E=n||{},{messages:S=[],user:I,renderBubble:L,renderAvatar:B,renderDay:R,renderLoading:D,renderChatEmpty:P,listViewProps:$={},renderAvatarOnTop:F=!1,showUserAvatar:G=!1,showAvatarForEveryMessage:U=!1,inverted:V=!1,messageIdGenerator:H,topThreshold:W=_,apptype:N}=E,Y=e(E,["messages","user","renderBubble","renderAvatar","renderDay","renderLoading","renderChatEmpty","listViewProps","renderAvatarOnTop","showUserAvatar","showAvatarForEveryMessage","inverted","messageIdGenerator","topThreshold","apptype"]);console.log(" ---- GiftedChat apptype:",N);const z=c(),X=o(null),q=T($.ref||k,X),J=o({isInitialMount:!0,isUserScrolling:!1,isLoadingOldMessages:!1,isAtBottom:!0,hasTriggeredEndReached:!1,lastMessagesLength:null!==(C=null==S?void 0:S.length)&&void 0!==C?C:0,previousScrollHeight:0,previousScrollTop:0,scrollTimeout:null}),K=a((()=>S&&0!==S.length?[...S].reverse():[]),[S]),Q=h(q,J);l(k,(()=>q.current)),f(q,J,K.length,Q),y(J),b(q,J,K.length),j(q,J,S.length,Q),x(null==S?void 0:S[0],J,Q,H);const Z=O(J,$.onEndReached,$.onScroll,W),ee=d((e=>{var r;return Boolean(e&&I&&(null===(r=e.user)||void 0===r?void 0:r._id)===I._id)}),[I]),re=d(((e,r)=>!!G&&(!!U||(!r||r.user._id!==e.user._id))),[G,U]),te=d(((e,t,s)=>{const i=ee(e)?"right":"left",n=Object.assign({currentMessage:e,previousMessage:t,nextMessage:s,position:i,user:I},Y);return L?L(n):r("div",Object.assign({style:Object.assign(Object.assign({maxWidth:"manifest"===N?"50%":"70%",width:"fit-content"},"manifest"===N?{minWidth:"130px"}:{}),{padding:"8px 12px",borderRadius:"manifest"===N?16:4,border:"left"===i&&"manifest"===N?"1px solid rgb(224, 224, 224)":"none",backgroundColor:"right"===i?"manifest"===N?g.background.lightbrand:g.background.brandLight:"manifest"===N?g.background.white:g.background.inactive,color:g.content.primary,wordBreak:"break-word"})},{children:r(u,{children:e.text})}))}),[ee,I,L,Y]),se=d(((e,r,t)=>{if(!re(e,t))return null;const s=ee(e)?"right":"left";return B?B({currentMessage:e,previousMessage:r,nextMessage:t,position:s,user:I,renderAvatarOnTop:F,showUserAvatar:G,showAvatarForEveryMessage:U}):null}),[re,ee,I,F,G,U,B]);return S&&0!==S.length?s("div",Object.assign({ref:q,style:Object.assign({flex:1,overflowY:"auto",overflowX:"hidden",display:"flex",flexDirection:"column"},$.style),onScroll:Z},{children:[r("div",{style:{flex:"1 0 auto"}}),r("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:"0 0 auto"}},{children:K.map(((e,t)=>{var n,o,a,l,d;const g=ee(e)?"right":"left",c=K[t-1],u=K[t+1],h=!w(e,c),f=p(e,g),y=v(e),b=(null==e?void 0:e.channelId)===A.SMTP||(null==e?void 0:e.channelName)===A.SMTP,j=e.category===M.ChatActivity.Category.ACTIVITY&&e.activityType===M.ChatActivity.Type.PRIVATE_NOTE;return s(i.Fragment,{children:[h&&(R?R({createdAt:e.createdAt}):r(m,{createdAt:e.createdAt})),s("div",Object.assign({style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},z?{margin:"0 4px"}:{}),y?{}:{display:"flex"}),z||2!==(null===(n=null==e?void 0:e.user)||void 0===n?void 0:n._id)?{marginRight:8}:{marginLeft:8}),b&&!j&&z?{marginLeft:8,marginRight:8}:{}),{justifyContent:f,marginBottom:8})},{children:[!z&&"left"===g&&r("div",Object.assign({style:{margin:"0 8px"}},{children:se(e,c,u)})),r("div",Object.assign({id:`message-bubble-${null!==(o=e._id)&&void 0!==o?o:`${t}-${null!==(a=null==H?void 0:H())&&void 0!==a?a:"id"}`}`,style:z&&b?{display:"flex",flexGrow:1}:{}},{children:te(e,c,u)})),!z&&"right"===g&&r("div",Object.assign({style:{margin:"0 8px"}},{children:se(e,c,u)}))]}))]},null!==(l=e._id)&&void 0!==l?l:`${t}-${null!==(d=null==H?void 0:H())&&void 0!==d?d:"id"}`)}))}))]})):P?r(t,{children:P()}):null}));export{k as default};
|
|
@@ -1,136 +1,78 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BubbleProps
|
|
2
|
+
import { BubbleProps } from '../Bubble/types';
|
|
3
3
|
import { IMessage, LeftRightStyle, User } from '../types';
|
|
4
4
|
export interface ListViewProps {
|
|
5
|
-
/** Custom styles for the container. */
|
|
6
5
|
style?: React.CSSProperties;
|
|
7
|
-
/** Callback when end of list is reached. */
|
|
8
6
|
onEndReached?: () => void;
|
|
9
|
-
/** Threshold for triggering end reached. */
|
|
10
7
|
onEndReachedThreshold?: number;
|
|
11
|
-
/** Scroll event handler. */
|
|
12
8
|
onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
13
|
-
/** Ref for the scrollable container. */
|
|
14
9
|
ref?: React.RefObject<HTMLDivElement> | React.MutableRefObject<HTMLDivElement | null>;
|
|
15
10
|
}
|
|
16
11
|
export interface AvatarProps<TMessage extends IMessage = IMessage> {
|
|
17
|
-
/** The current message for the avatar. */
|
|
18
12
|
currentMessage: TMessage;
|
|
19
|
-
/** The previous message. */
|
|
20
13
|
previousMessage?: TMessage;
|
|
21
|
-
/** The next message. */
|
|
22
14
|
nextMessage?: TMessage;
|
|
23
|
-
/** Position of the avatar ('left' or 'right'). */
|
|
24
15
|
position: 'left' | 'right';
|
|
25
|
-
/** The user object. */
|
|
26
16
|
user: User;
|
|
27
|
-
/** Whether to render avatar on top. */
|
|
28
17
|
renderAvatarOnTop?: boolean;
|
|
29
|
-
/** Whether to show user avatar. */
|
|
30
18
|
showUserAvatar?: boolean;
|
|
31
|
-
/** Show avatar for every message. */
|
|
32
19
|
showAvatarForEveryMessage?: boolean;
|
|
33
|
-
/** Custom styles for avatar image. */
|
|
34
20
|
imageStyle?: LeftRightStyle<React.CSSProperties>;
|
|
35
|
-
/** Custom styles for avatar container. */
|
|
36
21
|
containerStyle?: LeftRightStyle<React.CSSProperties>;
|
|
37
22
|
[key: string]: any;
|
|
38
23
|
}
|
|
39
24
|
export interface DayProps {
|
|
40
|
-
/** Date/time for the separator. */
|
|
41
25
|
createdAt?: Date | number | string;
|
|
42
|
-
/** Format for displaying the date. */
|
|
43
26
|
dateFormat?: string;
|
|
44
|
-
/** Calendar format options. */
|
|
45
27
|
dateFormatCalendar?: {
|
|
46
|
-
/** Format for same day. */
|
|
47
28
|
sameDay?: string;
|
|
48
|
-
/** Format for next day. */
|
|
49
29
|
nextDay?: string;
|
|
50
|
-
/** Format for next week. */
|
|
51
30
|
nextWeek?: string;
|
|
52
|
-
/** Format for last day. */
|
|
53
31
|
lastDay?: string;
|
|
54
|
-
/** Format for last week. */
|
|
55
32
|
lastWeek?: string;
|
|
56
|
-
/** Format for other days. */
|
|
57
33
|
sameElse?: string;
|
|
58
34
|
};
|
|
59
35
|
}
|
|
60
36
|
export interface GiftedChatProps<TMessage extends IMessage = IMessage> {
|
|
61
|
-
/** Array of chat messages. */
|
|
62
37
|
messages: TMessage[];
|
|
63
|
-
/** The current user object. */
|
|
64
38
|
user: User;
|
|
65
|
-
/** Custom bubble renderer. */
|
|
66
39
|
renderBubble?: (props: BubbleProps<TMessage>) => React.ReactNode;
|
|
67
|
-
/** Custom avatar renderer. */
|
|
68
40
|
renderAvatar?: (props: AvatarProps<TMessage>) => React.ReactNode;
|
|
69
|
-
/** Custom day separator renderer. */
|
|
70
41
|
renderDay?: (props: DayProps) => React.ReactNode;
|
|
71
|
-
/** Custom loading renderer. */
|
|
72
42
|
renderLoading?: () => React.ReactNode;
|
|
73
|
-
/** Custom empty chat renderer. */
|
|
74
43
|
renderChatEmpty?: () => React.ReactNode;
|
|
75
|
-
/** Props for the scrollable list view. */
|
|
76
44
|
listViewProps?: ListViewProps;
|
|
77
|
-
/** Scroll threshold for loading old messages. */
|
|
78
45
|
topThreshold?: number;
|
|
79
|
-
/** Whether to render avatar on top. */
|
|
80
46
|
renderAvatarOnTop?: boolean;
|
|
81
|
-
/** Whether to show user avatar. */
|
|
82
47
|
showUserAvatar?: boolean;
|
|
83
|
-
/** Show avatar for every message. */
|
|
84
48
|
showAvatarForEveryMessage?: boolean;
|
|
85
|
-
/** Whether to invert the message list. */
|
|
86
49
|
inverted?: boolean;
|
|
87
|
-
/** Handler for long press on message. */
|
|
88
50
|
onLongPress?: (context?: any, message?: TMessage) => void;
|
|
89
|
-
/** Handler for press on message. */
|
|
90
51
|
onPress?: (context?: any, message?: TMessage) => void;
|
|
91
|
-
/** Function to generate message IDs. */
|
|
92
52
|
messageIdGenerator?: (message?: TMessage) => string;
|
|
93
|
-
|
|
53
|
+
apptype?: string;
|
|
94
54
|
[key: string]: any;
|
|
95
55
|
}
|
|
96
56
|
export interface ScrollState {
|
|
97
|
-
/** Is initial mount of the component. */
|
|
98
57
|
isInitialMount: boolean;
|
|
99
|
-
/** Is user currently scrolling. */
|
|
100
58
|
isUserScrolling: boolean;
|
|
101
|
-
/** Is loading old messages. */
|
|
102
59
|
isLoadingOldMessages: boolean;
|
|
103
|
-
/** Is scroll at bottom. */
|
|
104
60
|
isAtBottom: boolean;
|
|
105
|
-
/** Has end reached been triggered. */
|
|
106
61
|
hasTriggeredEndReached: boolean;
|
|
107
|
-
/** Last known messages length. */
|
|
108
62
|
lastMessagesLength: number;
|
|
109
|
-
/** Previous scroll height. */
|
|
110
63
|
previousScrollHeight: number;
|
|
111
|
-
/** Previous scroll top position. */
|
|
112
64
|
previousScrollTop: number;
|
|
113
|
-
/** Debounce timer for scroll events. */
|
|
114
65
|
scrollTimeout: number | null;
|
|
115
66
|
}
|
|
116
67
|
export declare enum CHAT_ACTIVITY_TYPES_FOR_CALL_BUBBLE {
|
|
117
|
-
/** User is calling another user. */
|
|
118
68
|
CALLING_CALL = "CALLING_CALL",
|
|
119
|
-
/** Call is ringing for the recipient. */
|
|
120
69
|
RINGING_CALL = "RINGING_CALL",
|
|
121
|
-
/** Call is ongoing between users. */
|
|
122
70
|
ONGOING_CALL = "ONGOING_CALL",
|
|
123
|
-
/** Call has been completed. */
|
|
124
71
|
COMPLETED_CALL = "COMPLETED_CALL",
|
|
125
|
-
/** Call was missed by the recipient. */
|
|
126
72
|
MISSED_CALL = "MISSED_CALL",
|
|
127
|
-
/** Callback was requested. */
|
|
128
73
|
REQUESTED_CALLBACK = "REQUESTED_CALLBACK",
|
|
129
|
-
/** Call was declined by the recipient. */
|
|
130
74
|
DECLINED_CALL = "DECLINED_CALL",
|
|
131
|
-
/** Call was disconnected. */
|
|
132
75
|
DISCONNECTED_CALL = "DISCONNECTED_CALL",
|
|
133
|
-
/** Call was unanswered. */
|
|
134
76
|
UNANSWERED_CALL = "UNANSWERED_CALL"
|
|
135
77
|
}
|
|
136
78
|
export declare const enum MESSAGE_CHANNELS {
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
interface customStyles {
|
|
2
|
-
fontWeight?: number;
|
|
3
|
-
fontSize?: number;
|
|
4
|
-
width?: number;
|
|
5
|
-
}
|
|
6
1
|
export declare const TitleXlarge: import("styled-components").StyledComponent<"div", any, {
|
|
7
2
|
numberOfLines?: number | undefined;
|
|
8
3
|
color?: string | undefined;
|
|
@@ -42,7 +37,6 @@ export declare const BodyPrimary: import("styled-components").StyledComponent<"d
|
|
|
42
37
|
export declare const BodySecondary: import("styled-components").StyledComponent<"div", any, {
|
|
43
38
|
numberOfLines?: number | undefined;
|
|
44
39
|
color?: string | undefined;
|
|
45
|
-
customStyles?: customStyles | undefined;
|
|
46
40
|
}, never>;
|
|
47
41
|
export declare const ButtonRegularAI: import("styled-components").StyledComponent<"div", any, {
|
|
48
42
|
numberOfLines?: number | undefined;
|
|
@@ -56,7 +50,6 @@ export declare const BodyPrimaryLink: import("styled-components").StyledComponen
|
|
|
56
50
|
export declare const BodySecondaryLink: import("styled-components").StyledComponent<"div", any, {
|
|
57
51
|
numberOfLines?: number | undefined;
|
|
58
52
|
color?: string | undefined;
|
|
59
|
-
customStyles?: customStyles | undefined;
|
|
60
53
|
}, never>;
|
|
61
54
|
export declare const BodyCaption: import("styled-components").StyledComponent<"div", any, {
|
|
62
55
|
numberOfLines?: number | undefined;
|
|
@@ -118,4 +111,3 @@ export declare const Tiny: import("styled-components").StyledComponent<"div", an
|
|
|
118
111
|
numberOfLines?: number | undefined;
|
|
119
112
|
color?: string | undefined;
|
|
120
113
|
}, 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=>
|
|
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`
|
|
2
2
|
font-family: Inter;
|
|
3
3
|
color: ${e=>e.color||i.text.primary};
|
|
4
4
|
font-weight: ${t.titleXLarge.fontWeight};
|
|
@@ -90,10 +90,9 @@ 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)}};
|
|
94
93
|
color: ${e=>e.color||i.text.primary};
|
|
95
|
-
font-weight: ${
|
|
96
|
-
font-size: ${
|
|
94
|
+
font-weight: ${t.bodySecondary.fontWeight};
|
|
95
|
+
font-size: ${o(t.bodySecondary.fontSize)};
|
|
97
96
|
line-height: ${o(t.bodySecondary.lineHeight)};
|
|
98
97
|
-webkit-box-orient: vertical;
|
|
99
98
|
overflow: hidden;
|
|
@@ -125,7 +124,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
125
124
|
color: ${i.content.brand};
|
|
126
125
|
text-decoration-color: ${i.content.brand};
|
|
127
126
|
cursor: pointer;
|
|
128
|
-
`,
|
|
127
|
+
`,p=e.div`
|
|
129
128
|
font-family: Inter;
|
|
130
129
|
color: ${e=>e.color||i.text.primary};
|
|
131
130
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -137,7 +136,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
137
136
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
138
137
|
word-break: break-word;
|
|
139
138
|
overflow-wrap: break-word;
|
|
140
|
-
`,
|
|
139
|
+
`,y=e.div`
|
|
141
140
|
font-family: Inter;
|
|
142
141
|
color: ${e=>e.color||i.text.primary};
|
|
143
142
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -162,7 +161,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
162
161
|
overflow: hidden;
|
|
163
162
|
display: -webkit-box;
|
|
164
163
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
165
|
-
`,
|
|
164
|
+
`,k=e.div`
|
|
166
165
|
color: ${e=>e.color||i.text.primary};
|
|
167
166
|
font-weight: ${t.tiny.fontWeight};
|
|
168
167
|
font-size: ${o(t.tiny.fontSize)};
|
|
@@ -177,7 +176,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
177
176
|
-webkit-text-fill-color: transparent;
|
|
178
177
|
background-clip: text;
|
|
179
178
|
text-fill-color: transparent;
|
|
180
|
-
`,
|
|
179
|
+
`,s=e.div`
|
|
181
180
|
font-family: Inter;
|
|
182
181
|
color: ${e=>e.color||i.text.primary};
|
|
183
182
|
font-weight: ${t.buttonLarge.fontWeight};
|
|
@@ -223,7 +222,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
223
222
|
overflow: hidden;
|
|
224
223
|
display: -webkit-box;
|
|
225
224
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
226
|
-
`,
|
|
225
|
+
`,L=e.div`
|
|
227
226
|
font-family: Inter;
|
|
228
227
|
color: ${e=>e.color||i.text.primary};
|
|
229
228
|
font-weight: ${t.bodyRegular.fontWeight};
|
|
@@ -233,7 +232,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
233
232
|
overflow: hidden;
|
|
234
233
|
display: -webkit-box;
|
|
235
234
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
236
|
-
`,
|
|
235
|
+
`,S=e.div`
|
|
237
236
|
font-family: Inter;
|
|
238
237
|
color: ${i.text.primary};
|
|
239
238
|
font-weight: ${t.caption.fontWeight};
|
|
@@ -253,7 +252,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
253
252
|
overflow: hidden;
|
|
254
253
|
display: -webkit-box;
|
|
255
254
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
256
|
-
`,
|
|
255
|
+
`,O=e.div`
|
|
257
256
|
font-family: Inter;
|
|
258
257
|
color: ${i.text.primary};
|
|
259
258
|
font-weight: ${t.title4.fontWeight};
|
|
@@ -263,7 +262,7 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
263
262
|
overflow: hidden;
|
|
264
263
|
display: -webkit-box;
|
|
265
264
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
266
|
-
`,
|
|
265
|
+
`,W=e.div`
|
|
267
266
|
font-family: Inter;
|
|
268
267
|
color: ${i.text.primary};
|
|
269
268
|
font-weight: ${t.bodySmall.fontWeight};
|
|
@@ -293,4 +292,4 @@ import e from"styled-components";import{COLORS as i,FONTS as t}from"../constants
|
|
|
293
292
|
overflow: hidden;
|
|
294
293
|
display: -webkit-box;
|
|
295
294
|
-webkit-line-clamp: ${e=>e.numberOfLines};
|
|
296
|
-
`;export{
|
|
295
|
+
`;export{y as AiBodyCaption,k as AiBodyTiny,p as BodyCaption,c as BodyLarge,h as BodyPrimary,$ as BodyPrimaryLink,L as BodyRegular,g as BodySecondary,m as BodySecondaryLink,W as BodySmall,x as BodyTiny,s as ButtonLarge,v as ButtonLargeAI,u as ButtonRegular,w as ButtonRegularAI,S as Caption,I as CaptionBold,d as Display,a as SmallRegular,z as SubHeading,H as TextPlaceholder,R as Tiny,O 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 n from"./CarouselPreviewCard.js";import{useTemplateModalContext as i}from"../template-context-mapper/context/templateModalContext.js";import{determineCardIndex as a,isRCSChannel as d}from"../template-preview/helpers/templateMiscHelper.js";import{RCSCarousalContainer as u}from"../template-preview/RCS/RCSPreview.styled.js";import{CustomCarouselRightArrow as c,CustomCarouselLeftArrow as m}from"./CustomCarouselArrows.js";const p=o.forwardRef((o=>{let{channel:l,template:s,isPreview:c,removeBottomBorder:m,borderRadius:p,showArrows:w,hideBorder:h,showSampleValues:C}=o;var f,x;const{sliderRef:j,selectedCarouselIndex:g,cardCount:I,setIsCarouselHovered:P,cardIndex:R}=i(),b=-1==R?a(l):R,S=null===(x=null===(f=null==s?void 0:s.components)||void 0===f?void 0:f[b])||void 0===x?void 0:x.cards,A=(null==S?void 0:S.length)?e(v,{cards:S,cardCount:null!=I?I:0,selectedCarouselIndex:null!=g?g:-1,sliderRef:j,isPreview:c,showArrows:w,channel:l,template:s,setIsCarouselHovered:P,showSampleValues:!!C}):null;return d(l)?e(u,Object.assign({borderRadius:p},{children:A})):r(t,Object.assign({removeBottomBorder:m,borderRadius:p,hideBorder:h},{children:[e(n,{channel:l,currentTemplate:s,carouselCardIndex:-1,isPreview:c,width:"77%"}),A]}))})),v=r=>{let{cards:o,cardCount:t,selectedCarouselIndex:i,sliderRef:a,isPreview:d,showArrows:u,channel:p,template:v,setIsCarouselHovered:w,showSampleValues:h}=r;return e(s,Object.assign({cardCount:t,selectedCarouselIndex:i,onMouseEnter:()=>null==w?void 0:w(!0),onMouseLeave:()=>null==w?void 0:w(!1)},{children:e(l,Object.assign({ref:a,swipeToSlide:!0,draggable:!0,swipe:!0,infinite:!1,focusOnSelect:!d,centerMode:!0,arrows:u,adaptiveHeight:!0,nextArrow:e(c,{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(n,{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 D=o(null),j=o(null),v=s((()=>{D.current&&D.current.disconnect(),D.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==g||g())})),j.current&&D.current.observe(j.current)}),[g]);i((()=>(v(),()=>{D.current&&D.current.disconnect()})),[v,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:j}):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)}},r),o?e("span",{ref:j}):null]},r)}))})}));export{u as MenuList};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Variant } from './ListItem';
|
|
2
2
|
export declare function getColor(variant: Variant): string;
|
|
3
|
-
export declare function getTheme(variant: Variant, version?: '1.0' | '2.0'): import("@emotion/
|
|
3
|
+
export declare function getTheme(variant: Variant, version?: '1.0' | '2.0'): import("@emotion/utils").SerializedStyles;
|
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 C}from"../../template-preview/helpers/templateMiscHelper.js";import{TitleMedium as x,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(C(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(C(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]);const ue=e=>{null==J||J([{name:"variable",productName:e.actualValue}])};return c((()=>{-1===q&&C(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:[!C(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(x,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}}),t(w,Object.assign({style:{color:"#616161",overflow:"unset"}},{children:"OR"})),t("div",{style:{width:"100%",height:1,backgroundColor:"#E0E0E0",marginLeft:8}})]})),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,8 +11,6 @@ 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;
|
|
16
14
|
closeOnClick?: boolean;
|
|
17
15
|
hideProgressBar?: boolean;
|
|
18
16
|
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 l from"../../assets/icons/errorInfo.svg.js";import r from"../../assets/icons/info.svg.js";import d,{useRef as c,useState as u,useEffect as a,useContext as p}from"react";import h from"react-dom";import{cssTransition as x,toast as g,ToastContainer as y}from"react-toastify";import{Button as v}from"../button/Button.js";import{ToasterStyled as f}from"./Toaster.styled.js";import{TitleSmall as b,BodySecondary as T,BodyCaption as B}from"../TypographyStyle.js";import{COLORS as m}from"../../constants/Theme.js";const w=o=>{const e=(o.type,m.content.secondary);return t("div",Object.assign({tabIndex:0,role:"button",style:{width:20,display:"flex",cursor:"pointer",alignSelf:""+(o.alignTop?"flex-start":"center")},onClick:o.closeToast,onKeyDown:t=>{"Enter"===t.key&&o.closeToast&&o.closeToast()}},{children:t(i,{height:20,width:20,color:e})}))},C=n=>{var s,i;const l=m.content.placeholder,{toasterText:r}=p(I);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(b,Object.assign({color:"inherit"},{children:null!==(s=n.toastText)&&void 0!==s?s:r})):t(T,Object.assign({color:"inherit"},{children:null!==(i=n.toastText)&&void 0!==i?i:r})),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(v,{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(v,{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 ${l}`,borderRadius:1}}):null]}))})},j=o=>{const e=c(o.toastId||"default-toast"),[i,d]=u(o.text),p=x({enter:"Toastify__slide-enter",exit:"Toastify__slide-exit"}),v="default"===o.type?null:"success"===o.type?t(s,{width:20,height:20,color:m.content.positive}):"error"===o.type?t(l,{width:20,height:20,color:m.content.negative}):"warning"===o.type?t(n,{width:20,height:20,color:m.content.warning}):t(r,{width:20,height:20,color:m.content.brand});a((()=>{e.current&&e.current===o.toastId?(d(o.text),g.update(e.current,{autoClose:o.autoClose})):e.current&&e.current!==o.toastId&&b(o.text)}),[o.toastId,o.text]);const b=n=>{var s,i,l,r,d,c,u,a,h,x,y,f,b,T,B,m;void 0!==o.hideLeftIcon||o.leftIcon?g(t(C,{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===(l=o.buttonProps)||void 0===l?void 0:l.showButton,showSecondButton:null===(r=o.secondButtonProps)||void 0===r?void 0:r.showButton,onButtonClick:null===(d=o.buttonProps)||void 0===d?void 0:d.onButtonClick,onSecondButtonClick:null===(c=o.secondButtonProps)||void 0===c?void 0:c.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:v}))),type:o.type,closeButton:t(w,{type:o.type||"default",alignTop:!(!o.subText||(null===(u=o.buttonProps)||void 0===u?void 0:u.showButton)||(null===(a=o.secondButtonProps)||void 0===a?void 0:a.showButton))}),toastId:o.toastId||"default-toast",transition:p}):e.current=g(t(C,{toastText:n,type:o.type||"info",buttonText:null===(h=o.buttonProps)||void 0===h?void 0:h.buttonText,secondButtonText:null===(x=o.secondButtonProps)||void 0===x?void 0:x.buttonText,showButton:null===(y=o.buttonProps)||void 0===y?void 0:y.showButton,showSecondButton:null===(f=o.secondButtonProps)||void 0===f?void 0:f.showButton,onButtonClick:null===(b=o.buttonProps)||void 0===b?void 0:b.onButtonClick,onSecondButtonClick:null===(T=o.secondButtonProps)||void 0===T?void 0:T.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:v})),closeButton:t(w,{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))}),toastId:o.toastId||"default-toast",transition:p})};return a((()=>{b()}),[]),h.createPortal(t(f,Object.assign({width:o.width,height:o.height,zIndex:o.zIndex,isSubTextIncluded:!!o.subText,type:o.type},{children:t(I.Provider,Object.assign({value:{toasterText:i}},{children:t(y,{position:o.position||"top-right",closeOnClick:o.closeOnClick||!1,hideProgressBar:o.hideProgressBar||!1,draggable:!1,autoClose:o.autoClose||!1,theme:"colored"})}))})),document.body)},I=d.createContext({toasterText:""});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 b}from"../../constants/zindex.js";const l=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||b.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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRvYXN0ZXIuc3R5bGVkLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHd0MiLCJmaWxlIjoiVG9hc3Rlci5zdHlsZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IENvbXBvbmVudFppbmRleCB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvemluZGV4XCI7XHJcbmV4cG9ydCBjb25zdCBUb2FzdGVyU3R5bGVkID0gc3R5bGVkLmRpdiBgXG5cdC0tdG9hc3RpZnktY29sb3ItbGlnaHQ6ICNmZmY7XG5cdC0tdG9hc3RpZnktY29sb3ItZGFyazogIzEyMTIxMjtcblx0LS10b2FzdGlmeS10ZXh0LWNvbG9yLXN1Y2Nlc3M6ICR7Q09MT1JTLmNvbnRlbnQucHJpbWFyeX07XG5cdC0tdG9hc3RpZnktdGV4dC1jb2xvci1lcnJvcjogJHtDT0xPUlMuY29udGVudC5wcmltYXJ5fTtcblx0LS10b2FzdGlmeS10ZXh0LWNvbG9yLXdhcm5pbmc6ICR7Q09MT1JTLmNvbnRlbnQucHJpbWFyeX07XG5cdC0tdG9hc3RpZnktdGV4dC1jb2xvci1pbmZvOiAke0NPTE9SUy5jb250ZW50LnByaW1hcnl9O1xuXHQtLXRvYXN0aWZ5LWNvbG9yLWluZm86ICR7Q09MT1JTLmJhY2tncm91bmQuYnJhbmRMaWdodH07XG5cdC0tdG9hc3RpZnktY29sb3Itc3VjY2VzczogJHtDT0xPUlMuYmFja2dyb3VuZC5wb3Npd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ogMTtcblx0XHR9XG5cdFx0MTAwJSB7XG5cdFx0XHR0cmFuc2Zvcm06IHRyYW5zbGF0ZVgoMTAwJSk7IC8qIFNsaWRlIG91dCB0byB0aGUgcmlnaHQgKi9cblx0XHRcdG9wYWNpdHk6IDA7XG5cdFx0fVxuXHR9XG5gO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1Ub2FzdGVyLnN0eWxlZC5qcy5tYXAiXX0= */"));export{l as ToasterStyled};
|
|
@@ -3,7 +3,6 @@ export declare const BASE_COLORS: {
|
|
|
3
3
|
900: string;
|
|
4
4
|
800: string;
|
|
5
5
|
500: string;
|
|
6
|
-
100: string;
|
|
7
6
|
50: string;
|
|
8
7
|
10: string;
|
|
9
8
|
};
|
|
@@ -52,8 +51,6 @@ export declare const COLORS: {
|
|
|
52
51
|
brand: string;
|
|
53
52
|
brandLight: string;
|
|
54
53
|
brandVeryLight: string;
|
|
55
|
-
pureWhite: string;
|
|
56
|
-
brandTint: string;
|
|
57
54
|
negative: {
|
|
58
55
|
vibrant: string;
|
|
59
56
|
light: string;
|
|
@@ -345,8 +342,6 @@ export declare const DEFAULT_THEME: {
|
|
|
345
342
|
brand: string;
|
|
346
343
|
brandLight: string;
|
|
347
344
|
brandVeryLight: string;
|
|
348
|
-
pureWhite: string;
|
|
349
|
-
brandTint: string;
|
|
350
345
|
negative: {
|
|
351
346
|
vibrant: string;
|
|
352
347
|
light: string;
|