@bikdotai/bik-component-library 0.0.245-beta.6 → 0.0.246-0

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.
Files changed (79) hide show
  1. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +0 -6
  2. package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  3. package/dist/cjs/components/bik-layout/BikHeader.d.ts +0 -3
  4. package/dist/cjs/components/bik-layout/BikHeader.js +1 -1
  5. package/dist/cjs/components/bik-layout/BikLayout.d.ts +0 -6
  6. package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
  7. package/dist/cjs/components/bik-layout/BikSidebar.js +1 -1
  8. package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
  9. package/dist/cjs/components/bik-layout/FeatureModal.d.ts +0 -4
  10. package/dist/cjs/components/bik-layout/FeatureModal.js +1 -1
  11. package/dist/cjs/components/button/model.d.ts +0 -1
  12. package/dist/cjs/components/buttonGroup/ButtonGroup.d.ts +0 -2
  13. package/dist/cjs/components/buttonGroup/ButtonGroup.js +1 -1
  14. package/dist/cjs/components/buttonGroup/ButtonGroupStyle.d.ts +0 -2
  15. package/dist/cjs/components/buttonGroup/ButtonGroupStyle.js +2 -2
  16. package/dist/cjs/components/checkBox/CheckBox.d.ts +0 -1
  17. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  18. package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
  19. package/dist/cjs/components/dropdown/MenuItem/MenuItem.d.ts +0 -1
  20. package/dist/cjs/components/dropdown/MenuItem/MenuItem.js +2 -2
  21. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
  22. package/dist/cjs/components/dropdown/type.d.ts +0 -1
  23. package/dist/cjs/components/input/Input.styled.js +1 -1
  24. package/dist/cjs/components/list-item/ListItem.js +1 -1
  25. package/dist/cjs/components/modals/Modal.d.ts +0 -1
  26. package/dist/cjs/components/modals/Modal.js +1 -1
  27. package/dist/cjs/components/modals/styledModal.d.ts +0 -1
  28. package/dist/cjs/components/modals/styledModal.js +1 -1
  29. package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
  30. package/dist/cjs/components/plans/SubscriptionPlanSelector.js +1 -1
  31. package/dist/cjs/components/plans/SubscriptionPlanStyled.d.ts +0 -1
  32. package/dist/cjs/components/plans/SubscriptionPlanStyled.js +1 -1
  33. package/dist/cjs/components/states/index.d.ts +0 -1
  34. package/dist/cjs/components/states-modal/StateModalComponent.d.ts +0 -1
  35. package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
  36. package/dist/cjs/components/tabs/Tabs.js +1 -1
  37. package/dist/cjs/index.js +1 -1
  38. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.d.ts +0 -6
  39. package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
  40. package/dist/esm/components/bik-layout/BikHeader.d.ts +0 -3
  41. package/dist/esm/components/bik-layout/BikHeader.js +1 -1
  42. package/dist/esm/components/bik-layout/BikLayout.d.ts +0 -6
  43. package/dist/esm/components/bik-layout/BikLayout.js +1 -1
  44. package/dist/esm/components/bik-layout/BikSidebar.js +1 -1
  45. package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
  46. package/dist/esm/components/bik-layout/FeatureModal.d.ts +0 -4
  47. package/dist/esm/components/bik-layout/FeatureModal.js +1 -1
  48. package/dist/esm/components/button/model.d.ts +0 -1
  49. package/dist/esm/components/buttonGroup/ButtonGroup.d.ts +0 -2
  50. package/dist/esm/components/buttonGroup/ButtonGroup.js +1 -1
  51. package/dist/esm/components/buttonGroup/ButtonGroupStyle.d.ts +0 -2
  52. package/dist/esm/components/buttonGroup/ButtonGroupStyle.js +2 -2
  53. package/dist/esm/components/checkBox/CheckBox.d.ts +0 -1
  54. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  55. package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
  56. package/dist/esm/components/dropdown/MenuItem/MenuItem.d.ts +0 -1
  57. package/dist/esm/components/dropdown/MenuItem/MenuItem.js +1 -1
  58. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
  59. package/dist/esm/components/dropdown/type.d.ts +0 -1
  60. package/dist/esm/components/input/Input.styled.js +1 -1
  61. package/dist/esm/components/list-item/ListItem.js +1 -1
  62. package/dist/esm/components/modals/Modal.d.ts +0 -1
  63. package/dist/esm/components/modals/Modal.js +1 -1
  64. package/dist/esm/components/modals/styledModal.d.ts +0 -1
  65. package/dist/esm/components/modals/styledModal.js +1 -1
  66. package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
  67. package/dist/esm/components/plans/SubscriptionPlanSelector.js +1 -1
  68. package/dist/esm/components/plans/SubscriptionPlanStyled.d.ts +0 -1
  69. package/dist/esm/components/plans/SubscriptionPlanStyled.js +1 -1
  70. package/dist/esm/components/states/index.d.ts +0 -1
  71. package/dist/esm/components/states-modal/StateModalComponent.d.ts +0 -1
  72. package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
  73. package/dist/esm/components/tabs/Tabs.js +1 -1
  74. package/dist/esm/index.js +1 -1
  75. package/package.json +1 -1
  76. package/dist/cjs/components/states/ShopifyScopeWrapper.d.ts +0 -14
  77. package/dist/cjs/components/states/ShopifyScopeWrapper.js +0 -1
  78. package/dist/esm/components/states/ShopifyScopeWrapper.d.ts +0 -14
  79. package/dist/esm/components/states/ShopifyScopeWrapper.js +0 -1
