@bikdotai/bik-component-library 0.0.368 → 0.0.369-beta-nth-price
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/alerts/Alert.js +1 -1
- package/dist/cjs/components/plans/NewSubscriptionPlan.d.ts +1 -0
- package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/cjs/components/plans/SubscriptionPlansCollected.d.ts +1 -0
- package/dist/cjs/components/plans/SubscriptionPlansCollected.js +2 -2
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.d.ts +1 -0
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlansCollected.d.ts +1 -0
- package/dist/esm/components/plans/SubscriptionPlansCollected.js +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./Alert.styled.js"),r=require("./AlertHelper.js"),s=require("../TypographyStyle.js");exports.Alert=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./Alert.styled.js"),r=require("./AlertHelper.js"),s=require("../TypographyStyle.js");exports.Alert=l=>e.jsxs(t.AlertStyle,Object.assign({type:l.type},{children:[l.icon&&e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(l.icon,{color:r.COLOR_CONFIG_MAP[l.type].textColor,height:20,width:20})})),e.jsx(s.BodyCaption,Object.assign({style:{color:l.textColor||r.COLOR_CONFIG_MAP[l.type].textColor,marginLeft:12}},{children:l.text}))]}));
|
|
@@ -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,
|
|
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,y=h.showMonthlyOptions?h.code:null!==(u=h.yearlyCode)&&void 0!==u?u:h.code,x=e=>h.perMonthForYearly?0==e?"$0":j(e/12,"USD"):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:L,freeTrialMessages:P,extraBlockMessage:w,isLoading:M,buttonText:k,bottomDescription:B,showMonthlyOptions:q,popularTestimony:R,skipRadioSelection:D=!1,includeText:F,height:$,showFeaturesButton:_,businessDescription:z,isPlanSelected:W=!1,onClickShowAllFeatures:Y,showSelectedPlanChip:H=!1,perMonthForYearly:I=!0}=h;return e.jsxs(r.NewSubscriptionStyled,Object.assign({height:$,showMostPopularChip:m||!1,onClick:()=>S(y)},{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(y),className:"radio-button",checked:W}),e.jsx(o.TitleRegular,Object.assign({style:{color:c.COLORS.content.secondary,marginBottom:4}},{children:b})),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:[v?e.jsx(o.BodyCaption,Object.assign({className:"old--price"},{children:x(g.price)})):e.jsx(e.Fragment,{}),e.jsx(o.TitleLarge,Object.assign({style:{color:c.COLORS.content.primary}},{children:x(v||g.price)})),e.jsx(o.BodyPrimary,Object.assign({style:{color:c.COLORS.content.secondary,marginLeft:4}},{children:T?"":"/ "+(q?"month":I?"month billed annually":"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}))]})),z&&z.length&&e.jsx("div",Object.assign({style:{marginTop:4}},{children:z.map(((s,t)=>e.jsx(o.BodySecondary,{style:{color:c.COLORS.content.secondary},dangerouslySetInnerHTML:{__html:s}},t)))})),L&&e.jsxs(o.Caption,Object.assign({className:"trial "+(O?"selected":"")},{children:["7 day free trial with ",P," messages"]})),w&&e.jsx(o.Caption,Object.assign({className:"trial "+(O?"selected":"")},{children:w})),e.jsx(o.TitleSmall,Object.assign({className:"extra-include-margin",style:{height:F?"":"20px"}},{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)))})),_&&e.jsx(n.Button,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),Y&&Y()}}),D&&e.jsx("div",Object.assign({className:"button-box"},{children:M?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:k||"Selected Plan"}),!O&&!C&&e.jsx(n.Button,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),S(y)},matchParentWidth:!0,buttonText:k||"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}))]}))]})),B&&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:B}))}))]}))};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("styled-components"),n=require("./NewSubscriptionPlan.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("styled-components"),n=require("./NewSubscriptionPlan.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const r=o(l).default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
column-gap: 22px;
|
|
4
4
|
align-items: stretch;
|
|
5
5
|
overflow-x: auto;
|
|
6
|
-
`;exports.SubscriptionPlansCollected=l=>{var
|
|
6
|
+
`;exports.SubscriptionPlansCollected=l=>{var o;const[s,a]=t.useState(null!==(o=l.selectedPlan)&&void 0!==o?o:"");return e.jsx(r,Object.assign({style:{padding:"28px 0px"}},{children:l.plans.map(((o,r)=>{var i,c,d;return e.jsx("div",Object.assign({style:{width:null!==(i=l.staticWidth)&&void 0!==i?i:308}},{children:t.createElement(n.NewSubscriptionPlan,Object.assign({},o,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==l.selectedTab)&&void 0!==c&&c,showTrialOptions:l.showTrialOptions||!1,onPlanSelect:e=>{l.onPlanSelect(e),a(e)},key:o.planName,isPlanSelected:s==("monthly"==l.selectedTab?o.code:o.yearlyCode),onClickShowAllFeatures:l.onClickShowAllFeatures,showSelectedPlanChip:l.currentPlan==("monthly"==l.selectedTab?o.code:o.yearlyCode),perMonthForYearly:null===(d=o.perMonthForYearly)||void 0===d||d}))}),r)}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{AlertStyle as r}from"./Alert.styled.js";import{COLOR_CONFIG_MAP as o}from"./AlertHelper.js";import{BodyCaption as i}from"../TypographyStyle.js";const l=l=>t(r,Object.assign({type:l.type},{children:[l.icon&&e("div",{children:e(l.icon,{color:o[l.type].textColor,height:20,width:20})}),e(i,Object.assign({style:{color:l.textColor||o[l.type].textColor,marginLeft:12}},{children:l.text}))]}));export{l as Alert};
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{AlertStyle as r}from"./Alert.styled.js";import{COLOR_CONFIG_MAP as o}from"./AlertHelper.js";import{BodyCaption as i}from"../TypographyStyle.js";const l=l=>t(r,Object.assign({type:l.type},{children:[l.icon&&e("div",Object.assign({style:{display:"flex"}},{children:e(l.icon,{color:o[l.type].textColor,height:20,width:20})})),e(i,Object.assign({style:{color:l.textColor||o[l.type].textColor,marginLeft:12}},{children:l.text}))]}));export{l as Alert};
|
|
@@ -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,BodyPrimary as p,BodySecondary as g,TitleSmall as b}from"../TypographyStyle.js";import{useCurrency as u}from"../../hooks/useCurreny.js";import{COLORS as y}from"../../constants/Theme.js";import{Tag as j}from"../tag/Tag.js";const O=O=>{var v;const{formatCurrency:f}=u(),T=O.showMonthlyOptions?O.features:O.annualFeatures||[],N=O.showMonthlyOptions?O.monthlyPlan:O.yearlyPlan,x=!O.isDisabled&&O.isMostPopular,P=O.showMonthlyOptions?O.code:null!==(v=O.yearlyCode)&&void 0!==v?v:O.code,S=e=>O.perMonthForYearly?0==e?"$0":f(e/12,"USD"):0==e?"$0":f(e,"USD"),{planName:k,isSelected:C=!1,isDisabled:M=!1,onPlanSelect:w,oldPrice:D,hideMonthYearTag:L,planDescription:F,planDescriptionDiscount:$,showTrialOptions:z,freeTrialMessages:B,extraBlockMessage:W,isLoading:Y,buttonText:_,bottomDescription:H,showMonthlyOptions:I,popularTestimony:U,skipRadioSelection:q=!1,includeText:A,height:R,showFeaturesButton:E,businessDescription:G,isPlanSelected:J=!1,onClickShowAllFeatures:K,showSelectedPlanChip:Q=!1,perMonthForYearly:V=!0}=O;return e(l,Object.assign({height:R,showMostPopularChip:x||!1,onClick:()=>w(P)},{children:[x&&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 ${M?"disabled":""} \n\t\t\t\t`},{children:[e("div",Object.assign({className:"radio-flex"},{children:[!q&&t("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=M&&M,onChange:()=>w(P),className:"radio-button",checked:J}),t(d,Object.assign({style:{color:y.content.secondary,marginBottom:4}},{children:k})),Q&&t("div",Object.assign({style:{marginLeft:"auto"}},{children:t(j,{tagText:"Current plan",type:"positive",theme:"dark"})}))]})),e("div",Object.assign({className:"price-block"},{children:[D?t(h,Object.assign({className:"old--price"},{children:S(N.price)})):t(s,{}),t(m,Object.assign({style:{color:y.content.primary}},{children:S(D||N.price)})),t(p,Object.assign({style:{color:y.content.secondary,marginLeft:4}},{children:L?"":"/ "+(I?"month":V?"month billed annually":"year")}))]})),F&&e("div",Object.assign({className:"per-message-price"},{children:[t(h,Object.assign({style:{color:y.content.secondary}},{children:F})),$&&t(h,Object.assign({style:{color:y.background.positive.vibrant,marginLeft:4}},{children:$}))]})),G&&G.length&&t("div",Object.assign({style:{marginTop:4}},{children:G.map(((e,s)=>t(g,{style:{color:y.content.secondary},dangerouslySetInnerHTML:{__html:e}},s)))})),z&&e(c,Object.assign({className:"trial "+(C?"selected":"")},{children:["7 day free trial with ",B," messages"]})),W&&t(c,Object.assign({className:"trial "+(C?"selected":"")},{children:W})),t(b,Object.assign({className:"extra-include-margin",style:{height:A?"":"20px"}},{children:A||""})),t("div",Object.assign({className:"features"},{children:T.map(((s,i)=>e("div",Object.assign({className:"feature"},{children:[t("div",{children:t(a,{height:20,width:20,color:y.content.primary})}),t(g,Object.assign({className:"feature-text"},{children:s.detail}),i)]}),s.detail)))})),E&&t(r,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),K&&K()}}),q&&t("div",Object.assign({className:"button-box"},{children:Y?t(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(s,{children:[C&&t(r,{disabled:M,LeadingIcon:i,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:_||"Selected Plan"}),!C&&!M&&t(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),w(P)},matchParentWidth:!0,buttonText:_||"Choose plan"})]})})),U&&e("div",Object.assign({className:"popular-testimony"},{children:[t(n,{height:26,width:70}),t("div",Object.assign({className:"testimony-text"},{children:U}))]}))]})),H&&t("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${M?"disabled":""}\n\t\t\t\t\t${C?"selected":""}\n\t\t\t\t`},{children:t(c,Object.assign({className:"text",style:{color:y.background.inverse}},{children:H}))}))]}))};export{O as NewSubscriptionPlan};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{useState as l,createElement as
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{useState as l,createElement as o}from"react";import t from"styled-components";import{NewSubscriptionPlan as n}from"./NewSubscriptionPlan.js";const r=t.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
column-gap: 22px;
|
|
4
4
|
align-items: stretch;
|
|
5
5
|
overflow-x: auto;
|
|
6
|
-
`,a=
|
|
6
|
+
`,a=t=>{var a;const[s,i]=l(null!==(a=t.selectedPlan)&&void 0!==a?a:"");return e(r,Object.assign({style:{padding:"28px 0px"}},{children:t.plans.map(((l,r)=>{var a,c,d;return e("div",Object.assign({style:{width:null!==(a=t.staticWidth)&&void 0!==a?a:308}},{children:o(n,Object.assign({},l,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==t.selectedTab)&&void 0!==c&&c,showTrialOptions:t.showTrialOptions||!1,onPlanSelect:e=>{t.onPlanSelect(e),i(e)},key:l.planName,isPlanSelected:s==("monthly"==t.selectedTab?l.code:l.yearlyCode),onClickShowAllFeatures:t.onClickShowAllFeatures,showSelectedPlanChip:t.currentPlan==("monthly"==t.selectedTab?l.code:l.yearlyCode),perMonthForYearly:null===(d=l.perMonthForYearly)||void 0===d||d}))}),r)}))}))};export{a as SubscriptionPlansCollected};
|