@bikdotai/bik-component-library 0.0.600-him-bug-bash-dec-1 → 0.0.601-aab-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/radioButton/RadioButton.d.ts +1 -0
- package/dist/cjs/components/radioButton/RadioButton.js +1 -1
- package/dist/cjs/components/template-preview/TemplatePreview.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/radioButton/RadioButton.d.ts +1 -0
- package/dist/esm/components/radioButton/RadioButton.js +1 -1
- package/dist/esm/components/template-preview/TemplatePreview.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("./RadioButton.styled.js"),t=require("../TypographyStyle.js"),l=require("../../constants/Theme.js");const a=i=>{const s=i.isDisabled?l.COLORS.content.inactive:i.isActive?l.COLORS.background.positive.vibrant:l.COLORS.content.primary;return e.jsxs("svg",Object.assign({width:i.isSmall?"16":"20",height:i.isSmall?"16":"20",viewBox:i.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?6:9,stroke:s,strokeWidth:i.isSmall?1.5:2}),i.isActive&&e.jsx("circle",{cx:i.isSmall?"8":"10",cy:i.isSmall?"8":"10",r:i.isSmall?3:5,fill:i.isDisabled?l.COLORS.content.inactive:l.COLORS.background.positive.vibrant})]}))};exports.RadioButton=n=>{const[r,o]=i.useState(n.isActive||!1),[c,d]=i.useState(!1),[O,S]=i.useState(!1);i.useEffect((()=>{o(n.isActive)}),[n.isActive]);return e.jsxs(s.RadioButtonContainer,Object.assign({onClick:()=>{var e;if(!n.skipSelectingOff&&!n.isDisabled){const i=!r;o(i),null===(e=n.onValueChange)||void 0===e||e.call(n,i,n.value)}},onMouseEnter:()=>d(!n.skipHoverState),onMouseLeave:()=>d(!1),onMouseDown:()=>S(!n.skipHoverState),onMouseUp:()=>S(!1),style:n.caption?{alignItems:"flex-start"}:{}},{children:[e.jsx(s.RadioButtonIcon,Object.assign({checked:r,hovered:c,clicked:O,isDisabled:n.isDisabled||!1,size:n.size,style:n.caption?{margin:"2px 0"}:{}},{children:e.jsx(a,{isSmall:"SMALL"===n.size,isActive:r,isDisabled:n.isDisabled||!1})})),e.jsxs("div",{children:[n.label?n.boldOnChecked&&r?e.jsx(t.TitleSmall,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:n.label})):"SMALL"===n.size?e.jsx(t.BodyCaption,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:n.label})):"MEDIUM"===n.labelSize?e.jsx(t.BodySecondary,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:n.label})):e.jsx(t.BodyPrimary,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.primary},{children:n.label})):e.jsx(e.Fragment,{}),n.caption&&e.jsx(t.BodyCaption,Object.assign({color:n.isDisabled?l.COLORS.text.disabled:l.COLORS.text.secondary},{children:n.caption}))]})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../template-context-mapper/context/templateModalContext.js"),l=require("../../utils/StringUtils.js"),i=require("../../constants/Theme.js"),a=require("../TypographyStyle.js"),n=require("./EmailTemplateThumbnailPreview.js"),s=require("./models/Channels.js"),r=require("./SmsTemplatePreview.js"),o=require("./webpush/WebpushPreview.js"),d=require("./WhatsAppTemplatePreview.js");const u={WhatsAppWrapper:{backgroundColor:i.COLORS.surface.standard,borderRadius:4,border:`1px solid ${i.COLORS.background.inactive}`,marginTop:16}};exports.TemplatePreview=p=>{let{template:m,channel:c,whatsAppSpecificMeta:v,templateCreationsInfo:h,hideHeader:j,size:C,onlyTemplateContent:b,emailSpecificMeta:S,smsSpecificMeta:g,showSampleValues:x,carouselCardIndex:y,isWhatsappCarousel:T,isPreview:P,applyBorderBottom:w,webPushSpecificMeta:O,hidePointerEvents:E}=p;var H,f;const{setSelectedCarouselIndex:A}=t.useTemplateModalContext();return c===s.CHANNEL_TYPE.SMS?e.jsx("div",Object.assign({style:Object.assign({marginTop:h?16:0,border:h?`1px solid ${i.COLORS.stroke.primary}`:"none",borderRadius:4},null==g?void 0:g.templateContainerStyles)},{children:e.jsx(r.default,{template:m,hideHeader:j,onlyTemplateContent:b,size:null!=C?C:"large",variableStore:null==g?void 0:g.smsVariableStore,display_content:null==g?void 0:g.smsDisplayContent,uniqueId:null==g?void 0:g.uniqueId})})):c===s.CHANNEL_TYPE.EMAIL?e.jsx("div",Object.assign({style:Object.assign({marginTop:h?16:0},null==S?void 0:S.templateContainerStyles)},{children:e.jsx(n.default,{template:m,handleViewTemplate:()=>{var e;null===(e=null==S?void 0:S.handleViewTemplate)||void 0===e||e.call(S)},hideHeader:j,hideViewButton:null==S?void 0:S.hideViewButtonForEmail,containerStyle:null==S?void 0:S.containerStyle,emailDisplayContent:null==S?void 0:S.emailDisplayContent,emailHtmlContainerId:null==S?void 0:S.emailHtmlContainerId,applyBorderBottom:w,hidePointerEvents:E})})):c===s.CHANNEL_TYPE.WHATSAPP?e.jsxs("div",Object.assign({style:Object.assign(Object.assign({},null==v?void 0:v.templateContainerStyles),h?u.WhatsAppWrapper:{}),onClick:()=>{var e,t;if(A&&T){if(-1===y&&!(null===(t=null===(e=null==m?void 0:m.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length))return;A(null!=y?y:-1)}}},{children:[h?e.jsx("div",Object.assign({style:{padding:16}},{children:e.jsx(a.TitleRegular,{children:l.default.convertToTitleCase(null!==(H=null==m?void 0:m.label)&&void 0!==H?H:"")})})):e.jsx(e.Fragment,{}),e.jsx(d.default,{showSampleValues:x,showHeader:null==v?void 0:v.showWhatsAppHeader,extras:null==v?void 0:v.whatsAppExtras,template:m,size:h?"small":null!=C?C:"large",containerStyle:Object.assign(Object.assign({borderWidth:h?0:1,borderTopWidth:1},null!==(f=null==v?void 0:v.containerStyle)&&void 0!==f?f:{}),{height:"100%"}),zeroStateComponent:null==v?void 0:v.zeroStateComponent,usePlaceHolderName:null==v?void 0:v.usePlaceHolderName,carouselCardIndex:y,isWhatsappCarousel:T,isPreview:P})]})):c==s.CHANNEL_TYPE.WEBPUSH?e.jsx("div",Object.assign({style:Object.assign({},null==O?void 0:O.containerStyle)},{children:e.jsx(o.default,{template:m,extraContainerCss:null==O?void 0:O.extraContainerCss})})):e.jsx(e.Fragment,{})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as
|
|
1
|
+
import{jsxs as i,jsx as e,Fragment as s}from"react/jsx-runtime";import{useState as t,useEffect as l}from"react";import{RadioButtonContainer as a,RadioButtonIcon as c}from"./RadioButton.styled.js";import{BodyCaption as o,TitleSmall as r,BodySecondary as n,BodyPrimary as d}from"../TypographyStyle.js";import{COLORS as b}from"../../constants/Theme.js";const m=s=>{const t=s.isDisabled?b.content.inactive:s.isActive?b.background.positive.vibrant:b.content.primary;return i("svg",Object.assign({width:s.isSmall?"16":"20",height:s.isSmall?"16":"20",viewBox:s.isSmall?"0 0 16 16":"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?6:9,stroke:t,strokeWidth:s.isSmall?1.5:2}),s.isActive&&e("circle",{cx:s.isSmall?"8":"10",cy:s.isSmall?"8":"10",r:s.isSmall?3:5,fill:s.isDisabled?b.content.inactive:b.background.positive.vibrant})]}))},p=p=>{const[v,h]=t(p.isActive||!1),[g,x]=t(!1),[S,y]=t(!1);l((()=>{h(p.isActive)}),[p.isActive]);return i(a,Object.assign({onClick:()=>{var i;if(!p.skipSelectingOff&&!p.isDisabled){const e=!v;h(e),null===(i=p.onValueChange)||void 0===i||i.call(p,e,p.value)}},onMouseEnter:()=>x(!p.skipHoverState),onMouseLeave:()=>x(!1),onMouseDown:()=>y(!p.skipHoverState),onMouseUp:()=>y(!1),style:p.caption?{alignItems:"flex-start"}:{}},{children:[e(c,Object.assign({checked:v,hovered:g,clicked:S,isDisabled:p.isDisabled||!1,size:p.size,style:p.caption?{margin:"2px 0"}:{}},{children:e(m,{isSmall:"SMALL"===p.size,isActive:v,isDisabled:p.isDisabled||!1})})),i("div",{children:[p.label?p.boldOnChecked&&v?e(r,Object.assign({color:p.isDisabled?b.text.disabled:b.text.primary},{children:p.label})):"SMALL"===p.size?e(o,Object.assign({color:p.isDisabled?b.text.disabled:b.text.primary},{children:p.label})):"MEDIUM"===p.labelSize?e(n,Object.assign({color:p.isDisabled?b.text.disabled:b.text.primary},{children:p.label})):e(d,Object.assign({color:p.isDisabled?b.text.disabled:b.text.primary},{children:p.label})):e(s,{}),p.caption&&e(o,Object.assign({color:p.isDisabled?b.text.disabled:b.text.secondary},{children:p.caption}))]})]}))};export{p as RadioButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useTemplateModalContext as i}from"../template-context-mapper/context/templateModalContext.js";import a from"../../utils/StringUtils.js";import{COLORS as n}from"../../constants/Theme.js";import{TitleRegular as o}from"../TypographyStyle.js";import r from"./EmailTemplateThumbnailPreview.js";import{CHANNEL_TYPE as s}from"./models/Channels.js";import d from"./SmsTemplatePreview.js";import p from"./webpush/WebpushPreview.js";import m from"./WhatsAppTemplatePreview.js";const u=u=>{let{template:v,channel:h,whatsAppSpecificMeta:b,templateCreationsInfo:C,hideHeader:
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as l}from"react/jsx-runtime";import{useTemplateModalContext as i}from"../template-context-mapper/context/templateModalContext.js";import a from"../../utils/StringUtils.js";import{COLORS as n}from"../../constants/Theme.js";import{TitleRegular as o}from"../TypographyStyle.js";import r from"./EmailTemplateThumbnailPreview.js";import{CHANNEL_TYPE as s}from"./models/Channels.js";import d from"./SmsTemplatePreview.js";import p from"./webpush/WebpushPreview.js";import m from"./WhatsAppTemplatePreview.js";const u=u=>{let{template:v,channel:h,whatsAppSpecificMeta:b,templateCreationsInfo:C,hideHeader:y,size:S,onlyTemplateContent:g,emailSpecificMeta:j,smsSpecificMeta:f,showSampleValues:w,carouselCardIndex:T,isWhatsappCarousel:x,isPreview:P,applyBorderBottom:W,webPushSpecificMeta:O,hidePointerEvents:H}=u;var A,I;const{setSelectedCarouselIndex:B}=i();return h===s.SMS?e("div",Object.assign({style:Object.assign({marginTop:C?16:0,border:C?`1px solid ${n.stroke.primary}`:"none",borderRadius:4},null==f?void 0:f.templateContainerStyles)},{children:e(d,{template:v,hideHeader:y,onlyTemplateContent:g,size:null!=S?S:"large",variableStore:null==f?void 0:f.smsVariableStore,display_content:null==f?void 0:f.smsDisplayContent,uniqueId:null==f?void 0:f.uniqueId})})):h===s.EMAIL?e("div",Object.assign({style:Object.assign({marginTop:C?16:0},null==j?void 0:j.templateContainerStyles)},{children:e(r,{template:v,handleViewTemplate:()=>{var e;null===(e=null==j?void 0:j.handleViewTemplate)||void 0===e||e.call(j)},hideHeader:y,hideViewButton:null==j?void 0:j.hideViewButtonForEmail,containerStyle:null==j?void 0:j.containerStyle,emailDisplayContent:null==j?void 0:j.emailDisplayContent,emailHtmlContainerId:null==j?void 0:j.emailHtmlContainerId,applyBorderBottom:W,hidePointerEvents:H})})):h===s.WHATSAPP?t("div",Object.assign({style:Object.assign(Object.assign({},null==b?void 0:b.templateContainerStyles),C?c.WhatsAppWrapper:{}),onClick:()=>{var e,t;if(B&&x){if(-1===T&&!(null===(t=null===(e=null==v?void 0:v.mapping)||void 0===e?void 0:e.body)||void 0===t?void 0:t.length))return;B(null!=T?T:-1)}}},{children:[C?e("div",Object.assign({style:{padding:16}},{children:e(o,{children:a.convertToTitleCase(null!==(A=null==v?void 0:v.label)&&void 0!==A?A:"")})})):e(l,{}),e(m,{showSampleValues:w,showHeader:null==b?void 0:b.showWhatsAppHeader,extras:null==b?void 0:b.whatsAppExtras,template:v,size:C?"small":null!=S?S:"large",containerStyle:Object.assign(Object.assign({borderWidth:C?0:1,borderTopWidth:1},null!==(I=null==b?void 0:b.containerStyle)&&void 0!==I?I:{}),{height:"100%"}),zeroStateComponent:null==b?void 0:b.zeroStateComponent,usePlaceHolderName:null==b?void 0:b.usePlaceHolderName,carouselCardIndex:T,isWhatsappCarousel:x,isPreview:P})]})):h==s.WEBPUSH?e("div",Object.assign({style:Object.assign({},null==O?void 0:O.containerStyle)},{children:e(p,{template:v,extraContainerCss:null==O?void 0:O.extraContainerCss})})):e(l,{})},c={WhatsAppWrapper:{backgroundColor:n.surface.standard,borderRadius:4,border:`1px solid ${n.background.inactive}`,marginTop:16}};export{u as TemplatePreview};
|