@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
- import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{useState as a,Fragment as r}from"react";import n from"react-dom";import{COLORS as s}from"../../constants/Theme.js";import{Button as i}from"../button/Button.js";import{StyledModal as c}from"../modals/styledModal.js";import{TitleLarge as l,BodySecondary as m}from"../TypographyStyle.js";import{FeatureModalV2Container as d}from"./CommonStyles.js";const b=b=>{const{zIndex:u,otherContent:y,onUpgrade:p,title:g,subTitle:f,primaryButtonText:h,onClose:j,featureImage:x}=b,O=g||"Start your 14-day free trial to test your AI assistant on your website",C=f||"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.",T=x||"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",[w,k]=a(!0);return n.createPortal(t(c,Object.assign({zIndex:u,open:w,onClose:function(){j&&j(),k(!1)},closeOnOutsideClick:!0,centralContainerStyles:{maxWidth:"568px"}},{children:t(d,{children:y?t(e,{children:y}):o(r,{children:[t("div",Object.assign({className:"top-feature-content"},{children:t("img",{src:T,alt:"general-icon"})})),o("div",Object.assign({className:"bottom-feature-content"},{children:[t(l,Object.assign({className:"title-class text-align-center mt-8",style:{textAlign:"center"}},{children:O})),t(m,Object.assign({className:"text-align-center",style:{color:s.content.secondary}},{children:C})),t("div",Object.assign({className:"cta-buttons"},{children:t(i,{buttonText:h||"Upgrade to growth plan",buttonType:"primary",size:"large",onClick:()=>{p&&p(),k(!1)}})}))]}))]})})})),document.body)};export{b as FeatureModalV2};
1
+ import{jsx as t,Fragment as e,jsxs as o}from"react/jsx-runtime";import{useState as a,Fragment as r}from"react";import n from"react-dom";import{COLORS as s}from"../../constants/Theme.js";import{Button as i}from"../button/Button.js";import{StyledModal as c}from"../modals/styledModal.js";import{TitleMedium as l,BodySecondary as m}from"../TypographyStyle.js";import{FeatureModalV2Container as d}from"./CommonStyles.js";const b=b=>{const{zIndex:u,otherContent:y,onUpgrade:p,title:g,subTitle:f,primaryButtonText:h,onClose:j,featureImage:x}=b,O=g||"Start your 14-day free trial to test your AI assistant on your website",C=f||"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.",T=x||"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",[w,k]=a(!0);return n.createPortal(t(c,Object.assign({zIndex:u,open:w,onClose:function(){j&&j(),k(!1)},closeOnOutsideClick:!0,centralContainerStyles:{maxWidth:"568px"}},{children:t(d,{children:y?t(e,{children:y}):o(r,{children:[t("div",Object.assign({className:"top-feature-content"},{children:t("img",{src:T,alt:"general-icon"})})),o("div",Object.assign({className:"bottom-feature-content"},{children:[t(l,Object.assign({className:"title-class text-align-center mt-8",style:{textAlign:"center"}},{children:O})),t(m,Object.assign({className:"text-align-center",style:{color:s.content.secondary}},{children:C})),t("div",Object.assign({className:"cta-buttons"},{children:t(i,{buttonText:h||"Upgrade to growth plan",buttonType:"primary",size:"large",onClick:()=>{p&&p(),k(!1)}})}))]}))]})})})),document.body)};export{b as FeatureModalV2};
@@ -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
- 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 c}from"./SubscriptionPlanStyled.js";import{Caption as l,TitleRegular as d,BodyCaption as m,TitleLarge as h,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";const j=j=>{var O;const{formatCurrency:v}=u(),f=j.showMonthlyOptions?j.features:j.annualFeatures||[],N=j.showMonthlyOptions?j.monthlyPlan:j.yearlyPlan,T=!j.isDisabled&&j.isMostPopular,x=j.showMonthlyOptions?j.code:null!==(O=j.yearlyCode)&&void 0!==O?O:j.code,P=e=>0==e?"$0":v(e,"USD"),{planName:k,isSelected:S=!1,isDisabled:w=!1,onPlanSelect:C,oldPrice:M,hideMonthYearTag:D,planDescription:L,planDescriptionDiscount:z,showTrialOptions:B,freeTrialMessages:F,extraBlockMessage:W,isLoading:$,buttonText:_,bottomDescription:H,showMonthlyOptions:I,popularTestimony:q,skipRadioSelection:A=!1,includeText:R,height:U,showFeaturesButton:Y,businessDescription:E,isPlanSelected:G=!1,onClickShowAllFeatures:J}=j;return e(c,Object.assign({height:U,showMostPopularChip:T||!1,onClick:()=>C(x)},{children:[T&&e("div",Object.assign({className:"most-popular-chip"},{children:[t(l,Object.assign({className:"popular-text"},{children:"Most popular "})),t(o,{height:12,width:12})]})),e("div",Object.assign({className:`box ${w?"disabled":""} \n\t\t\t\t`},{children:[e("div",Object.assign({className:"radio-flex"},{children:[!A&&t("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=w&&w,onChange:()=>C(x),className:"radio-button",checked:G}),t(d,Object.assign({style:{color:y.content.secondary,marginBottom:4}},{children:k}))]})),e("div",Object.assign({className:"price-block"},{children:[M?t(m,Object.assign({className:"old--price"},{children:P(N.price)})):t(s,{}),t(h,Object.assign({style:{color:y.content.primary}},{children:P(M||N.price)})),t(p,Object.assign({style:{color:y.content.secondary,marginLeft:4}},{children:D?"":"/ "+(I?"month":"year")}))]})),L&&e("div",Object.assign({className:"per-message-price"},{children:[t(m,Object.assign({style:{color:y.content.secondary}},{children:L})),z&&t(m,Object.assign({style:{color:y.background.positive.vibrant,marginLeft:4}},{children:z}))]})),E&&E.length&&t("div",Object.assign({style:{marginTop:4}},{children:E.map(((e,s)=>t(g,{style:{color:y.content.secondary},dangerouslySetInnerHTML:{__html:e}},s)))})),B&&e(l,Object.assign({className:"trial "+(S?"selected":"")},{children:["7 day free trial with ",F," messages"]})),W&&t(l,Object.assign({className:"trial "+(S?"selected":"")},{children:W})),R&&t(b,Object.assign({className:"extra-include-margin"},{children:R})),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:y.content.primary})}),t(g,Object.assign({className:"feature-text"},{children:s.detail}),i)]}),s.detail)))})),Y&&t(r,{isLoading:!1,buttonType:"tertiary",buttonText:"See all features",size:"small",onClick:e=>{e.stopPropagation(),J&&J()}}),A&&t("div",Object.assign({className:"button-box"},{children:$?t(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(s,{children:[S&&t(r,{disabled:w,LeadingIcon:i,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:_||"Selected Plan"}),!S&&!w&&t(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),C(x)},matchParentWidth:!0,buttonText:_||"Choose plan"})]})})),q&&e("div",Object.assign({className:"popular-testimony"},{children:[t(n,{height:26,width:70}),t("div",Object.assign({className:"testimony-text"},{children:q}))]}))]})),H&&t("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${w?"disabled":""}\n\t\t\t\t\t${S?"selected":""}\n\t\t\t\t`},{children:t(l,Object.assign({className:"text",style:{color:y.background.inverse}},{children:H}))}))]}))};export{j as NewSubscriptionPlan};
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 m,TitleLarge as h,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,k=e=>0==e?"$0":f(e,"USD"),{planName:C,isSelected:S=!1,isDisabled:w=!1,onPlanSelect:M,oldPrice:D,hideMonthYearTag:L,planDescription:z,planDescriptionDiscount:B,showTrialOptions:F,freeTrialMessages:W,extraBlockMessage:$,isLoading:_,buttonText:H,bottomDescription:I,showMonthlyOptions:q,popularTestimony:A,skipRadioSelection:R=!1,includeText:U,height:Y,showFeaturesButton:E,businessDescription:G,isPlanSelected:J=!1,onClickShowAllFeatures:K,showSelectedPlanChip:Q=!1}=O;return e(l,Object.assign({height:Y,showMostPopularChip:x||!1,onClick:()=>M(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 ${w?"disabled":""} \n\t\t\t\t`},{children:[e("div",Object.assign({className:"radio-flex"},{children:[!R&&t("input",{type:"radio",id:"html",name:"fav_language",value:"HTML",disabled:null!=w&&w,onChange:()=>M(P),className:"radio-button",checked:J}),t(d,Object.assign({style:{color:y.content.secondary,marginBottom:4}},{children:C})),Q&&t(j,{tagText:"Current plan",type:"positive",theme:"dark"})]})),e("div",Object.assign({className:"price-block"},{children:[D?t(m,Object.assign({className:"old--price"},{children:k(N.price)})):t(s,{}),t(h,Object.assign({style:{color:y.content.primary}},{children:k(D||N.price)})),t(p,Object.assign({style:{color:y.content.secondary,marginLeft:4}},{children:L?"":"/ "+(q?"month":"year")}))]})),z&&e("div",Object.assign({className:"per-message-price"},{children:[t(m,Object.assign({style:{color:y.content.secondary}},{children:z})),B&&t(m,Object.assign({style:{color:y.background.positive.vibrant,marginLeft:4}},{children:B}))]})),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)))})),F&&e(c,Object.assign({className:"trial "+(S?"selected":"")},{children:["7 day free trial with ",W," messages"]})),$&&t(c,Object.assign({className:"trial "+(S?"selected":"")},{children:$})),U&&t(b,Object.assign({className:"extra-include-margin"},{children:U})),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()}}),R&&t("div",Object.assign({className:"button-box"},{children:_?t(r,{isLoading:!0,buttonType:"primary",buttonText:"Choose plan",size:"medium",matchParentWidth:!0}):e(s,{children:[S&&t(r,{disabled:w,LeadingIcon:i,buttonType:"tertiary",size:"medium",matchParentWidth:!0,buttonText:H||"Selected Plan"}),!S&&!w&&t(r,{buttonType:"primary",size:"medium",onClick:e=>{e.stopPropagation(),M(P)},matchParentWidth:!0,buttonText:H||"Choose plan"})]})})),A&&e("div",Object.assign({className:"popular-testimony"},{children:[t(n,{height:26,width:70}),t("div",Object.assign({className:"testimony-text"},{children:A}))]}))]})),I&&t("div",Object.assign({className:`plan-bottom-information\n\t\t\t\t\t${w?"disabled":""}\n\t\t\t\t\t${S?"selected":""}\n\t\t\t\t`},{children:t(c,Object.assign({className:"text",style:{color:y.background.inverse}},{children:I}))}))]}))};export{O as NewSubscriptionPlan};
@@ -1,6 +1,6 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,createElement as l}from"react";import o from"styled-components";import{NewSubscriptionPlan as n}from"./NewSubscriptionPlan.js";const s=o.div`
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as l,createElement as t}from"react";import o from"styled-components";import{NewSubscriptionPlan as n}from"./NewSubscriptionPlan.js";const s=o.div`
2
2
  display: flex;
3
3
  column-gap: 22px;
4
4
  align-items: stretch;
5
5
  overflow-x: auto;
6
- `,i=o=>{var i;const[a,r]=t(null!==(i=o.selectedPlan)&&void 0!==i?i:"");return e(s,Object.assign({style:{padding:"28px 0px"}},{children:o.plans.map(((t,s)=>{var i,c;return e("div",Object.assign({style:{width:null!==(i=o.staticWidth)&&void 0!==i?i:308}},{children:l(n,Object.assign({},t,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==o.selectedTab)&&void 0!==c&&c,showTrialOptions:o.showTrialOptions||!1,onPlanSelect:e=>{o.onPlanSelect(e),r(e)},key:t.planName,isPlanSelected:a==("monthly"==o.selectedTab?t.code:t.yearlyCode),onClickShowAllFeatures:o.onClickShowAllFeatures}))}),s)}))}))};export{i as SubscriptionPlansCollected};
6
+ `,a=o=>{var a;const[i,r]=l(null!==(a=o.selectedPlan)&&void 0!==a?a:"");return e(s,Object.assign({style:{padding:"28px 0px"}},{children:o.plans.map(((l,s)=>{var a,c;return e("div",Object.assign({style:{width:null!==(a=o.staticWidth)&&void 0!==a?a:308}},{children:t(n,Object.assign({},l,{showMonthly:!0,showMonthlyOptions:null!==(c="monthly"==o.selectedTab)&&void 0!==c&&c,showTrialOptions:o.showTrialOptions||!1,onPlanSelect:e=>{o.onPlanSelect(e),r(e)},key:l.planName,isPlanSelected:i==("monthly"==o.selectedTab?l.code:l.yearlyCode),onClickShowAllFeatures:o.onClickShowAllFeatures,showSelectedPlanChip:o.selectedPlan==("monthly"==o.selectedTab?l.code:l.yearlyCode)}))}),s)}))}))};export{a as SubscriptionPlansCollected};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.362",
3
+ "version": "0.0.364-beta-chip",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",