@@ -22,12 +22,7 @@ export interface AnalyticsDropdownInterface {
22
22
  onOptionSelected: (chosen: DropdownOptions & {
23
23
  selectedRange?: [Date, Date];
24
24
  }) => void;
25
- maxHeight?: string;
26
25
  backgroundColor?: string;
27
- calendarPopperConfig?: {
28
- offsetSkid?: number;
29
- offsetDistance?: number;
30
- };
31
26
  }
32
27
  export declare const AnalyticsDropdown: React.FC<AnalyticsDropdownInterface>;
33
28
  export declare const EachItem: React.FC<{
@@ -35,6 +30,5 @@ export declare const EachItem: React.FC<{
35
30
  selectedOption: DropdownOptions | undefined;
36
31
  selectedDate: Date[] | undefined;
37
32
  onClickingEachItem: (optionSelected: DropdownOptions) => void;
38
- rangeSelection?: boolean;
39
33
  }>;
40
34
  export declare const formatDate: (dateVal: Date) => string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("react-bootstrap"),o=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js"),i=require("../TypographyStyle.js"),l=require("./CommonStyles.js");const a=t=>{let{eachOption:n,selectedOption:s,selectedDate:a,onClickingEachItem:c,rangeSelection:r}=t;return e.jsxs(l.ItemMenuContainer,Object.assign({onClick:()=>c(n),isSelected:n.isCustom?n.key==(null==s?void 0:s.key)&&!!a:n.key==(null==s?void 0:s.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:n.key==(null==s?void 0:s.key)?o.BASE_COLORS.positive[900]:o.BASE_COLORS.grayscale[900]},{children:n.label})),a&&(null==s?void 0:s.isCustom)&&n.key==(null==s?void 0:s.key)&&e.jsx(i.BodyCaption,{children:r?`${d(a[0])} to ${d(a[1])}`:`${d(a[0])}`})]}),n.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=o=>{let{options:c,placeholder:r="Select an option",selected:u,onOptionSelected:g,resetDropdown:p,maxHeight:v,backgroundColor:O,calendarPopperConfig:j}=o;var m,S,D;const[h,y]=t.useState(!1),[b,x]=t.useState(u),[f,k]=t.useState(),[w,R]=t.useState(!1),C=()=>{!h&&R(!w)},[E,q]=t.useState(u);return t.useEffect((()=>{p&&x(void 0)}),[p]),t.useEffect((()=>{var e;(null==u?void 0:u.isCustom)&&(null===(e=u.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?k(u.dateRangeSelectionOptions.selectedDates):u&&x(u)}),[u]),e.jsx(e.Fragment,{children:e.jsxs(l.MainDropdown,Object.assign({drop:"down",show:w,onToggle:C,backgroundColor:O},{children:[e.jsx(n.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown"},{children:e.jsx(i.BodySecondary,{children:(null==b?void 0:b.isCustom)?f?d(f[0])===d(f[1])?`${d(f[0])}`:`${d(f[0])} to ${d(f[1])}`:null==E?void 0:E.label:b?null==b?void 0:b.label:r})})),e.jsx(n.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(l.MainDropdown,Object.assign({drop:"end",id:"sub--dropdown",show:h,onToggle:e=>{!e&&R(!1),y(!h)}},{children:[e.jsx("div",Object.assign({style:{maxHeight:v||"auto",overflowY:"scroll"}},{children:c.map((t=>{var o;return e.jsx("div",{children:(null==t?void 0:t.isCustom)?e.jsx(n.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(a,{eachOption:t,selectedOption:b,selectedDate:f,onClickingEachItem:e=>{x(e),y(!0)},rangeSelection:!!(null===(o=null==t?void 0:t.dateRangeSelectionOptions)||void 0===o?void 0:o.selectRange)})})):e.jsx(a,{eachOption:t,selectedOption:b,selectedDate:f,onClickingEachItem:e=>{if(x(e),q(e),C(),!e.noOfDays)return void g(e);const t=new Date,n=new Date;n.setDate(t.getDate()-e.noOfDays),g(Object.assign(Object.assign({},e),{selectedRange:[n,t]}))}})},null==t?void 0:t.key)}))})),e.jsx(n.Dropdown.Menu,Object.assign({className:"sub--dropdown",popperConfig:{modifiers:[{name:"offset",options:{offset:[(null==j?void 0:j.offsetSkid)||0,(null==j?void 0:j.offsetDistance)||0]}}]}},{children:e.jsx(s.DatePicker,{selectRange:(null===(m=null==b?void 0:b.dateRangeSelectionOptions)||void 0===m?void 0:m.selectRange)||!1,maxDate:null===(S=null==b?void 0:b.dateRangeSelectionOptions)||void 0===S?void 0:S.maxDate,minDate:null===(D=null==b?void 0:b.dateRangeSelectionOptions)||void 0===D?void 0:D.minDate,selectedDates:f,onSelectRange:(e,t)=>{const n=[e,t];(null==b?void 0:b.dateRangeSelectionOptions)&&(b.dateRangeSelectionOptions.selectedDates=n,g(Object.assign(Object.assign({},b),{selectedRange:[e,t]}))),q(b),y(!1),k(n),R(!w)},onSelectDate:e=>{(null==b?void 0:b.dateRangeSelectionOptions)&&(b.dateRangeSelectionOptions.selectedDates=[e,e],g(Object.assign(Object.assign({},b),{selectedRange:[e,e]}))),q(b),y(!1),k([e,e]),R(!w)}})}))]}))}))]}))})},exports.EachItem=a,exports.formatDate=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),o=require("react-bootstrap"),n=require("../../constants/Theme.js"),s=require("../datePicker/DatePicker.js"),i=require("../TypographyStyle.js"),a=require("./CommonStyles.js");const l=t=>{let{eachOption:o,selectedOption:s,selectedDate:l,onClickingEachItem:c}=t;return e.jsxs(a.ItemMenuContainer,Object.assign({onClick:()=>c(o),isSelected:o.isCustom?o.key==(null==s?void 0:s.key)&&!!l:o.key==(null==s?void 0:s.key)},{children:[e.jsx(i.BodySecondary,Object.assign({color:o.key==(null==s?void 0:s.key)?n.BASE_COLORS.positive[900]:n.BASE_COLORS.grayscale[900]},{children:o.label})),l&&(null==s?void 0:s.isCustom)&&o.key==(null==s?void 0:s.key)&&e.jsx(i.BodyCaption,{children:`${d(l[0])} to ${d(l[1])}`})]}),o.key)},d=e=>e.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"});exports.AnalyticsDropdown=n=>{let{options:c,placeholder:r="Select an option",selected:u,onOptionSelected:p,resetDropdown:g,backgroundColor:j}=n;var O,v,m;const[D,h]=t.useState(!1),[y,S]=t.useState(u),[b,x]=t.useState(),[k,w]=t.useState(!1),C=()=>{!D&&w(!k)},[R,f]=t.useState(u);return t.useEffect((()=>{g&&S(void 0)}),[g]),t.useEffect((()=>{var e;(null==u?void 0:u.isCustom)&&(null===(e=u.dateRangeSelectionOptions)||void 0===e?void 0:e.selectedDates)?x(u.dateRangeSelectionOptions.selectedDates):u&&S(u)}),[u]),e.jsx(e.Fragment,{children:e.jsxs(a.MainDropdown,Object.assign({drop:"down",show:k,onToggle:C,backgroundColor:j},{children:[e.jsx(o.Dropdown.Toggle,Object.assign({id:"dropdown-autoclose-outside",className:"main--dropdown"},{children:e.jsx(i.BodySecondary,{children:(null==y?void 0:y.isCustom)?b?d(b[0])===d(b[1])?`${d(b[0])}`:`${d(b[0])} to ${d(b[1])}`:null==R?void 0:R.label:y?null==y?void 0:y.label:r})})),e.jsx(o.Dropdown.Menu,Object.assign({className:"main--dropdown"},{children:e.jsxs(a.MainDropdown,Object.assign({drop:"end",id:"sub--dropdown",show:D,onToggle:e=>{!e&&w(!1),h(!D)}},{children:[c.map((t=>e.jsx("div",{children:(null==t?void 0:t.isCustom)?e.jsx(o.Dropdown.Toggle,Object.assign({className:"sub--dropdown"},{children:e.jsx(l,{eachOption:t,selectedOption:y,selectedDate:b,onClickingEachItem:e=>{S(e),h(!0)}})})):e.jsx(l,{eachOption:t,selectedOption:y,selectedDate:b,onClickingEachItem:e=>{if(S(e),f(e),C(),!e.noOfDays)return void p(e);const t=new Date,o=new Date;o.setDate(t.getDate()-e.noOfDays),p(Object.assign(Object.assign({},e),{selectedRange:[o,t]}))}})},null==t?void 0:t.key))),e.jsx(o.Dropdown.Menu,Object.assign({className:"sub--dropdown"},{children:e.jsx(s.DatePicker,{selectRange:(null===(O=null==y?void 0:y.dateRangeSelectionOptions)||void 0===O?void 0:O.selectRange)||!1,maxDate:null===(v=null==y?void 0:y.dateRangeSelectionOptions)||void 0===v?void 0:v.maxDate,minDate:null===(m=null==y?void 0:y.dateRangeSelectionOptions)||void 0===m?void 0:m.minDate,selectedDates:b,onSelectRange:(e,t)=>{const o=[e,t];(null==y?void 0:y.dateRangeSelectionOptions)&&(y.dateRangeSelectionOptions.selectedDates=o,p(Object.assign(Object.assign({},y),{selectedRange:[e,t]}))),f(y),h(!1),x(o),w(!k)}})}))]}))}))]}))})},exports.EachItem=l,exports.formatDate=d;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- import { CurtainProps } from "../curtain";
