@bikdotai/bik-component-library 0.0.372 → 0.0.373
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.
|
@@ -11,6 +11,7 @@ export interface NewSubscriptionPlanProps extends SubscriptionPlanProps {
|
|
|
11
11
|
isPlanSelected?: boolean;
|
|
12
12
|
onClickShowAllFeatures?: () => void;
|
|
13
13
|
showSelectedPlanChip?: boolean;
|
|
14
|
+
perMonthForYearly?: boolean;
|
|
14
15
|
}
|
|
15
16
|
type Props = NewSubscriptionPlanProps;
|
|
16
17
|
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"),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,
|
|
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,{planName:y,isSelected:b=!1,isDisabled:O=!1,onPlanSelect:C,oldPrice:S,hideMonthYearTag:v,planDescription:T,planDescriptionDiscount:N,showTrialOptions:f,freeTrialMessages:L,extraBlockMessage:P,isLoading:w,buttonText:k,bottomDescription:M,showMonthlyOptions:B,popularTestimony:q,skipRadioSelection:R=!1,includeText:D,height:F,showFeaturesButton:$,businessDescription:_,isPlanSelected:z=!1,onClickShowAllFeatures:W,showSelectedPlanChip:H=!1,perMonthForYearly:I=!1}=h,U=e=>I&&!B?0==e?"$0":j(e/12,"USD"):0==e?"$0":j(e,"USD");return e.jsxs(r.NewSubscriptionStyled,Object.assign({height:F,showMostPopularChip:m||!1,onClick:()=>C(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 ${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(x),className:"radio-button",checked:z}),e.jsx(o.TitleRegular,Object.assign({style:{color:c.COLORS.content.secondary,marginBottom:4}},{children:y})),H&&e.jsx("div",Object.assign({style:{marginLeft:"auto"}},{children:e.jsx(d.Tag,{tagText:"Current plan",type:"positive",theme:"dark"})}))]})),e.jsxs("div",Object.assign({className:"price-block"},{children:[S?e.jsx(o.BodyCaption,Object.assign({className:"old--price"},{children:U(g.price)})):e.jsx(e.Fragment,{}),e.jsx(o.TitleLarge,Object.assign({style:{color:c.COLORS.content.primary}},{children:U(S||g.price)})),e.jsx(o.Caption,Object.assign({style:{color:c.COLORS.content.secondary,marginLeft:4}},{children:v?"":"/ "+(B?"month":I?"month billed annually":"year")}))]})),T&&e.jsxs("div",Object.assign({className:"per-message-price"},{children:[e.jsx(o.BodyCaption,Object.assign({style:{color:c.COLORS.content.secondary}},{children:T})),N&&e.jsx(o.BodyCaption,Object.assign({style:{color:c.COLORS.background.positive.vibrant,marginLeft:4}},{children:N}))]})),_&&_.length&&e.jsx("div",Object.assign({style:{marginTop:4}},{children:_.map(((s,t)=>e.jsx(o.BodySecondary,{style:{color:c.COLORS.content.secondary},dangerouslySetInnerHTML:{__html:s}},t)))})),f&&e.jsxs(o.Caption,Object.assign({className:"trial "+(b?"selected":"")},{children:["7 day free trial with ",L," messages"]})),P&&e.jsx(o.Caption,Object.assign({className:"trial "+(b?"selected":"")},{children:P})),e.jsx(o.TitleSmall,Object.assign({className:"extra-include-margin",style:{height:D?"":"20px"}},{children:D||""})),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)))})),$&&e.jsx(n.Button,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),W&&W()}}),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:[b&&e.jsx(n.Button,{disabled:O,LeadingIcon:s.default,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:k||"Selected Plan"}),!b&&!O&&e.jsx(n.Button,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),C(x)},matchParentWidth:!0,buttonText:k||"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:e.jsx("i",{children:q})}))]}))]})),M&&e.jsx("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${O?"disabled":""}\n\t\t\t\t\t${b?"selected":""}\n\t\t\t\t`},{children:e.jsx(o.Caption,Object.assign({className:"text",style:{color:c.COLORS.background.inverse}},{children:M}))}))]}))};
|
|
@@ -11,6 +11,7 @@ export interface NewSubscriptionPlanProps extends SubscriptionPlanProps {
|
|
|
11
11
|
isPlanSelected?: boolean;
|
|
12
12
|
onClickShowAllFeatures?: () => void;
|
|
13
13
|
showSelectedPlanChip?: boolean;
|
|
14
|
+
perMonthForYearly?: boolean;
|
|
14
15
|
}
|
|
15
16
|
type Props = NewSubscriptionPlanProps;
|
|
16
17
|
export declare const NewSubscriptionPlan: FunctionComponent<Props>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as s}from"react/jsx-runtime";import i from"../../assets/icons/check.svg.js";import a from"../../assets/icons/checkCircle.svg.js";import n from"../../assets/icons/quotes.svg.js";import o from"../../assets/icons/WhiteStarFilled.svg.js";import{Button as r}from"../button/Button.js";import{NewSubscriptionStyled as l}from"./SubscriptionPlanStyled.js";import{Caption as c,TitleRegular as d,BodyCaption as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as s}from"react/jsx-runtime";import i from"../../assets/icons/check.svg.js";import a from"../../assets/icons/checkCircle.svg.js";import n from"../../assets/icons/quotes.svg.js";import o from"../../assets/icons/WhiteStarFilled.svg.js";import{Button as r}from"../button/Button.js";import{NewSubscriptionStyled as l}from"./SubscriptionPlanStyled.js";import{Caption as c,TitleRegular as d,BodyCaption as h,TitleLarge as m,BodySecondary as p,TitleSmall as g}from"../TypographyStyle.js";import{useCurrency as b}from"../../hooks/useCurreny.js";import{COLORS as u}from"../../constants/Theme.js";import{Tag as y}from"../tag/Tag.js";const j=j=>{var O;const{formatCurrency:v}=b(),f=j.showMonthlyOptions?j.features:j.annualFeatures||[],T=j.showMonthlyOptions?j.monthlyPlan:j.yearlyPlan,N=!j.isDisabled&&j.isMostPopular,x=j.showMonthlyOptions?j.code:null!==(O=j.yearlyCode)&&void 0!==O?O:j.code,{planName:P,isSelected:S=!1,isDisabled:k=!1,onPlanSelect:C,oldPrice:w,hideMonthYearTag:M,planDescription:D,planDescriptionDiscount:L,showTrialOptions:F,freeTrialMessages:$,extraBlockMessage:z,isLoading:B,buttonText:W,bottomDescription:_,showMonthlyOptions:H,popularTestimony:I,skipRadioSelection:U=!1,includeText:Y,height:q,showFeaturesButton:A,businessDescription:R,isPlanSelected:E=!1,onClickShowAllFeatures:G,showSelectedPlanChip:J=!1,perMonthForYearly:K=!1}=j,Q=e=>K&&!H?0==e?"$0":v(e/12,"USD"):0==e?"$0":v(e,"USD");return e(l,Object.assign({height:q,showMostPopularChip:N||!1,onClick:()=>C(x)},{children:[N&&e("div",Object.assign({className:"most-popular-chip"},{children:[t(c,Object.assign({className:"popular-text"},{children:"Most popular "})),t(o,{height:12,width:12})]})),e("div",Object.assign({className:`box ${k?"disabled":""} \n\t\t\t\t`},{children:[e("div",Object.assign({className:"radio-flex"},{children:[!U&&t("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=k&&k,onChange:()=>C(x),className:"radio-button",checked:E}),t(d,Object.assign({style:{color:u.content.secondary,marginBottom:4}},{children:P})),J&&t("div",Object.assign({style:{marginLeft:"auto"}},{children:t(y,{tagText:"Current plan",type:"positive",theme:"dark"})}))]})),e("div",Object.assign({className:"price-block"},{children:[w?t(h,Object.assign({className:"old--price"},{children:Q(T.price)})):t(s,{}),t(m,Object.assign({style:{color:u.content.primary}},{children:Q(w||T.price)})),t(c,Object.assign({style:{color:u.content.secondary,marginLeft:4}},{children:M?"":"/ "+(H?"month":K?"month billed annually":"year")}))]})),D&&e("div",Object.assign({className:"per-message-price"},{children:[t(h,Object.assign({style:{color:u.content.secondary}},{children:D})),L&&t(h,Object.assign({style:{color:u.background.positive.vibrant,marginLeft:4}},{children:L}))]})),R&&R.length&&t("div",Object.assign({style:{marginTop:4}},{children:R.map(((e,s)=>t(p,{style:{color:u.content.secondary},dangerouslySetInnerHTML:{__html:e}},s)))})),F&&e(c,Object.assign({className:"trial "+(S?"selected":"")},{children:["7 day free trial with ",$," messages"]})),z&&t(c,Object.assign({className:"trial "+(S?"selected":"")},{children:z})),t(g,Object.assign({className:"extra-include-margin",style:{height:Y?"":"20px"}},{children:Y||""})),t("div",Object.assign({className:"features"},{children:f.map(((s,i)=>e("div",Object.assign({className:"feature"},{children:[t("div",{children:t(a,{height:20,width:20,color:u.content.primary})}),t(p,Object.assign({className:"feature-text"},{children:s.detail}),i)]}),s.detail)))})),A&&t(r,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),G&&G()}}),U&&t("div",Object.assign({className:"button-box"},{children:B?t(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(s,{children:[S&&t(r,{disabled:k,LeadingIcon:i,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:W||"Selected Plan"}),!S&&!k&&t(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),C(x)},matchParentWidth:!0,buttonText:W||"Choose plan"})]})})),I&&e("div",Object.assign({className:"popular-testimony"},{children:[t(n,{height:26,width:70}),t("div",Object.assign({className:"testimony-text"},{children:t("i",{children:I})}))]}))]})),_&&t("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${k?"disabled":""}\n\t\t\t\t\t${S?"selected":""}\n\t\t\t\t`},{children:t(c,Object.assign({className:"text",style:{color:u.background.inverse}},{children:_}))}))]}))};export{j as NewSubscriptionPlan};
|