@bikdotai/bik-component-library 0.0.258-beta-fluctuate → 0.0.258
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/BikLayout.d.ts +6 -0
- package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
- package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
- package/dist/cjs/components/bik-layout/FeatureModal.d.ts +4 -0
- package/dist/cjs/components/bik-layout/FeatureModal.js +1 -1
- package/dist/cjs/components/checkBox/CheckBox.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +1 -1
- package/dist/cjs/components/list-item/ListItem.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +6 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
- package/dist/esm/components/bik-layout/FeatureModal.d.ts +4 -0
- package/dist/esm/components/bik-layout/FeatureModal.js +1 -1
- package/dist/esm/components/checkBox/CheckBox.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
- package/dist/esm/components/list-item/ListItem.js +1 -1
- package/package.json +1 -1
|
@@ -5,5 +5,9 @@ export interface FeatureModalProps {
|
|
|
5
5
|
onClickingCross: () => void;
|
|
6
6
|
otherContent?: JSX.Element;
|
|
7
7
|
onUpgrade?: () => void;
|
|
8
|
+
title?: string;
|
|
9
|
+
subTitle?: string;
|
|
10
|
+
showBookADemo?: boolean;
|
|
11
|
+
demoLink?: string;
|
|
8
12
|
}
|
|
9
13
|
export declare const FeatureModal: React.FC<FeatureModalProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../constants/Theme.js"),t=require("../../assets/icons/cross.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../constants/Theme.js"),t=require("../../assets/icons/cross.svg.js"),n=require("../button/Button.js"),r=require("../TypographyStyle.js"),i=require("./CommonStyles.js");exports.FeatureModal=o=>{const{zIndex:a,disableCross:c=!1,otherContent:l,onClickingCross:d,onUpgrade:u,title:j,subTitle:h,showBookADemo:x,demoLink:b}=o,g=j||"Upgrade to access this feature",m=h||"This feature is not included in the current plan. Upgrade to get access and use this feature.";return e.jsxs(i.FeatureModalContainer,Object.assign({zIndex:a},{children:[!c&&e.jsx("div",Object.assign({className:"cross-button",onClick:()=>d(),"aria-hidden":"true"},{children:e.jsx(t.default,{height:20,width:20,color:s.COLORS.surface.subdued})})),e.jsx(i.InnerModalContainer,{children:l?e.jsx(e.Fragment,{children:l}):e.jsxs("div",Object.assign({className:"content-layout"},{children:[e.jsxs("div",{children:[e.jsx(r.TitleMedium,Object.assign({className:"title-color"},{children:g})),e.jsx(r.BodyPrimary,Object.assign({className:"title-color mt-8"},{children:m}))]}),e.jsxs("div",Object.assign({className:"cta-buttons"},{children:[x&&e.jsx(n.Button,{buttonText:"Book a demo",buttonType:"secondary",size:"large",inverse:!0,onClick:()=>{window.open(b,"_blank")}}),e.jsx(n.Button,{buttonText:"Upgrade plan",buttonType:"primary",size:"large",inverse:!0,onClick:()=>u?u():""})]}))]}))})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[c,n]=s.useState(r.isChecked||!1),[o,d]=s.useState(r.isPartiallyChecked||!1),[h,x]=s.useState(r.isDisabled||!1),[u,S]=s.useState(!1),[b,C]=s.useState(!1);return s.useEffect((()=>{n(r.isChecked)}),[r.isChecked]),s.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),s.useEffect((()=>{d(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]),e.jsxs(i.CheckboxContainer,Object.assign({onClick:()=>{var e;if(!r.isDisabled){const s=!c;n(s),null===(e=r.onValueChange)||void 0===e||e.call(r,s,r.value)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>C(!r.skipHoverState),onMouseUp:()=>C(!1)},{children:[e.jsx(i.CheckboxIcon,Object.assign({checked:c,hovered:u,clicked:b,isDisabled:h,size:r.size},{children:c&&e.jsx(a,{isPartial:o||!1,isDisabled:h,isSmall:"SMALL"===r.size})})),r.label&&"SMALL"!==r.size&&e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.label&&"SMALL"===r.size&&e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label}))]}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),i=require("./CheckBox.styled.js"),l=require("../TypographyStyle.js"),t=require("../../constants/Theme.js");const a=s=>e.jsxs("svg",Object.assign({width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",viewBox:s.isSmall?"0 0 16 16":"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[e.jsx("rect",{x:"0",y:"0",width:s.isSmall?"16":"18",height:s.isSmall?"16":"18",rx:"4",fill:s.isDisabled?t.COLORS.content.inactive:t.COLORS.background.positive.vibrant}),!s.isPartial&&e.jsx("svg",Object.assign({width:s.isSmall?"8":"10",height:s.isSmall?"7":"9",x:"4",y:"4",viewBox:"0 0 10 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.68189 1.06043C10.0724 1.45096 10.0724 2.08412 9.68189 2.47464L4.02501 8.13152C3.63449 8.52205 3.00132 8.52205 2.6108 8.13152L0.489684 6.01041C0.0991601 5.61988 0.0991598 4.98672 0.489684 4.59619C0.880209 4.20567 1.51337 4.20567 1.9039 4.59619L3.31791 6.0102L8.26768 1.06043C8.6582 0.669907 9.29137 0.669907 9.68189 1.06043Z",fill:"white"})})),s.isPartial&&e.jsx("rect",{x:"5",y:s.isSmall?"7":"8",width:s.isSmall?"6":"8",height:"2",rx:"1",fill:t.COLORS.surface.standard})]}));exports.CheckBox=r=>{const[c,n]=s.useState(r.isChecked||!1),[o,d]=s.useState(r.isPartiallyChecked||!1),[h,x]=s.useState(r.isDisabled||!1),[u,S]=s.useState(!1),[b,C]=s.useState(!1);return s.useEffect((()=>{n(r.isChecked)}),[r.isChecked]),s.useEffect((()=>{x(r.isDisabled||!1)}),[r.isDisabled]),s.useEffect((()=>{d(r.isPartiallyChecked||!1)}),[r.isPartiallyChecked]),e.jsxs(i.CheckboxContainer,Object.assign({onClick:()=>{var e;if(!r.isDisabled){const s=!c;o?d(!o):n(s),null===(e=r.onValueChange)||void 0===e||e.call(r,s,r.value)}},onMouseEnter:()=>S(!r.skipHoverState),onMouseLeave:()=>S(!1),onMouseDown:()=>C(!r.skipHoverState),onMouseUp:()=>C(!1)},{children:[e.jsx(i.CheckboxIcon,Object.assign({checked:c,hovered:u,clicked:b,isDisabled:h,size:r.size},{children:c&&e.jsx(a,{isPartial:o||!1,isDisabled:h,isSmall:"SMALL"===r.size})})),r.label&&"SMALL"!==r.size&&e.jsx(l.BodyPrimary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label})),r.label&&"SMALL"===r.size&&e.jsx(l.BodySecondary,Object.assign({color:r.isDisabled?t.COLORS.text.disabled:t.COLORS.text.primary},{children:r.label}))]}))};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
padding: ${e=>"2.0"===e.version?"8px 12px":"14px 16px"} !important;
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
margin-top: ${e=>"2.0"===e.version?"2px":"0"};
|
|
5
|
-
`;exports.MenuItem=t=>{let{option:i,isMultiSelect:l,showDescription:a,onSelect:d,last:u,version:p}=t;var
|
|
5
|
+
`;exports.MenuItem=t=>{let{option:i,isMultiSelect:l,showDescription:a,onSelect:d,last:u,version:p}=t;var x;function g(e){i.disabled||d(Object.assign(Object.assign({},i),{selected:e}))}return e.jsx(c,{version:p,style:u?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),g(!i.selected)},onMouseOver:function(){i.description?a(i.label,i.description):a()},listItem:{value:i.value,label:i.label},subText:i.subText,leadingIcon:l?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(n.CheckBox,{size:"2.0"===p?"SMALL":"DEFAULT",isDisabled:null!==(x=i.disabled)&&void 0!==x&&x,isChecked:!!i.selected,onValueChange:g}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:i.leadingIcon}))]})):i.leadingIcon?e.jsx(e.Fragment,{children:i.leadingIcon}):e.jsx(e.Fragment,{}),customComponent:i.customComponent,trailingIcon:i.isFreeForm?e.jsx(o.FreeFormContainer,{children:e.jsx(s.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:"Freeform"}))}):i.trailingIcon?e.jsx(e.Fragment,{children:i.trailingIcon}):e.jsx(e.Fragment,{}),variant:i.disabled?"inactive":i.selected?"selected":"default"})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),s=require("./themes.js"),i=require("../TypographyStyle.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),r=require("react"),s=require("./themes.js"),i=require("../TypographyStyle.js"),n=require("../../constants/Theme.js"),o=require("./ListItem.styled.js");const l=r.forwardRef(((r,l)=>{var{id:a,onSelect:c,variant:d="default",trailingIcon:m,leadingIcon:u,subText:j,listItem:x,borderBottom:y,customComponent:g,version:p}=r,b=e.__rest(r,["id","onSelect","variant","trailingIcon","leadingIcon","subText","listItem","borderBottom","customComponent","version"]);return t.jsx(o.ListItem,Object.assign({ref:l,id:a,variant:d,onClick:()=>c&&c(x),borderBottom:y,version:p},b,{children:g?t.jsx(t.Fragment,{children:g}):t.jsxs("div",Object.assign({style:{display:"flex",alignItems:"All"===x.value?"flex-start":"center",gap:8}},{children:[!!u&&u,t.jsxs("div",Object.assign({style:{display:"flex",rowGap:"4px",flexDirection:"column"}},{children:[!!x&&t.jsx(i.BodySecondary,Object.assign({style:{fontSize:("2.0"===p?12:14)+"px",color:s.getColor(d)}},{children:x.label})),!!j&&t.jsx(i.BodyCaption,Object.assign({style:{color:n.COLORS.text.secondary}},{children:j}))]})),!!m&&t.jsx("div",Object.assign({style:{display:"flex",marginLeft:"auto"}},{children:m}))]}))}))}));l.displayName="ListItem",exports.ListItem=l;
|
|
@@ -11,5 +11,11 @@ export interface BikLayoutProps {
|
|
|
11
11
|
onClickingCrossOnFeatureModal?: () => void;
|
|
12
12
|
onUpgrade?: () => void;
|
|
13
13
|
extraContentForModal?: JSX.Element;
|
|
14
|
+
featureModalProps?: {
|
|
15
|
+
title?: string;
|
|
16
|
+
subTitle?: string;
|
|
17
|
+
showBookADemo?: boolean;
|
|
18
|
+
demoLink?: string;
|
|
19
|
+
};
|
|
14
20
|
}
|
|
15
21
|
export declare const BikLayout: React.FC<BikLayoutProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,Fragment as r,jsxs as
|
|
1
|
+
import{jsx as e,Fragment as r,jsxs as o}from"react/jsx-runtime";import{BikLayoutContainer as n}from"./CommonStyles.js";import{FeatureModal as i}from"./FeatureModal.js";import{PageLoader as a}from"./PageLoader.js";const s=s=>{const{isLoading:t,isFeatureModalEnabled:d=!1,isDisabled:l=!1,loadingAnimation:c,hidePadding:m=!1,height:p,children:g,containerStyles:h,onClickingCrossOnFeatureModal:j,onUpgrade:u,extraContentForModal:C,featureModalProps:b}=s;return t?e(n,{children:c||e(a,{})}):e(r,{children:o(n,{children:[e("div",{className:""+(l?"disabled--wrapper":"")}),e("div",Object.assign({className:""+(m?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${p||""}`},null!=h?h:{})},{children:g})),d&&e(i,Object.assign({showBookADemo:!0,onClickingCross:()=>j?j():"",onUpgrade:u},b,{otherContent:C}))]})})};export{s as BikLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as l,useEffect as t,Fragment as a}from"react";import{COLORS as
|
|
1
|
+
import{jsxs as e,jsx as i,Fragment as n}from"react/jsx-runtime";import o from"../../assets/icons/Bik_logo.svg.js";import{useState as l,useEffect as t,Fragment as a}from"react";import{COLORS as d}from"../../constants/Theme.js";import{SideBarContainer as s,SibeBarMenuItem as c}from"./SidebarStyles.js";import{SimpleSidebar as r}from"./SimpleSidebar.js";const v=d=>{const{logoSvg:v,allMenuList:m,activeMainMenu:h,activeSubMenu:g,onClickingMainMenu:k,onClickingSubMenu:y,onClickingAccessUpgradePanel:p}=d,[b,M]=l(h),[S,j]=l(),[f,N]=l(g);return t((()=>{M(h)}),[h]),t((()=>{N(g)}),[g]),e(s,{children:[i("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:v||i(o,{})})),i(c,{children:null==m?void 0:m.map(((o,l)=>{var t,d,s,c,v;return e(a,{children:[i("div",Object.assign({id:(null===(d=null===(t=o.displayName)||void 0===t?void 0:t.split(" "))||void 0===d?void 0:d.join(""))||o.key.toString(),className:"main--sidebar",onClick:()=>{var e;j(void 0),M(o),k(o),(null===(e=null==o?void 0:o.children)||void 0===e?void 0:e.length)?N(null==o?void 0:o.children[0]):N({})},onMouseOver:()=>{j(o)},onMouseEnter:()=>{j(o)},onMouseLeave:()=>{var e;!(null===(e=null==o?void 0:o.children)||void 0===e?void 0:e.length)&&j(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e("div",Object.assign({className:`sidebar-menu-item ${(null==b?void 0:b.key)==o.key?" main-menu-active-class":""} ${o.isLastSticky?"sticky-menu-int":""} ${o.is2ndLastSticky?"sticky-menu":""}\n ${o.key==(null==S?void 0:S.key)?"sidebar-menu-item-hover":""}`},{children:[i(u,{icon:o.icon,isActive:o.key==(null==b?void 0:b.key),activeStateIcon:null!==(s=o.activeIcon)&&void 0!==s?s:{},hoverStateIcon:null!==(c=o.hoverIcon)&&void 0!==c?c:{},isHovered:o.key==(null==S?void 0:S.key)}),i("div",Object.assign({className:"menu-item-container"},{children:i("p",Object.assign({className:"menu-item-text "+((null==o?void 0:o.key)===(null==b?void 0:b.key)?"active-menu-item-text":"")},{children:o.displayName}))}))]}),l)}),l),i(n,{children:(null===(v=null==S?void 0:S.children)||void 0===v?void 0:v.length)&&i(r,{menuList:null==S?void 0:S.children,activeMenu:f,onMouseLeaveOnMenu:()=>j(void 0),left:88,postion:"fixed",header:S.displayName,theme:"brand",showAccessUpgradePanel:S.showAccessUpgradePanel,onMenuClick:e=>{N(e),M(S),j(void 0),y(e)},onUpgrade:p})})]},l)}))})]})},u=e=>{const{icon:o,isActive:l,activeStateIcon:t,hoverStateIcon:a,isHovered:s}=e,c=o,r=a;return i(n,{children:l?i(t,{width:20,height:20}):i(s?r:c,{width:20,height:20,color:d.surface.standard})})};export{v as BikSidebar};
|