@bikdotai/bik-component-library 0.0.786-beta.12 → 0.0.786-beta.14
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/BikSidebarV2/BikSidebarV2.js +1 -1
- package/dist/cjs/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +3 -1
- package/dist/cjs/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/cjs/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/BikSidebarV2.js +1 -1
- package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.js +6 -4
- package/dist/esm/components/dropdown/DropdownPopover/index.js +1 -1
- package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.js +1 -1
- package/package.json +1 -1
|
@@ -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("../../../assets/icons/locked.svg.js"),t=require("react"),o=require("../../progress-bar/CircularProgressBar.js"),s=require("../../../constants/Theme.js"),r=require("../../navigation-hyperlink/NavigationHyperlink.js"),l=require("./SidebarV2Popup.js"),u=require("./SidebarV2Styles.js"),d=require("./SimpleSidebarV2.js");const a=i=>{const{icon:n,isActive:t,activeStateIcon:o
|
|
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("../../../assets/icons/locked.svg.js"),t=require("react"),o=require("../../progress-bar/CircularProgressBar.js"),s=require("../../../constants/Theme.js"),r=require("../../navigation-hyperlink/NavigationHyperlink.js"),l=require("./SidebarV2Popup.js"),u=require("./SidebarV2Styles.js"),d=require("./SimpleSidebarV2.js");const a=i=>{const{icon:n,isActive:t,activeStateIcon:o}=i,r=n,l=o;return e.jsx(e.Fragment,{children:t?e.jsx(l,{width:16,height:16,color:s.COLORS.content.primaryInverse}):e.jsx(r,{width:16,height:16,color:s.COLORS.content.secondaryInverse})})},c=i=>{let{option:t,index:o,onClickMainMenuLogic:s,setHandleHoverForFullLayout:r,isDisabled:l,mainActiveMenu:d,hoveredComp:c,popupMenu:v,onMouseLeaveMenuItem:p}=i;var g,h,k,y,S,M;return e.jsx(u.SibeBarV2MenuItem,{children:e.jsxs(u.SidebarMainMenu,Object.assign({id:(null===(h=null===(g=t.displayName)||void 0===g?void 0:g.split(" "))||void 0===h?void 0:h.join(""))||t.key.toString(),onClick:()=>!l&&s(t),onMouseEnter:()=>{r(t)},onMouseLeave:p,onFocus:()=>{},"aria-hidden":"true"},{children:[t.isNew&&e.jsx(u.SidebarNewTag,Object.assign({isLastSticky:t.isLastSticky},{children:"NEW"})),t.isLocked&&e.jsx(u.SidebarLockedChannel,Object.assign({isLastSticky:t.isLastSticky,is2ndLastSticky:t.is2ndLastSticky},{children:e.jsx(n.default,{height:16,width:16})})),e.jsxs(u.SidebarMenuItemInner,Object.assign({id:(null===(y=null===(k=t.displayName)||void 0===k?void 0:k.split(" "))||void 0===y?void 0:y.join(""))+"_sub"||t.key.toString()+"_sub",isActive:(null==d?void 0:d.key)===t.key,isLastSticky:t.isLastSticky,is2ndLastSticky:t.is2ndLastSticky,isHovered:t.key===(null==c?void 0:c.key),isNew:t.isNew},{children:[e.jsx(a,{icon:t.icon,isActive:t.key==(null==d?void 0:d.key),activeStateIcon:null!==(S=t.activeIcon)&&void 0!==S?S:{},hoverStateIcon:null!==(M=t.hoverIcon)&&void 0!==M?M:{},isHovered:t.key==(null==c?void 0:c.key)||t.key==(null==v?void 0:v.key)}),e.jsx(u.SidebarMenuItemContainer,{children:e.jsx(u.SidebarMenuItemText,Object.assign({isActive:(null==t?void 0:t.key)===(null==d?void 0:d.key)},{children:t.displayName}))})]}),o)]}),o)})};exports.BikSidebarV2=n=>{const{logoSvg:s,allMenuList:a,activeMainMenu:v,activeSubMenu:p,router:g,onClickingMainMenu:h,onClickingSubMenu:k,onClickingAccessUpgradePanel:y,onClickingPopupMenuItem:S,popupMinHeight:M,isNewSidebar:m,menuStyle:b}=n,[j,x]=t.useState(v),[L,C]=t.useState(),[w,f]=t.useState(p),[I,H]=t.useState(!1),[O,N]=t.useState(),[B,P]=t.useState(),[E,q]=t.useState(),A=t.useRef(null),F=t.useMemo((()=>a.filter((e=>e.is2ndLastSticky||e.isLastSticky)).length),[a]);t.useEffect((()=>{x(v)}),[v]),t.useEffect((()=>{f(p)}),[p]);const V=t.useCallback((e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(N(void 0),C(void 0),H(!0),x(e),e.path||h(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?f(null==e?void 0:e.children[0]):f({}),C(void 0),setTimeout((()=>{H(!1)}),1e3))}),[h]),_=t.useCallback((e=>{var i,n;if(D(),C(void 0),N(void 0),"popup"==(null==e?void 0:e.layout)){const i=z();i&&P(i),N(e)}else{const t=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(t){const i=R(t,e);q(i)}C(e)}}),[]),R=(e,i)=>{const n=e.getBoundingClientRect();let t=n.top;if(window.innerHeight<=768)return t;if(i.isLastSticky||i.is2ndLastSticky){const e=window.innerHeight-n.bottom;t=n.top+e-200}return t};t.useEffect((()=>{const e=()=>{const e=z();e&&P(e),T()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const T=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&q(window.innerHeight-i)},D=t.useCallback((()=>{A.current&&(clearTimeout(A.current),A.current=null)}),[]),U=t.useCallback((()=>{D(),A.current=setTimeout((()=>{C(void 0),N(void 0)}),150)}),[D]),z=()=>{var e,i;if(O){const n=(null===(i=null===(e=O.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||O.key.toString()+"_sub",t=document.getElementById(n);if(t){const e=t.getBoundingClientRect();let i=e.top;const n=null!=M?M:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e.jsxs(u.SideBarV2Container,{children:[e.jsx("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:s||e.jsx(i.default,{})})),e.jsxs(u.MainSideBarV2MenuWrapper,Object.assign({style:b},{children:[null==a?void 0:a.map(((i,n)=>{var o,s;return e.jsxs(t.Fragment,{children:[i.path?e.jsx(r.NavigationHyperlink,Object.assign({href:i.path,router:g},{children:e.jsx(c,{option:i,index:n,onClickMainMenuLogic:V,setHandleHoverForFullLayout:_,isDisabled:I,setHoveredComp:C,setPopupMenu:N,mainActiveMenu:j,hoveredComp:L,popupMenu:O,onMouseLeaveMenuItem:U})})):e.jsx(c,{option:i,index:n,onClickMainMenuLogic:V,setHandleHoverForFullLayout:_,isDisabled:I,setHoveredComp:C,setPopupMenu:N,mainActiveMenu:j,hoveredComp:L,popupMenu:O,onMouseLeaveMenuItem:U}),e.jsxs(e.Fragment,{children:["popup"===i.layout&&(null===(o=null==O?void 0:O.children)||void 0===o?void 0:o.length)&&e.jsx(l.SidebarV2Popup,{top:null!=B?B:void 0,menuList:null==O?void 0:O.children,onClickingPopupMenu:e=>{S&&S(e),N(void 0)},onMouseEnterOnMenu:D,onMouseLeaveOnMenu:U}),(null===(s=null==L?void 0:L.children)||void 0===s?void 0:s.length)&&e.jsx(d.SimpleSidebarV2,{menuList:null==L?void 0:L.children,width:200,activeMenu:w,onMouseEnterOnMenu:D,onMouseLeaveOnMenu:()=>C(void 0),left:78,postion:"fixed",header:L.displayName,theme:"brand",router:g,showAccessUpgradePanel:L.showAccessUpgradePanel,onMenuClick:(e,i)=>{f(e),x(L),C(void 0),N(void 0),i&&k(e)},onUpgrade:y,top:m&&E||0,isNewSidebar:m})]})]},n)})),"number"==typeof n.onboardingPercentage&&e.jsx(u.SibeBarV2MenuItem,{children:e.jsx(u.SidebarMainMenu,{children:e.jsx(u.SidebarMenuItemInner,Object.assign({id:"bik-onboarding__checklist",stickyBottom:0===F?0:1===F?64:128},{children:e.jsx(o.default,{percentage:n.onboardingPercentage,width:48})}))})})]}))]})};
|
|
@@ -93,7 +93,9 @@
|
|
|
93
93
|
`}}
|
|
94
94
|
|
|
95
95
|
${t=>{let{isActive:r,isHovered:o}=t;return r&&o&&e.css`
|
|
96
|
-
|
|
96
|
+
border-radius: 8px;
|
|
97
|
+
border: 1px solid ${i.BASE_COLORS.brand[700]};
|
|
98
|
+
background-color: ${i.BASE_COLORS.brand[800]};
|
|
97
99
|
`}}
|
|
98
100
|
|
|
99
101
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),o=require("react/jsx-runtime"),t=require("react"),r=require("react-popper"),n=require("../../dropShadow/DropShadow.js"),s=require("../../tooltips/Tooltip.js"),i=require("../../../constants/Theme.js"),l=require("../Common.styled.js"),a=require("../OpenedDropdown/components/OpennedDropdown.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(t).default.forwardRef(((d,p)=>{var{children:c,onDropdownVisbilityChange:u,version:v="1.0",tooltipContent:b,tooltipDirection:j,showTooltipArrow:w,isChildLoading:g,forceOpen:h}=d,O=e.__rest(d,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen"]);const f=p,[D,x]=t.useState(!1),[S,C]=t.useState(!1),[y,m]=t.useState(null),[q,R]=t.useState(null),E=t.useRef(null),{styles:L,attributes:_}=r.usePopper(y,q,{placement:O.placement,strategy:O.strategy}),M=e=>{var o,t;"2.0"===v&&O.isMultiSelect&&e&&(null===(o=O.onSelect)||void 0===o||o.call(O,[...e])),x(!1),null===(t=null==O?void 0:O.onClose)||void 0===t||t.call(O)};t.useImperativeHandle(f,(()=>({openDropdown:D})),[]),t.useEffect((()=>{(null==f?void 0:f.current)&&(f.current.openDropdown=D)}),[D]),t.useEffect((()=>{null==u||u(D)}),[D]);const T=()=>{var e;return o.jsxs(o.Fragment,{children:[o.jsxs("div",Object.assign({style:Object.assign({position:"relative"},"3.0"===v&&{backgroundColor:D||S?i.COLORS.surface.hovered:i.COLORS.surface.standard,transition:"background-color 0.3s ease",borderRadius:4}),ref:m,onMouseEnter:"3.0"===v?()=>C(!0):void 0,onMouseLeave:"3.0"===v?()=>C(!1):void 0},{children:[o.jsx(l.OverLapAbs,Object.assign({ref:E,allowEvents:O.allowEvents,disabled:O.disabled,onClick:e=>{var o;null===(o=O.onDropdownOpen)||void 0===o||o.call(O),D?(x(!1),e.preventDefault()):O.disabled||x(!0)},isChildLoading:g},{children:O.allowEvents?c:null})),O.allowEvents?null:c]})),(D||h)&&o.jsx(l.OpenDropdownContainer,Object.assign({ref:R,style:Object.assign(Object.assign({},L.popper),{zIndex:null!==(e=O.dropdownZIndex)&&void 0!==e?e:3})},_.popper,{"data-test":O["data-test"]},{children:o.jsx(n.DropShadow,Object.assign({level:"z2",position:"down",style:{borderRadius:"3.0"===v?4:8,boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)"}},{children:o.jsx(a.OpenedDropdown,Object.assign({},O,{onSelect:e=>{var o;"2.0"===v&&O.isMultiSelect||(null===(o=O.onSelect)||void 0===o||o.call(O,e),x(!1))},onClose:M,version:v,headerRef:E,zeroState:null==O?void 0:O.zeroState,isDraggable:O.isDraggable,onOptionsReorder:O.onOptionsReorder}))}))}))]})};return o.jsx(o.Fragment,{children:D||h||void 0===b?T():o.jsx(s.Tooltip,Object.assign({body:b,placement:j,hideArrow:!w},{children:o.jsx("div",Object.assign({"data-test":O["data-test"]},{children:T()}))}))})}));p.displayName="DropdownPopover",exports.DropdownPopover=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("../zeroState/ZeroState.js"),r=require("../../constants/Theme.js"),s=require("../dropdown/OpenedDropdown/components/searchbox/SearchBox.js"),o=require("../floater/floater.js"),i=require("./MenuList.js"),l=require("./MultiLevelDropdown.styled.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(n);exports.MultiLevelDropdown=a=>{let{options:u,width:d,isSearchable:p,onDropdownItemClick:f,refElement:h,topOffset:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),n=require("react"),t=require("../zeroState/ZeroState.js"),r=require("../../constants/Theme.js"),s=require("../dropdown/OpenedDropdown/components/searchbox/SearchBox.js"),o=require("../floater/floater.js"),i=require("./MenuList.js"),l=require("./MultiLevelDropdown.styled.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(n);exports.MultiLevelDropdown=a=>{let{options:u,width:d,isSearchable:p,onDropdownItemClick:f,refElement:h,topOffset:x,leftOffset:j,isDropdownOpen:w,onDropdownOutsideClick:b,allowParentSelection:O,maxLevels:g,hideGroupLabel:v,version:m="1.0"}=a;const S=c.default.useRef(null),[L,y]=n.useState(u),C=e=>{const n=Array.isArray(u)?[...u]:[],t=[];for(;n.length>0;){const r=n.shift();r&&r.label.toLowerCase().includes(e.toLowerCase())&&t.push(r),r&&"children"in r&&r.children?n.push(...r.children):r&&"options"in r&&r.options&&n.push(...r.options)}const r=e=>e.map((e=>{if(t.includes(e))return e;if("children"in e&&e.children){const n=r(e.children);if(n.length>0)return Object.assign(Object.assign({},e),{children:n})}if("options"in e&&e.options){const n=r(e.options);if(n.length>0)return Object.assign(Object.assign({},e),{options:n})}return null})).filter((e=>null!==e));y(r(u))},q=e=>{S.current&&!S.current.contains(e.target)?b&&b(!0):b&&b(!1)};return n.useEffect((()=>{w&&C("")}),[w]),n.useEffect((()=>(document.addEventListener("mousedown",q),()=>{document.removeEventListener("mousedown",q)})),[]),n.useEffect((()=>{y(u)}),[u]),e.jsx(o.Floater,Object.assign({refElement:h,topOffset:x,leftOffset:j},{children:w&&e.jsx("div",Object.assign({ref:S,style:{backgroundColor:r.COLORS.surface.standard,zIndex:99999,borderRadius:"3.0"===m?"4px":"8px",overflow:"hidden",boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)",whiteSpace:"normal"}},{children:e.jsxs(l.DropdownContainer,Object.assign({width:d,version:m},{children:[p&&e.jsx("div",Object.assign({style:{padding:"3.0"===m?"0px":"4px",width:null!=d?d:"200px"}},{children:e.jsx(s.SearchBox,{onSearch:C,version:"3.0"===m?"3.0":"2.0"})})),e.jsx(l.OptionsContainer,Object.assign({width:d,version:m},{children:(null!=L?L:[]).length>0&&e.jsx(i.MenuList,{width:null!=d?d:"200px",onDropdownItemClick:f,options:L,parents:[],allowParentSelection:O,maxLevels:g,hideGroupLabel:v,currentLevel:1,version:m})})),0===(null!=L?L:[]).length&&e.jsx(l.NoResultsContainer,Object.assign({style:{width:null!=d?d:"200px"},version:m},{children:"3.0"===m?e.jsx("span",Object.assign({style:{fontSize:"12px",color:r.COLORS.content.placeholder,lineHeight:"16px"}},{children:"No results found!"})):e.jsx(t.ZeroState,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})}))]}))}))}))};
|
|
@@ -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 t from"../../../assets/icons/locked.svg.js";import{useState 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 t from"../../../assets/icons/locked.svg.js";import{useState as l,useRef as s,useMemo as r,useEffect as d,useCallback as c,Fragment as u}from"react";import a from"../../progress-bar/CircularProgressBar.js";import{COLORS as v}from"../../../constants/Theme.js";import{NavigationHyperlink as p}from"../../navigation-hyperlink/NavigationHyperlink.js";import{SidebarV2Popup as g}from"./SidebarV2Popup.js";import{SideBarV2Container as h,MainSideBarV2MenuWrapper as m,SibeBarV2MenuItem as y,SidebarMainMenu as k,SidebarMenuItemInner as M,SidebarNewTag as b,SidebarLockedChannel as L,SidebarMenuItemContainer as S,SidebarMenuItemText as w}from"./SidebarV2Styles.js";import{SimpleSidebarV2 as j}from"./SimpleSidebarV2.js";const f=t=>{const{logoSvg:v,allMenuList:b,activeMainMenu:L,activeSubMenu:S,router:w,onClickingMainMenu:f,onClickingSubMenu:C,onClickingAccessUpgradePanel:I,onClickingPopupMenuItem:N,popupMinHeight:O,isNewSidebar:P,menuStyle:A}=t,[B,E]=l(L),[F,_]=l(),[x,D]=l(S),[T,U]=l(!1),[R,V]=l(),[z,K]=l(),[W,q]=l(),G=s(null),J=r((()=>b.filter((e=>e.is2ndLastSticky||e.isLastSticky)).length),[b]);d((()=>{E(L)}),[L]),d((()=>{D(S)}),[S]);const Q=c((e=>{var i;"popup"!==(null==e?void 0:e.layout)&&(V(void 0),_(void 0),U(!0),E(e),e.path||f(e),(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)?D(null==e?void 0:e.children[0]):D({}),_(void 0),setTimeout((()=>{U(!1)}),1e3))}),[f]),X=c((e=>{var i,n;if($(),_(void 0),V(void 0),"popup"==(null==e?void 0:e.layout)){const i=ie();i&&K(i),V(e)}else{const o=document.getElementById((null===(n=null===(i=e.displayName)||void 0===i?void 0:i.split(" "))||void 0===n?void 0:n.join(""))||e.key.toString());if(o){const i=Y(o,e);q(i)}_(e)}}),[]),Y=(e,i)=>{const n=e.getBoundingClientRect();let o=n.top;if(window.innerHeight<=768)return o;if(i.isLastSticky||i.is2ndLastSticky){const e=window.innerHeight-n.bottom;o=n.top+e-200}return o};d((()=>{const e=()=>{const e=ie();e&&K(e),Z()};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);const Z=()=>{const e=document.getElementById("_sub-menu"),i=null==e?void 0:e.getBoundingClientRect().height;i&&q(window.innerHeight-i)},$=c((()=>{G.current&&(clearTimeout(G.current),G.current=null)}),[]),ee=c((()=>{$(),G.current=setTimeout((()=>{_(void 0),V(void 0)}),150)}),[$]),ie=()=>{var e,i;if(R){const n=(null===(i=null===(e=R.displayName)||void 0===e?void 0:e.split(" "))||void 0===i?void 0:i.join(""))+"_sub"||R.key.toString()+"_sub",o=document.getElementById(n);if(o){const e=o.getBoundingClientRect();let i=e.top;const n=null!=O?O:320;return e.bottom+n>window.innerHeight&&(i-=e.bottom+n-window.innerHeight),i}return null}};return e(h,{children:[i("div",Object.assign({className:"bik-header-logo",onClick:()=>{},onKeyDown:()=>{},"aria-hidden":"true"},{children:v||i(o,{})})),e(m,Object.assign({style:A},{children:[null==b?void 0:b.map(((o,t)=>{var l,s;return e(u,{children:[o.path?i(p,Object.assign({href:o.path,router:w},{children:i(H,{option:o,index:t,onClickMainMenuLogic:Q,setHandleHoverForFullLayout:X,isDisabled:T,setHoveredComp:_,setPopupMenu:V,mainActiveMenu:B,hoveredComp:F,popupMenu:R,onMouseLeaveMenuItem:ee})})):i(H,{option:o,index:t,onClickMainMenuLogic:Q,setHandleHoverForFullLayout:X,isDisabled:T,setHoveredComp:_,setPopupMenu:V,mainActiveMenu:B,hoveredComp:F,popupMenu:R,onMouseLeaveMenuItem:ee}),e(n,{children:["popup"===o.layout&&(null===(l=null==R?void 0:R.children)||void 0===l?void 0:l.length)&&i(g,{top:null!=z?z:void 0,menuList:null==R?void 0:R.children,onClickingPopupMenu:e=>{N&&N(e),V(void 0)},onMouseEnterOnMenu:$,onMouseLeaveOnMenu:ee}),(null===(s=null==F?void 0:F.children)||void 0===s?void 0:s.length)&&i(j,{menuList:null==F?void 0:F.children,width:200,activeMenu:x,onMouseEnterOnMenu:$,onMouseLeaveOnMenu:()=>_(void 0),left:78,postion:"fixed",header:F.displayName,theme:"brand",router:w,showAccessUpgradePanel:F.showAccessUpgradePanel,onMenuClick:(e,i)=>{D(e),E(F),_(void 0),V(void 0),i&&C(e)},onUpgrade:I,top:P&&W||0,isNewSidebar:P})]})]},t)})),"number"==typeof t.onboardingPercentage&&i(y,{children:i(k,{children:i(M,Object.assign({id:"bik-onboarding__checklist",stickyBottom:0===J?0:1===J?64:128},{children:i(a,{percentage:t.onboardingPercentage,width:48})}))})})]}))]})},C=e=>{const{icon:o,isActive:t,activeStateIcon:l}=e,s=o;return i(n,{children:t?i(l,{width:16,height:16,color:v.content.primaryInverse}):i(s,{width:16,height:16,color:v.content.secondaryInverse})})},H=n=>{let{option:o,index:l,onClickMainMenuLogic:s,setHandleHoverForFullLayout:r,isDisabled:d,mainActiveMenu:c,hoveredComp:u,popupMenu:a,onMouseLeaveMenuItem:v}=n;var p,g,h,m,j,f;return i(y,{children:e(k,Object.assign({id:(null===(g=null===(p=o.displayName)||void 0===p?void 0:p.split(" "))||void 0===g?void 0:g.join(""))||o.key.toString(),onClick:()=>!d&&s(o),onMouseEnter:()=>{r(o)},onMouseLeave:v,onFocus:()=>{},"aria-hidden":"true"},{children:[o.isNew&&i(b,Object.assign({isLastSticky:o.isLastSticky},{children:"NEW"})),o.isLocked&&i(L,Object.assign({isLastSticky:o.isLastSticky,is2ndLastSticky:o.is2ndLastSticky},{children:i(t,{height:16,width:16})})),e(M,Object.assign({id:(null===(m=null===(h=o.displayName)||void 0===h?void 0:h.split(" "))||void 0===m?void 0:m.join(""))+"_sub"||o.key.toString()+"_sub",isActive:(null==c?void 0:c.key)===o.key,isLastSticky:o.isLastSticky,is2ndLastSticky:o.is2ndLastSticky,isHovered:o.key===(null==u?void 0:u.key),isNew:o.isNew},{children:[i(C,{icon:o.icon,isActive:o.key==(null==c?void 0:c.key),activeStateIcon:null!==(j=o.activeIcon)&&void 0!==j?j:{},hoverStateIcon:null!==(f=o.hoverIcon)&&void 0!==f?f:{},isHovered:o.key==(null==u?void 0:u.key)||o.key==(null==a?void 0:a.key)}),i(S,{children:i(w,Object.assign({isActive:(null==o?void 0:o.key)===(null==c?void 0:c.key)},{children:o.displayName}))})]}),l)]}),l)})};export{f as BikSidebarV2};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../TypographyStyle.js";import{COLORS as o,BASE_COLORS as r,FONTS as n}from"../../../constants/Theme.js";const
|
|
1
|
+
import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../TypographyStyle.js";import{COLORS as o,BASE_COLORS as r,FONTS as n}from"../../../constants/Theme.js";const d=e.div`
|
|
2
2
|
background-color: #28034e;
|
|
3
3
|
width: 72px;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -23,7 +23,7 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
|
|
|
23
23
|
object-fit: container;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
`,
|
|
26
|
+
`,a=e.div`
|
|
27
27
|
margin: 0px 0px 16px;
|
|
28
28
|
padding-bottom: 8px;
|
|
29
29
|
`,p=e.div``,s=e.div`
|
|
@@ -93,7 +93,9 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
|
|
|
93
93
|
`}}
|
|
94
94
|
|
|
95
95
|
${e=>{let{isActive:i,isHovered:o}=e;return i&&o&&t`
|
|
96
|
-
|
|
96
|
+
border-radius: 8px;
|
|
97
|
+
border: 1px solid ${r.brand[700]};
|
|
98
|
+
background-color: ${r.brand[800]};
|
|
97
99
|
`}}
|
|
98
100
|
|
|
99
101
|
|
|
@@ -282,4 +284,4 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
|
|
|
282
284
|
border-radius: 8px;
|
|
283
285
|
}
|
|
284
286
|
}
|
|
285
|
-
`;export{
|
|
287
|
+
`;export{a as MainSideBarV2MenuWrapper,p as SibeBarV2MenuItem,d as SideBarV2Container,x as SidebarLockedChannel,s as SidebarMainMenu,l as SidebarMenuItemContainer,c as SidebarMenuItemInner,u as SidebarMenuItemText,b as SidebarNewTag,m as SidebarV2PopupContainer,g as SimpleSidebarV2Container};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import r,{useState as i,useRef as l,useImperativeHandle as s,useEffect as a}from"react";import{usePopper as d}from"react-popper";import{DropShadow as p}from"../../dropShadow/DropShadow.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{COLORS as u}from"../../../constants/Theme.js";import{OverLapAbs as v,OpenDropdownContainer as m}from"../Common.styled.js";import{OpenedDropdown as b}from"../OpenedDropdown/components/OpennedDropdown.js";const g=r.forwardRef(((r,g)=>{var{children:h,onDropdownVisbilityChange:w,version:f="1.0",tooltipContent:j,tooltipDirection:O,showTooltipArrow:D,isChildLoading:C,forceOpen:y}=r,S=o(r,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen"]);const
|
|
1
|
+
import{__rest as o}from"../../../_virtual/_tslib.js";import{jsx as e,Fragment as n,jsxs as t}from"react/jsx-runtime";import r,{useState as i,useRef as l,useImperativeHandle as s,useEffect as a}from"react";import{usePopper as d}from"react-popper";import{DropShadow as p}from"../../dropShadow/DropShadow.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{COLORS as u}from"../../../constants/Theme.js";import{OverLapAbs as v,OpenDropdownContainer as m}from"../Common.styled.js";import{OpenedDropdown as b}from"../OpenedDropdown/components/OpennedDropdown.js";const g=r.forwardRef(((r,g)=>{var{children:h,onDropdownVisbilityChange:w,version:f="1.0",tooltipContent:j,tooltipDirection:O,showTooltipArrow:D,isChildLoading:C,forceOpen:y}=r,S=o(r,["children","onDropdownVisbilityChange","version","tooltipContent","tooltipDirection","showTooltipArrow","isChildLoading","forceOpen"]);const x=g,[R,E]=i(!1),[z,L]=i(!1),[M,T]=i(null),[k,A]=i(null),I=l(null),{styles:V,attributes:_}=d(M,k,{placement:S.placement,strategy:S.strategy}),N=o=>{var e,n;"2.0"===f&&S.isMultiSelect&&o&&(null===(e=S.onSelect)||void 0===e||e.call(S,[...o])),E(!1),null===(n=null==S?void 0:S.onClose)||void 0===n||n.call(S)};s(x,(()=>({openDropdown:R})),[]),a((()=>{(null==x?void 0:x.current)&&(x.current.openDropdown=R)}),[R]),a((()=>{null==w||w(R)}),[R]);const P=()=>{var o;return t(n,{children:[t("div",Object.assign({style:Object.assign({position:"relative"},"3.0"===f&&{backgroundColor:R||z?u.surface.hovered:u.surface.standard,transition:"background-color 0.3s ease",borderRadius:4}),ref:T,onMouseEnter:"3.0"===f?()=>L(!0):void 0,onMouseLeave:"3.0"===f?()=>L(!1):void 0},{children:[e(v,Object.assign({ref:I,allowEvents:S.allowEvents,disabled:S.disabled,onClick:o=>{var e;null===(e=S.onDropdownOpen)||void 0===e||e.call(S),R?(E(!1),o.preventDefault()):S.disabled||E(!0)},isChildLoading:C},{children:S.allowEvents?h:null})),S.allowEvents?null:h]})),(R||y)&&e(m,Object.assign({ref:A,style:Object.assign(Object.assign({},V.popper),{zIndex:null!==(o=S.dropdownZIndex)&&void 0!==o?o:3})},_.popper,{"data-test":S["data-test"]},{children:e(p,Object.assign({level:"z2",position:"down",style:{borderRadius:"3.0"===f?4:8,boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)"}},{children:e(b,Object.assign({},S,{onSelect:o=>{var e;"2.0"===f&&S.isMultiSelect||(null===(e=S.onSelect)||void 0===e||e.call(S,o),E(!1))},onClose:N,version:f,headerRef:I,zeroState:null==S?void 0:S.zeroState,isDraggable:S.isDraggable,onOptionsReorder:S.onOptionsReorder}))}))}))]})};return e(n,{children:R||y||void 0===j?P():e(c,Object.assign({body:j,placement:O,hideArrow:!D},{children:e("div",Object.assign({"data-test":S["data-test"]},{children:P()}))}))})}));g.displayName="DropdownPopover";export{g as DropdownPopover};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useState as o,useEffect as r}from"react";import{ZeroState as s}from"../zeroState/ZeroState.js";import{COLORS as i}from"../../constants/Theme.js";import{SearchBox as l}from"../dropdown/OpenedDropdown/components/searchbox/SearchBox.js";import{Floater as c}from"../floater/floater.js";import{MenuList as
|
|
1
|
+
import{jsx as e,jsxs as n}from"react/jsx-runtime";import t,{useState as o,useEffect as r}from"react";import{ZeroState as s}from"../zeroState/ZeroState.js";import{COLORS as i}from"../../constants/Theme.js";import{SearchBox as l}from"../dropdown/OpenedDropdown/components/searchbox/SearchBox.js";import{Floater as c}from"../floater/floater.js";import{MenuList as d}from"./MenuList.js";import{DropdownContainer as a,OptionsContainer as p,NoResultsContainer as u}from"./MultiLevelDropdown.styled.js";const h=h=>{let{options:f,width:m,isSearchable:w,onDropdownItemClick:b,refElement:g,topOffset:x,leftOffset:j,isDropdownOpen:O,onDropdownOutsideClick:v,allowParentSelection:L,maxLevels:S,hideGroupLabel:y,version:C="1.0"}=h;const D=t.useRef(null),[k,E]=o(f),z=e=>{const n=Array.isArray(f)?[...f]:[],t=[];for(;n.length>0;){const o=n.shift();o&&o.label.toLowerCase().includes(e.toLowerCase())&&t.push(o),o&&"children"in o&&o.children?n.push(...o.children):o&&"options"in o&&o.options&&n.push(...o.options)}const o=e=>e.map((e=>{if(t.includes(e))return e;if("children"in e&&e.children){const n=o(e.children);if(n.length>0)return Object.assign(Object.assign({},e),{children:n})}if("options"in e&&e.options){const n=o(e.options);if(n.length>0)return Object.assign(Object.assign({},e),{options:n})}return null})).filter((e=>null!==e));E(o(f))},I=e=>{D.current&&!D.current.contains(e.target)?v&&v(!0):v&&v(!1)};return r((()=>{O&&z("")}),[O]),r((()=>(document.addEventListener("mousedown",I),()=>{document.removeEventListener("mousedown",I)})),[]),r((()=>{E(f)}),[f]),e(c,Object.assign({refElement:g,topOffset:x,leftOffset:j},{children:O&&e("div",Object.assign({ref:D,style:{backgroundColor:i.surface.standard,zIndex:99999,borderRadius:"3.0"===C?"4px":"8px",overflow:"hidden",boxShadow:"0 2px 8px 0 rgba(0, 0, 0, 0.12)",whiteSpace:"normal"}},{children:n(a,Object.assign({width:m,version:C},{children:[w&&e("div",Object.assign({style:{padding:"3.0"===C?"0px":"4px",width:null!=m?m:"200px"}},{children:e(l,{onSearch:z,version:"3.0"===C?"3.0":"2.0"})})),e(p,Object.assign({width:m,version:C},{children:(null!=k?k:[]).length>0&&e(d,{width:null!=m?m:"200px",onDropdownItemClick:b,options:k,parents:[],allowParentSelection:L,maxLevels:S,hideGroupLabel:y,currentLevel:1,version:C})})),0===(null!=k?k:[]).length&&e(u,Object.assign({style:{width:null!=m?m:"200px"},version:C},{children:"3.0"===C?e("span",Object.assign({style:{fontSize:"12px",color:i.content.placeholder,lineHeight:"16px"}},{children:"No results found!"})):e(s,{title:"No results found!",subTitle:"Sorry, we are unable to find any results for your search."})}))]}))}))}))};export{h as MultiLevelDropdown};
|