@bikdotai/bik-component-library 0.0.362 → 0.0.364-beta-chip

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("react-dom"),r=require("../../constants/Theme.js"),n=require("../button/Button.js"),s=require("../modals/styledModal.js"),o=require("../TypographyStyle.js"),i=require("./CommonStyles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(a);exports.FeatureModalV2=a=>{const{zIndex:c,otherContent:d,onUpgrade:u,title:b,subTitle:y,primaryButtonText:m,onClose:g,featureImage:j}=a,x=b||"Start your 14-day free trial to test your AI assistant on your website",p=y||"Test your assistant on your website and unlock many other features for free by starting your trial now. Don't worry, you can cancel anytime before the trial ends and no charges will be deducted.",h=j||"https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2Fb74e0e4c-9b3b-47ca-b0af-704b246e3c54?alt=media&token=bb48a397-1981-4c93-a835-eb4f400d5a60",[f,O]=t.useState(!0);return l.default.createPortal(e.jsx(s.StyledModal,Object.assign({zIndex:c,open:f,onClose:function(){g&&g(),O(!1)},closeOnOutsideClick:!0,centralContainerStyles:{maxWidth:"568px"}},{children:e.jsx(i.FeatureModalV2Container,{children:d?e.jsx(e.Fragment,{children:d}):e.jsxs(t.Fragment,{children:[e.jsx("div",Object.assign({className:"top-feature-content"},{children:e.jsx("img",{src:h,alt:"general-icon"})})),e.jsxs("div",Object.assign({className:"bottom-feature-content"},{children:[e.jsx(o.TitleLarge,Object.assign({className:"title-class text-align-center mt-8",style:{textAlign:"center"}},{children:x})),e.jsx(o.BodySecondary,Object.assign({className:"text-align-center",style:{color:r.COLORS.content.secondary}},{children:p})),e.jsx("div",Object.assign({className:"cta-buttons"},{children:e.jsx(n.Button,{buttonText:m||"Upgrade to growth plan",buttonType:"primary",size:"large",onClick:()=>{u&&u(),O(!1)}})}))]}))]})})})),document.body)};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),a=require("react-dom"),r=require("../../constants/Theme.js"),n=require("../button/Button.js"),s=require("../modals/styledModal.js"),o=require("../TypographyStyle.js"),i=require("./CommonStyles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=c(a);exports.FeatureModalV2=a=>{const{zIndex:c,otherContent:d,onUpgrade:u,title:b,subTitle:y,primaryButtonText:m,onClose:g,featureImage:j}=a,x=b||"Start your 14-day free trial to test your AI assistant on your website",p=y||"Test your assistant on your website and unlock many other features for free by starting your trial now. Don't worry, you can cancel anytime before the trial ends and no charges will be deducted.",h=j||"https://firebasestorage.googleapis.com/v0/b/bikayi-chat.appspot.com/o/images-uid%2Fb74e0e4c-9b3b-47ca-b0af-704b246e3c54?alt=media&token=bb48a397-1981-4c93-a835-eb4f400d5a60",[f,O]=t.useState(!0);return l.default.createPortal(e.jsx(s.StyledModal,Object.assign({zIndex:c,open:f,onClose:function(){g&&g(),O(!1)},closeOnOutsideClick:!0,centralContainerStyles:{maxWidth:"568px"}},{children:e.jsx(i.FeatureModalV2Container,{children:d?e.jsx(e.Fragment,{children:d}):e.jsxs(t.Fragment,{children:[e.jsx("div",Object.assign({className:"top-feature-content"},{children:e.jsx("img",{src:h,alt:"general-icon"})})),e.jsxs("div",Object.assign({className:"bottom-feature-content"},{children:[e.jsx(o.TitleMedium,Object.assign({className:"title-class text-align-center mt-8",style:{textAlign:"center"}},{children:x})),e.jsx(o.BodySecondary,Object.assign({className:"text-align-center",style:{color:r.COLORS.content.secondary}},{children:p})),e.jsx("div",Object.assign({className:"cta-buttons"},{children:e.jsx(n.Button,{buttonText:m||"Upgrade to growth plan",buttonType:"primary",size:"large",onClick:()=>{u&&u(),O(!1)}})}))]}))]})})})),document.body)};
@@ -10,6 +10,7 @@ export interface NewSubscriptionPlanProps extends SubscriptionPlanProps {
10
10
  yearlyCode?: string;
11
11
  isPlanSelected?: boolean;
12
12
  onClickShowAllFeatures?: () => void;
13
+ showSelectedPlanChip?: boolean;
13
14
  }
14
15
  type Props = NewSubscriptionPlanProps;
15
16
  export declare const NewSubscriptionPlan: FunctionComponent<Props>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/check.svg.js"),t=require("../../assets/icons/checkCircle.svg.js"),i=require("../../assets/icons/quotes.svg.js"),a=require("../../assets/icons/WhiteStarFilled.svg.js"),n=require("../button/Button.js"),o=require("./SubscriptionPlanStyled.js"),r=require("../TypographyStyle.js"),l=require("../../hooks/useCurreny.js"),c=require("../../constants/Theme.js");exports.NewSubscriptionPlan=d=>{var h;const{formatCurrency:u}=l.useCurrency(),j=d.showMonthlyOptions?d.features:d.annualFeatures||[],p=d.showMonthlyOptions?d.monthlyPlan:d.yearlyPlan,m=!d.isDisabled&&d.isMostPopular,g=d.showMonthlyOptions?d.code:null!==(h=d.yearlyCode)&&void 0!==h?h:d.code,b=e=>0==e?"$0":u(e,"USD"),{planName:y,isSelected:x=!1,isDisabled:O=!1,onPlanSelect:C,oldPrice:S,hideMonthYearTag:v,planDescription:N,planDescriptionDiscount:T,showTrialOptions:f,freeTrialMessages:L,extraBlockMessage:P,isLoading:w,buttonText:B,bottomDescription:k,showMonthlyOptions:M,popularTestimony:q,skipRadioSelection:R=!1,includeText:D,height:F,showFeaturesButton:_,businessDescription:z,isPlanSelected:W=!1,onClickShowAllFeatures:$}=d;return e.jsxs(o.NewSubscriptionStyled,Object.assign({height:F,showMostPopularChip:m||!1,onClick:()=>C(g)},{children:[m&&e.jsxs("div",Object.assign({className:"most-popular-chip"},{children:[e.jsx(r.Caption,Object.assign({className:"popular-text"},{children:"Most popular "})),e.jsx(a.default,{height:12,width:12})]})),e.jsxs("div",Object.assign({className:`box ${O?"disabled":""} \n\t\t\t\t`},{children:[e.jsxs("div",Object.assign({className:"radio-flex"},{children:[!R&&e.jsx("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=O&&O,onChange:()=>C(g),className:"radio-button",checked:W}),e.jsx(r.TitleRegular,Object.assign({style:{color:c.COLORS.content.secondary,marginBottom:4}},{children:y}))]})),e.jsxs("div",Object.assign({className:"price-block"},{children:[S?e.jsx(r.BodyCaption,Object.assign({className:"old--price"},{children:b(p.price)})):e.jsx(e.Fragment,{}),e.jsx(r.TitleLarge,Object.assign({style:{color:c.COLORS.content.primary}},{children:b(S||p.price)})),e.jsx(r.BodyPrimary,Object.assign({style:{color:c.COLORS.content.secondary,marginLeft:4}},{children:v?"":"/ "+(M?"month":"year")}))]})),N&&e.jsxs("div",Object.assign({className:"per-message-price"},{children:[e.jsx(r.BodyCaption,Object.assign({style:{color:c.COLORS.content.secondary}},{children:N})),T&&e.jsx(r.BodyCaption,Object.assign({style:{color:c.COLORS.background.positive.vibrant,marginLeft:4}},{children:T}))]})),z&&z.length&&e.jsx("div",Object.assign({style:{marginTop:4}},{children:z.map(((s,t)=>e.jsx(r.BodySecondary,{style:{color:c.COLORS.content.secondary},dangerouslySetInnerHTML:{__html:s}},t)))})),f&&e.jsxs(r.Caption,Object.assign({className:"trial "+(x?"selected":"")},{children:["7 day free trial with ",L," messages"]})),P&&e.jsx(r.Caption,Object.assign({className:"trial "+(x?"selected":"")},{children:P})),D&&e.jsx(r.TitleSmall,Object.assign({className:"extra-include-margin"},{children:D})),e.jsx("div",Object.assign({className:"features"},{children:j.map(((s,i)=>e.jsxs("div",Object.assign({className:"feature"},{children:[e.jsx("div",{children:e.jsx(t.default,{height:20,width:20,color:c.COLORS.content.primary})}),e.jsx(r.BodySecondary,Object.assign({className:"feature-text"},{children:s.detail}),i)]}),s.detail)))})),_&&e.jsx(n.Button,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),$&&$()}}),R&&e.jsx("div",Object.assign({className:"button-box"},{children:w?e.jsx(n.Button,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e.jsxs(e.Fragment,{children:[x&&e.jsx(n.Button,{disabled:O,LeadingIcon:s.default,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:B||"Selected Plan"}),!x&&!O&&e.jsx(n.Button,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),C(g)},matchParentWidth:!0,buttonText:B||"Choose plan"})]})})),q&&e.jsxs("div",Object.assign({className:"popular-testimony"},{children:[e.jsx(i.default,{height:26,width:70}),e.jsx("div",Object.assign({className:"testimony-text"},{children:q}))]}))]})),k&&e.jsx("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${O?"disabled":""}\n\t\t\t\t\t${x?"selected":""}\n\t\t\t\t`},{children:e.jsx(r.Caption,Object.assign({className:"text",style:{color:c.COLORS.background.inverse}},{children:k}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/check.svg.js"),t=require("../../assets/icons/checkCircle.svg.js"),i=require("../../assets/icons/quotes.svg.js"),a=require("../../assets/icons/WhiteStarFilled.svg.js"),n=require("../button/Button.js"),r=require("./SubscriptionPlanStyled.js"),o=require("../TypographyStyle.js"),l=require("../../hooks/useCurreny.js"),c=require("../../constants/Theme.js"),d=require("../tag/Tag.js");exports.NewSubscriptionPlan=h=>{var u;const{formatCurrency:j}=l.useCurrency(),p=h.showMonthlyOptions?h.features:h.annualFeatures||[],g=h.showMonthlyOptions?h.monthlyPlan:h.yearlyPlan,m=!h.isDisabled&&h.isMostPopular,x=h.showMonthlyOptions?h.code:null!==(u=h.yearlyCode)&&void 0!==u?u:h.code,y=e=>0==e?"$0":j(e,"USD"),{planName:b,isSelected:O=!1,isDisabled:C=!1,onPlanSelect:S,oldPrice:v,hideMonthYearTag:T,planDescription:N,planDescriptionDiscount:f,showTrialOptions:P,freeTrialMessages:L,extraBlockMessage:w,isLoading:k,buttonText:B,bottomDescription:M,showMonthlyOptions:q,popularTestimony:R,skipRadioSelection:D=!1,includeText:F,height:_,showFeaturesButton:z,businessDescription:W,isPlanSelected:$=!1,onClickShowAllFeatures:H,showSelectedPlanChip:I=!1}=h;return e.jsxs(r.NewSubscriptionStyled,Object.assign({height:_,showMostPopularChip:m||!1,onClick:()=>S(x)},{children:[m&&e.jsxs("div",Object.assign({className:"most-popular-chip"},{children:[e.jsx(o.Caption,Object.assign({className:"popular-text"},{children:"Most popular "})),e.jsx(a.default,{height:12,width:12})]})),e.jsxs("div",Object.assign({className:`box ${C?"disabled":""} \n\t\t\t\t`},{children:[e.jsxs("div",Object.assign({className:"radio-flex"},{children:[!D&&e.jsx("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=C&&C,onChange:()=>S(x),className:"radio-button",checked:$}),e.jsx(o.TitleRegular,Object.assign({style:{color:c.COLORS.content.secondary,marginBottom:4}},{children:b})),I&&e.jsx(d.Tag,{tagText:"Current plan",type:"positive",theme:"dark"})]})),e.jsxs("div",Object.assign({className:"price-block"},{children:[v?e.jsx(o.BodyCaption,Object.assign({className:"old--price"},{children:y(g.price)})):e.jsx(e.Fragment,{}),e.jsx(o.TitleLarge,Object.assign({style:{color:c.COLORS.content.primary}},{children:y(v||g.price)})),e.jsx(o.BodyPrimary,Object.assign({style:{color:c.COLORS.content.secondary,marginLeft:4}},{children:T?"":"/ "+(q?"month":"year")}))]})),N&&e.jsxs("div",Object.assign({className:"per-message-price"},{children:[e.jsx(o.BodyCaption,Object.assign({style:{color:c.COLORS.content.secondary}},{children:N})),f&&e.jsx(o.BodyCaption,Object.assign({style:{color:c.COLORS.background.positive.vibrant,marginLeft:4}},{children:f}))]})),W&&W.length&&e.jsx("div",Object.assign({style:{marginTop:4}},{children:W.map(((s,t)=>e.jsx(o.BodySecondary,{style:{color:c.COLORS.content.secondary},dangerouslySetInnerHTML:{__html:s}},t)))})),P&&e.jsxs(o.Caption,Object.assign({className:"trial "+(O?"selected":"")},{children:["7 day free trial with ",L," messages"]})),w&&e.jsx(o.Caption,Object.assign({className:"trial "+(O?"selected":"")},{children:w})),F&&e.jsx(o.TitleSmall,Object.assign({className:"extra-include-margin"},{children:F})),e.jsx("div",Object.assign({className:"features"},{children:p.map(((s,i)=>e.jsxs("div",Object.assign({className:"feature"},{children:[e.jsx("div",{children:e.jsx(t.default,{height:20,width:20,color:c.COLORS.content.primary})}),e.jsx(o.BodySecondary,Object.assign({className:"feature-text"},{children:s.detail}),i)]}),s.detail)))})),z&&e.jsx(n.Button,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),H&&H()}}),D&&e.jsx("div",Object.assign({className:"button-box"},{children:k?e.jsx(n.Button,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e.jsxs(e.Fragment,{children:[O&&e.jsx(n.Button,{disabled:C,LeadingIcon:s.default,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:B||"Selected Plan"}),!O&&!C&&e.jsx(n.Button,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),S(x)},matchParentWidth:!0,buttonText:B||"Choose plan"})]})})),R&&e.jsxs("div",Object.assign({className:"popular-testimony"},{children:[e.jsx(i.default,{height:26,width:70}),e.jsx("div",Object.assign({className:"testimony-text"},{children:R}))]}))]})),M&&e.jsx("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${C?"disabled":""}\n\t\t\t\t\t${O?"selected":""}\n\t\t\t\t`},{children:e.jsx(o.Caption,Object.assign({className:"text",style:{color:c.COLORS.background.inverse}},{children:M}))}))]}))};
@@ -3,4 +3,4 @@
3
3
  column-gap: 22px;
4
4
  align-items: stretch;
5
5
  overflow-x: auto;
6
- `;exports.SubscriptionPlansCollected=l=>{var s;const[i,a]=t.useState(null!==(s=l.selectedPlan)&&void 0!==s?s:"");return e.jsx(o,Object.assign({style:{padding:"28px 0px"}},{children:l.plans.map(((s,o)=>{var r,c;return e.jsx("div",Object.assign({style:{width:null!==(r=l.staticWidth)&&void 0!==r?r:308}},{children:t.createElement(n.NewSubscriptionPlan,Object.assign({},s,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==l.selectedTab)&&void 0!==c&&c,showTrialOptions:l.showTrialOptions||!1,onPlanSelect:e=>{l.onPlanSelect(e),a(e)},key:s.planName,isPlanSelected:i==("monthly"==l.selectedTab?s.code:s.yearlyCode),onClickShowAllFeatures:l.onClickShowAllFeatures}))}),o)}))}))};
6
+ `;exports.SubscriptionPlansCollected=l=>{var s;const[a,i]=t.useState(null!==(s=l.selectedPlan)&&void 0!==s?s:"");return e.jsx(o,Object.assign({style:{padding:"28px 0px"}},{children:l.plans.map(((s,o)=>{var r,c;return e.jsx("div",Object.assign({style:{width:null!==(r=l.staticWidth)&&void 0!==r?r:308}},{children:t.createElement(n.NewSubscriptionPlan,Object.assign({},s,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==l.selectedTab)&&void 0!==c&&c,showTrialOptions:l.showTrialOptions||!1,onPlanSelect:e=>{l.onPlanSelect(e),i(e)},key:s.planName,isPlanSelected:a==("monthly"==l.selectedTab?s.code:s.yearlyCode),onClickShowAllFeatures:l.onClickShowAllFeatures,showSelectedPlanChip:l.selectedPlan==("monthly"==l.selectedTab?s.code:s.yearlyCode)}))}),o)}))}))};