3
2
  export interface HeaderProps {
4
3
  header: string;
5
4
  subHeader?: string;
@@ -7,7 +6,5 @@ export interface HeaderProps {
7
6
  rightActionButton?: JSX.Element;
8
7
  onClickingBackButton?: () => void;
9
8
  secondaryHeader?: JSX.Element;
10
- curtainProps?: CurtainProps;
11
- curtainZIndex?: number;
12
9
  }
13
10
  export declare const BikHeader: React.FC<HeaderProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../assets/icons/arrow_left.svg.js"),s=require("react"),i=require("../curtain/Curtain.js"),t=require("../TypographyStyle.js"),n=require("./CommonStyles.js");exports.BikHeader=a=>{const{header:c,subHeader:d,hideBackButton:l=!0,rightActionButton:o,onClickingBackButton:u,secondaryHeader:j,curtainProps:h,curtainZIndex:x}=a,[g,p]=s.useState(!!h);return e.jsxs(n.BikHeaderWrapper,{children:[e.jsxs(n.BikHeaderContainer,{children:[e.jsxs("div",Object.assign({className:"row--flex left-container"},{children:[!l&&e.jsx(r.default,{className:"cursor",height:24,width:24,onClick:u}),e.jsxs("div",{children:[d?e.jsx(t.BodyCaption,Object.assign({className:"brand"},{children:c})):e.jsx(t.TitleMedium,{children:c}),e.jsx(t.TitleRegular,{children:d})]})]})),e.jsx("div",Object.assign({className:"row--flex right-container"},{children:o}))]}),g&&h&&e.jsxs(e.Fragment,{children:[e.jsx("div",Object.assign({style:{position:"sticky",top:0,width:"auto",zIndex:x||6}},{children:e.jsx(i.Curtain,Object.assign({},h,{onCloseHandler:()=>{p(!1)}}))})),e.jsx("div",{style:{height:20}})]}),null!=j?j:e.jsx(e.Fragment,{})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../assets/icons/arrow_left.svg.js"),s=require("../TypographyStyle.js"),i=require("./CommonStyles.js");exports.BikHeader=t=>{const{header:a,subHeader:n,hideBackButton:c=!0,rightActionButton:l,onClickingBackButton:d,secondaryHeader:o}=t;return e.jsxs(i.BikHeaderWrapper,{children:[e.jsxs(i.BikHeaderContainer,{children:[e.jsxs("div",Object.assign({className:"row--flex left-container"},{children:[!c&&e.jsx(r.default,{className:"cursor",height:24,width:24,onClick:d}),e.jsxs("div",{children:[n?e.jsx(s.BodyCaption,Object.assign({className:"brand"},{children:a})):e.jsx(s.TitleMedium,{children:a}),e.jsx(s.TitleRegular,{children:n})]})]})),e.jsx("div",Object.assign({className:"row--flex right-container"},{children:l}))]}),null!=o?o:e.jsx(e.Fragment,{})]})};
@@ -11,11 +11,5 @@ 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
- };
20
14
  }
21
15
  export declare const BikLayout: React.FC<BikLayoutProps>;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("./CommonStyles.js"),a=require("./FeatureModal.js"),i=require("./PageLoader.js");exports.BikLayout=n=>{const{isLoading:s,isFeatureModalEnabled:o=!1,isDisabled:t=!1,loadingAnimation:d,hidePadding:l=!1,height:u,children:c,containerStyles:g,onClickingCrossOnFeatureModal:j,onUpgrade:p,extraContentForModal:h,featureModalProps:x}=n;return s?e.jsx(r.BikLayoutContainer,{children:d||e.jsx(i.PageLoader,{})}):e.jsx(e.Fragment,{children:e.jsxs(r.BikLayoutContainer,{children:[e.jsx("div",{className:""+(t?"disabled--wrapper":"")}),e.jsx("div",Object.assign({className:""+(l?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${u||""}`},null!=g?g:{})},{children:c})),o&&e.jsx(a.FeatureModal,Object.assign({showBookADemo:!0,onClickingCross:()=>j?j():"",onUpgrade:p},x,{otherContent:h}))]})})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("./CommonStyles.js"),a=require("./FeatureModal.js"),i=require("./PageLoader.js");exports.BikLayout=n=>{const{isLoading:s,isFeatureModalEnabled:t=!1,isDisabled:o=!1,loadingAnimation:d,hidePadding:l=!1,height:u,children:c,containerStyles:g,onClickingCrossOnFeatureModal:j,onUpgrade:p,extraContentForModal:h}=n;return s?e.jsx(r.BikLayoutContainer,{children:d||e.jsx(i.PageLoader,{})}):e.jsx(e.Fragment,{children:e.jsxs(r.BikLayoutContainer,{children:[e.jsx("div",{className:""+(o?"disabled--wrapper":"")}),e.jsx("div",Object.assign({className:""+(l?"inner-wrapper":"inner-wrapper pd-24"),style:Object.assign({height:`${u||""}`},null!=g?g:{})},{children:c})),t&&e.jsx(a.FeatureModal,{onClickingCross:()=>j?j():"",onUpgrade:p,otherContent:h})]})})};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),s=require("../../constants/Theme.js"),t=require("./SidebarStyles.js"),o=require("./SimpleSidebar.js");const a=i=>{const{icon:n,isActive:t,activeStateIcon:o,hoverStateIcon:a,isHovered:l}=i,d=n,r=o,c=a;return e.jsx(e.Fragment,{children:t?e.jsx(r,{width:20,height:20}):l?e.jsx(c,{width:20,height:20,color:s.COLORS.surface.standard}):e.jsx(d,{width:20,height:20,color:s.COLORS.surface.standard})})};exports.BikSidebar=s=>{const{logoSvg:l,allMenuList:d,activeMainMenu:r,activeSubMenu:c,onClickingMainMenu:u,onClickingSubMenu:v,onClickingAccessUpgradePanel:h}=s,[m,g]=n.useState(r),[j,S]=n.useState(),[k,x]=n.useState(c),[y,b]=n.useState(!1);n.useEffect((()=>{g(r)}),[r]),n.useEffect((()=>{x(c)}),[c]);return e.jsxs(t.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:l||e.jsx(i.default,{})})),e.jsx(t.SibeBarMenuItem,{children:null==d?void 0:d.map(((i,s)=>{var t,l,d,r,c;return e.jsxs(n.Fragment,{children:[e.jsx("div",Object.assign({id:(null===(l=null===(t=i.displayName)||void 0===t?void 0:t.split(" "))||void 0===l?void 0:l.join(""))||i.key.toString(),className:"main--sidebar",onClick:()=>(e=>{var i;S(void 0),b(!0),g(e),u(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?x(null==e?void 0:e.children[0]):x({}),S(void 0),setTimeout((()=>{b(!1)}),1e3)})(i),onMouseEnter:()=>{!y&&S(i)},onMouseOver:()=>{!y&&S(i)},onMouseLeave:()=>{var e;!(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)&&S(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e.jsxs("div",Object.assign({className:`sidebar-menu-item ${(null==m?void 0:m.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n ${i.key==(null==j?void 0:j.key)?"sidebar-menu-item-hover":""}`},{children:[e.jsx(a,{icon:i.icon,isActive:i.key==(null==m?void 0:m.key),activeStateIcon:null!==(d=i.activeIcon)&&void 0!==d?d:{},hoverStateIcon:null!==(r=i.hoverIcon)&&void 0!==r?r:{},isHovered:i.key==(null==j?void 0:j.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==m?void 0:m.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),s)}),s),e.jsx(e.Fragment,{children:(null===(c=null==j?void 0:j.children)||void 0===c?void 0:c.length)&&e.jsx(o.SimpleSidebar,{menuList:null==j?void 0:j.children,activeMenu:k,onMouseLeaveOnMenu:()=>S(void 0),left:88,postion:"fixed",header:j.displayName,theme:"brand",showAccessUpgradePanel:j.showAccessUpgradePanel,onMenuClick:e=>{x(e),g(j),S(void 0),v(e)},onUpgrade:h})})]},s)}))})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("../../assets/icons/Bik_logo.svg.js"),n=require("react"),s=require("../../constants/Theme.js"),t=require("./SidebarStyles.js"),o=require("./SimpleSidebar.js");const a=i=>{const{icon:n,isActive:t,activeStateIcon:o,hoverStateIcon:a,isHovered:l}=i,r=n,d=o,c=a;return e.jsx(e.Fragment,{children:t?e.jsx(d,{width:20,height:20}):l?e.jsx(c,{width:20,height:20,color:s.COLORS.surface.standard}):e.jsx(r,{width:20,height:20,color:s.COLORS.surface.standard})})};exports.BikSidebar=s=>{const{logoSvg:l,allMenuList:r,activeMainMenu:d,activeSubMenu:c,onClickingMainMenu:u,onClickingSubMenu:v,onClickingAccessUpgradePanel:h}=s,[m,g]=n.useState(d),[j,k]=n.useState(),[S,x]=n.useState(c);return n.useEffect((()=>{g(d)}),[d]),n.useEffect((()=>{x(c)}),[c]),e.jsxs(t.SideBarContainer,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:l||e.jsx(i.default,{})})),e.jsx(t.SibeBarMenuItem,{children:null==r?void 0:r.map(((i,s)=>{var t,l,r,d,c;return e.jsxs(n.Fragment,{children:[e.jsx("div",Object.assign({id:(null===(l=null===(t=i.displayName)||void 0===t?void 0:t.split(" "))||void 0===l?void 0:l.join(""))||i.key.toString(),className:"main--sidebar",onClick:()=>{var e;k(void 0),g(i),u(i),(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)?x(null==i?void 0:i.children[0]):x({})},onMouseOver:()=>{k(i)},onMouseEnter:()=>{k(i)},onMouseLeave:()=>{var e;!(null===(e=null==i?void 0:i.children)||void 0===e?void 0:e.length)&&k(void 0)},onFocus:()=>{console.log(";")},"aria-hidden":"true"},{children:e.jsxs("div",Object.assign({className:`sidebar-menu-item ${(null==m?void 0:m.key)==i.key?" main-menu-active-class":""} ${i.isLastSticky?"sticky-menu-int":""} ${i.is2ndLastSticky?"sticky-menu":""}\n ${i.key==(null==j?void 0:j.key)?"sidebar-menu-item-hover":""}`},{children:[e.jsx(a,{icon:i.icon,isActive:i.key==(null==m?void 0:m.key),activeStateIcon:null!==(r=i.activeIcon)&&void 0!==r?r:{},hoverStateIcon:null!==(d=i.hoverIcon)&&void 0!==d?d:{},isHovered:i.key==(null==j?void 0:j.key)}),e.jsx("div",Object.assign({className:"menu-item-container"},{children:e.jsx("p",Object.assign({className:"menu-item-text "+((null==i?void 0:i.key)===(null==m?void 0:m.key)?"active-menu-item-text":"")},{children:i.displayName}))}))]}),s)}),s),e.jsx(e.Fragment,{children:(null===(c=null==j?void 0:j.children)||void 0===c?void 0:c.length)&&e.jsx(o.SimpleSidebar,{menuList:null==j?void 0:j.children,activeMenu:S,onMouseLeaveOnMenu:()=>k(void 0),left:88,postion:"fixed",header:j.displayName,theme:"brand",showAccessUpgradePanel:j.showAccessUpgradePanel,onMenuClick:e=>{x(e),g(j),k(void 0),v(e)},onUpgrade:h})})]},s)}))})]})};