@bikdotai/bik-component-library 0.0.725-beta.9 → 0.0.726-beta.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 (22) hide show
  1. package/dist/cjs/assets/icons/{searchIconWhatsNew.svg.js → searchIcon.svg.js} +1 -1
  2. package/dist/cjs/assets/icons/whatsNew.svg.js +1 -1
  3. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  4. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  5. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -0
  6. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
  7. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  8. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  9. package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
  10. package/dist/cjs/components/whats-new/WhatsNewPanel.js +1 -1
  11. package/dist/esm/assets/icons/searchIcon.svg.js +1 -0
  12. package/dist/esm/assets/icons/whatsNew.svg.js +1 -1
  13. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  14. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  15. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +2 -0
  16. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +2 -2
  17. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +1 -0
  18. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  19. package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
  20. package/dist/esm/components/whats-new/WhatsNewPanel.js +1 -1
  21. package/package.json +1 -1
  22. package/dist/esm/assets/icons/searchIconWhatsNew.svg.js +0 -1
@@ -1 +1 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({fill:"none",viewBox:"0 0 24 24"},e),t||(t=r.createElement("path",{stroke:"currentColor",d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z"})));exports.default=a;
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var o=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),t||(t=r.createElement("path",{stroke:"currentColor",d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z"})));exports.default=o;
@@ -1 +1 @@
1
- "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),t||(t=r.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},r.createElement("path",{d:"m18.135 13.479-5.044 7.323a.562.562 0 0 0-.076.524l.315.875a.564.564 0 0 0 .887.243l2.836-2.27"}),r.createElement("path",{d:"M6.834 15.248a.562.562 0 0 0 .488.896c4.3-.295 7.47 1.858 7.47 1.858l2.26 1.672a2.813 2.813 0 0 0 3.344-4.523l-2.261-1.672s-2.989-2.398-4.114-7.073a.562.562 0 0 0-1-.204l-6.187 9.046ZM7.769 10.561l-1.582-.547M9.707 8.268l-.79-1.741M8.19 9.264l-2.44-2.11"}))));exports.default=a;
1
+ "use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,n=e(require("react"));function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}var l=e=>n.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32"},e),t||(t=n.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,clipPath:"url(#whatsNew_svg__a)"},n.createElement("path",{strokeLinejoin:"round",d:"m22.18 15.305-6.725 9.097a.75.75 0 0 0-.102.7l.42 1.165a.75.75 0 0 0 1.183.325l3.78-3.027"}),n.createElement("path",{strokeLinejoin:"round",d:"M6.446 17.664a.75.75 0 0 0 .65 1.194c6.4-.393 10.625 2.478 10.625 2.478l3.016 2.23a3.75 3.75 0 1 0 4.458-6.032l-3.015-2.229s-3.985-3.197-5.486-9.43a.75.75 0 0 0-1.332-.273L6.446 17.664Z"}),n.createElement("path",{d:"m7.692 12.082-2.443-.73m5.693-2.995L9.89 6.036m-.97 3.65L5.667 6.87"}))),r||(r=n.createElement("defs",null,n.createElement("clipPath",{id:"whatsNew_svg__a"},n.createElement("path",{fill:"#fff",d:"M4 4h24v24H4z"})))));exports.default=l;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../node_modules/react/jsx-runtime.js"),t=require("react"),s=require("../../../zeroState/ZeroState.js"),n=require("../../../../hooks/useOutside.js"),i=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),r=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),a=require("./multiSelect/MultiSelectDropdownBottomBar.js"),c=require("./OpennedDropdown.styled.js"),p=require("./searchbox/SearchBox.js"),d=require("./searchbox/SearchZeroState.js");const x=304,j=290;exports.OpenedDropdown=h=>{let{options:S,isSearchable:b,isMultiSelect:m,maxSelections:f,width:g,allowFreeForm:O,height:v,onClose:w,onSelect:y,onSearch:C,version:R,skipSorting:D,headerRef:M,hideSelectAll:q,primaryButtonText:E,onInfiniteScroll:L,onMultiSelectClear:F,onDropdownItemClick:k,buttonOptions:A,isSearchLoading:B,disableSearchOptions:I,disableSearchedOptionExcept:H,useDefaultCursor:T,containerStyle:Z={},zeroState:_}=h;const{dropdownOptions:z,search:P,searchedString:W,searchedOptions:K,onApplyHandler:N,selectAllHandler:G,onMultiSelectClear:J,onFreeFormSelect:Q,onMultiSelectApply:U,latestDropdownOptionsRef:V,getSelectedOptions:X,getCurrentSelectionCount:Y}=i.useDropdown(R,S,y,D,m,C,I,H,f),[$,ee]=t.useState(null!=g?g:j),[te,se]=t.useState(null),ne=t.useRef(null),ie=t.useRef([]);n.useOutside(ne,(()=>{if(se(null),m&&"2.0"===R){const e=X(V.current);null==w||w(e)}else null==w||w(z)}),[M,ie]);const oe=null!=v?v:x,re="number"==typeof oe?b&&m?oe-96:b&&!m||!b&&m?oe-48:oe:oe;t.useEffect((()=>{const e=null!=g?g:j;if(null===te)ee(e);else if("number"==typeof e)ee(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ee(t)}}),[te]);const le=[],ue=(e=>{if(!m||!f&&0!==f)return e;const t=Y(e)>=f;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const s=e;return Object.assign(Object.assign({},s),{disabled:s.disabled||!s.selected&&t})}})):e})((W&&C?K:z).map((e=>{var t,s;if(W&&!C){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(W.toLowerCase()))&&(le.push(!W||e.label===W),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(W.toLowerCase()))||(null===(s=e.searchKey)||void 0===s?void 0:s.toLowerCase().includes(W.toLowerCase()))?(le.push(!W||e.label===W),e):null}return e})).filter((e=>null!==e))),ae=!!b&&W&&0===ue.length;return e.jsxRuntimeExports.jsxs(c.OpennedDropdownContainer,Object.assign({version:R,ref:ne,style:Object.assign({width:$},Z)},{children:[e.jsxRuntimeExports.jsxs("div",Object.assign({style:{width:te?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!b&&e.jsxRuntimeExports.jsx(p.SearchBox,{onSearch:P,version:R}),ue.length||W?e.jsxRuntimeExports.jsxs(c.MenuListContainer,Object.assign({minHeight:oe,maxHeight:re},{children:[!!m&&!ae&&!q&&e.jsxRuntimeExports.jsx(u.SelectAllMenu,{version:R,options:W&&C?K:z,onSelect:G}),!O&&ae&&e.jsxRuntimeExports.jsx(d.SearchZeroState,{isLoading:B,height:re,searchedString:W,containerWidth:g}),O&&(ae||!!le.length&&le.every((e=>!1===e)))&&e.jsxRuntimeExports.jsx(r.FreeFormMenu,{version:R,isMultiSelect:m,onSelect:Q,searchedString:W}),e.jsxRuntimeExports.jsx(l.MenuList,{onInfiniteScroll:L,onDropdownItemClick:k,version:R,onSelect:N,showDescription:function(e,t){se(e&&t?{title:e,description:t}:null)},isMultiSelect:m,options:ue,useDefaultCursor:T,ref:ie})]})):e.jsxRuntimeExports.jsx("div",Object.assign({style:{height:oe,display:"flex"}},{children:e.jsxRuntimeExports.jsx(s.ZeroState,Object.assign({},_,{title:(null==_?void 0:_.title)||"No results found",subTitle:(null==_?void 0:_.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!m&&!(!ue.length&&!W)&&"2.0"!==R&&e.jsxRuntimeExports.jsx(a.default,{onClear:()=>{J(),null==F||F()},onApply:U,list:W&&C?K:z,buttonText:E,buttonOptions:A})]})),!!te&&e.jsxRuntimeExports.jsx(o.Description,{title:te.title,description:te.description,version:R})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../node_modules/react/jsx-runtime.js"),t=require("react"),s=require("../../../zeroState/ZeroState.js"),n=require("../../../../hooks/useOutside.js"),o=require("../../hooks/useDropdown.js"),r=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),c=require("./multiSelect/MultiSelectDropdownBottomBar.js"),a=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,x=290;exports.OpenedDropdown=j=>{let{options:f,isSearchable:S,isMultiSelect:b,maxSelections:m,width:g,allowFreeForm:v,height:w,onClose:O,onSelect:y,onSearch:E,version:D,skipSorting:C,headerRef:R,hideSelectAll:q,primaryButtonText:M,onInfiniteScroll:k,onMultiSelectClear:L,onDropdownItemClick:A,buttonOptions:F,isSearchLoading:I,disableSearchOptions:T,disableSearchedOptionExcept:B,useDefaultCursor:H,containerStyle:Z={},zeroState:_}=j;const{dropdownOptions:z,search:P,searchedString:V,searchedOptions:W,onApplyHandler:$,selectAllHandler:K,onMultiSelectClear:N,onFreeFormSelect:U,onMultiSelectApply:G,latestDropdownOptionsRef:J,getSelectedOptions:Q,getCurrentSelectionCount:X}=o.useDropdown(D,f,y,C,b,E,T,B,m),[Y,ee]=t.useState(null!=g?g:x),[te,se]=t.useState(null),[ne,oe]=t.useState(-1),re=t.useRef(null),ie=t.useRef([]),le=t.useRef(null);n.useOutside(re,(()=>{if(se(null),b&&"2.0"===D){const e=Q(J.current);null==O||O(e)}else null==O||O(z)}),[R,ie]);t.useEffect((()=>{const e=e=>{const t=(e=>{const t=[];return e.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||t.push(e)}));else{const s=e;s.disabled||t.push(s)}})),t})(V&&E?W:z);if(0!==t.length)if("ArrowDown"===e.key)e.preventDefault(),oe((e=>{const s=e<t.length-1?e+1:0;return setTimeout((()=>{var e;const t=null===(e=le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${s}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),s}));else if("ArrowUp"===e.key)e.preventDefault(),oe((e=>{const s=e>0?e-1:t.length-1;return setTimeout((()=>{var e;const t=null===(e=le.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${s}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),s}));else if("Enter"===e.key&&ne>=0){e.preventDefault();const s=t[ne];s&&$(Object.assign(Object.assign({},s),{selected:!s.selected}))}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[ne,V,W,z,E,$]);const ue=null!=w?w:h,ce="number"==typeof ue?S&&b?ue-96:S&&!b||!S&&b?ue-48:ue:ue;t.useEffect((()=>{const e=null!=g?g:x;if(null===te)ee(e);else if("number"==typeof e)ee(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ee(t)}}),[te]);const ae=[],de=(e=>{if(!b||!m&&0!==m)return e;const t=X(e)>=m;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const s=e;return Object.assign(Object.assign({},s),{disabled:s.disabled||!s.selected&&t})}})):e})((V&&E?W:z).map((e=>{var t,s;if(V&&!E){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(V.toLowerCase()))&&(ae.push(!V||e.label===V),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(V.toLowerCase()))||(null===(s=e.searchKey)||void 0===s?void 0:s.toLowerCase().includes(V.toLowerCase()))?(ae.push(!V||e.label===V),e):null}return e})).filter((e=>null!==e))),pe=!!S&&V&&0===de.length;return e.jsxRuntimeExports.jsxs(a.OpennedDropdownContainer,Object.assign({version:D,ref:re,style:Object.assign({width:Y},Z)},{children:[e.jsxRuntimeExports.jsxs("div",Object.assign({style:{width:te?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!S&&e.jsxRuntimeExports.jsx(d.SearchBox,{onSearch:P,version:D}),de.length||V?e.jsxRuntimeExports.jsxs(a.MenuListContainer,Object.assign({minHeight:ue,maxHeight:ce,ref:le},{children:[!!b&&!pe&&!q&&e.jsxRuntimeExports.jsx(u.SelectAllMenu,{version:D,options:V&&E?W:z,onSelect:K}),!v&&pe&&e.jsxRuntimeExports.jsx(p.SearchZeroState,{isLoading:I,height:ce,searchedString:V,containerWidth:g}),v&&(pe||!!ae.length&&ae.every((e=>!1===e)))&&e.jsxRuntimeExports.jsx(i.FreeFormMenu,{version:D,isMultiSelect:b,onSelect:U,searchedString:V}),e.jsxRuntimeExports.jsx(l.MenuList,{onInfiniteScroll:k,onDropdownItemClick:A,version:D,onSelect:$,showDescription:function(e,t){se(e&&t?{title:e,description:t}:null)},isMultiSelect:b,options:de,useDefaultCursor:H,ref:ie,focusedIndex:ne})]})):e.jsxRuntimeExports.jsx("div",Object.assign({style:{height:ue,display:"flex"}},{children:e.jsxRuntimeExports.jsx(s.ZeroState,Object.assign({},_,{title:(null==_?void 0:_.title)||"No results found",subTitle:(null==_?void 0:_.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!b&&!(!de.length&&!V)&&"2.0"!==D&&e.jsxRuntimeExports.jsx(c.default,{onClear:()=>{N(),null==L||L()},onApply:G,list:V&&E?W:z,buttonText:M,buttonOptions:F})]})),!!te&&e.jsxRuntimeExports.jsx(r.Description,{title:te.title,description:te.description,version:D})]}))};
@@ -9,6 +9,8 @@ interface MenuItemProps {
9
9
  last?: boolean;
10
10
  version?: '1.0' | '2.0';
11
11
  useDefaultCursor?: boolean;
12
+ isFocused?: boolean;
13
+ dataIndex?: number;
12
14
  }
13
15
  export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
14
16
  export {};
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../node_modules/react/jsx-runtime.js"),t=require("../../../../../assets/icons/chevronRight.svg.js"),s=require("react"),n=require("styled-components"),i=require("../../../../checkBox/CheckBox.js"),r=require("../../../../list-item/ListItem.js"),o=require("../../../../tooltips/Tooltip.js"),l=require("../../../../TypographyStyle.js"),a=require("../../../../../constants/Theme.js"),c=require("./FreeFormMenu.styled.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=d(n);const x=u.default(r.ListItem)`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../node_modules/react/jsx-runtime.js"),t=require("../../../../../assets/icons/chevronRight.svg.js"),s=require("react"),n=require("styled-components"),i=require("../../../../checkBox/CheckBox.js"),r=require("../../../../list-item/ListItem.js"),o=require("../../../../tooltips/Tooltip.js"),l=require("../../../../TypographyStyle.js"),a=require("../../../../../constants/Theme.js"),d=require("./FreeFormMenu.styled.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=c(n);const x=u.default(r.ListItem)`
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"};
@@ -10,4 +10,4 @@
10
10
  border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${a.DEFAULT_THEME.colorsV2.stroke.primary}`:"none"}};
11
11
  max-height: 248px;
12
12
  overflow-y: auto;
13
- `,j=s.forwardRef(((n,r)=>{let{option:d,isMultiSelect:u,showDescription:j,onSelect:m,last:g,version:v,onDropdownItemClick:b,useDefaultCursor:h}=n;var E;const[f,R]=s.useState(d.selected),y=(e,t)=>{if(!e.children){C(!e.selected);const s=t?Object.assign(Object.assign({},e),{parent:t}):e;null==b||b(s)}},C=e=>{d.disabled||m(Object.assign(Object.assign({},d),{selected:e}))},I=h?{cursor:"default"}:{};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Tooltip,Object.assign({body:"",tooltipContent:d.children?e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:a.DEFAULT_THEME.colorsV2.surface.standard},ref:r,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1)},{children:e.jsxRuntimeExports.jsx(p,Object.assign({version:null!=v?v:"2.0"},{children:d.children.map((t=>{var s;return e.jsxRuntimeExports.jsx(x,{version:v,style:"1.0"!==v&&(null!==(s=null==d?void 0:d.children)&&void 0!==s?s:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),y(t,d)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:d.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsxRuntimeExports.jsx(x,{version:v,style:g?Object.assign({borderBottom:0},I):Object.assign({},I),onClick:e=>{e.preventDefault(),y(d)},onMouseOver:()=>{d.description?j(d.label,d.description):j()},listItem:{value:d.value,label:d.label},subText:d.subText,leadingIcon:u?e.jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsxRuntimeExports.jsx(i.CheckBox,{size:"2.0"===v?"SMALL":"DEFAULT",isDisabled:null!==(E=d.disabled)&&void 0!==E&&E,isChecked:!!d.selected,onValueChange:C}),e.jsxRuntimeExports.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:d.leadingIcon}))]})):d.leadingIcon?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:d.leadingIcon}):void 0,customComponent:d.customComponent,trailingIcon:d.isFreeForm?e.jsxRuntimeExports.jsx(c.FreeFormContainer,{children:e.jsxRuntimeExports.jsx(l.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:"Freeform"}))}):d.children?e.jsxRuntimeExports.jsx(t.default,{width:12,height:12}):d.trailingIcon?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:d.trailingIcon}):void 0,variant:d.disabled?"inactive":d.selected||!u&&f?"selected":"default"})}))})}));exports.MenuItem=j;
13
+ `,j=s.forwardRef(((n,r)=>{let{option:c,isMultiSelect:u,showDescription:j,onSelect:m,last:g,version:v,onDropdownItemClick:b,useDefaultCursor:h,isFocused:E=!1,dataIndex:f=-1}=n;var R;const[y,C]=s.useState(c.selected),I=(e,t)=>{if(!e.children){O(!e.selected);const s=t?Object.assign(Object.assign({},e),{parent:t}):e;null==b||b(s)}},O=e=>{c.disabled||m(Object.assign(Object.assign({},c),{selected:e}))},F=h?{cursor:"default"}:{};return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:e.jsxRuntimeExports.jsx(o.Tooltip,Object.assign({body:"",tooltipContent:c.children?e.jsxRuntimeExports.jsx("div",Object.assign({style:{backgroundColor:a.DEFAULT_THEME.colorsV2.surface.standard},ref:r,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1)},{children:e.jsxRuntimeExports.jsx(p,Object.assign({version:null!=v?v:"2.0"},{children:c.children.map((t=>{var s;return e.jsxRuntimeExports.jsx(x,{version:v,style:"1.0"!==v&&(null!==(s=null==c?void 0:c.children)&&void 0!==s?s:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),I(t,c)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:c.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsxRuntimeExports.jsx(x,{version:v,style:g?Object.assign({borderBottom:0},F):Object.assign({},F),onClick:e=>{e.preventDefault(),I(c)},onMouseOver:()=>{c.description?j(c.label,c.description):j()},listItem:{value:c.value,label:c.label},subText:c.subText,"data-option-index":f,leadingIcon:u?e.jsxRuntimeExports.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsxRuntimeExports.jsx(i.CheckBox,{size:"2.0"===v?"SMALL":"DEFAULT",isDisabled:null!==(R=c.disabled)&&void 0!==R&&R,isChecked:!!c.selected,onValueChange:O}),e.jsxRuntimeExports.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:c.leadingIcon}))]})):c.leadingIcon?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:c.leadingIcon}):void 0,customComponent:c.customComponent,trailingIcon:c.isFreeForm?e.jsxRuntimeExports.jsx(d.FreeFormContainer,{children:e.jsxRuntimeExports.jsx(l.BodyCaption,Object.assign({style:{color:a.COLORS.content.secondary}},{children:"Freeform"}))}):c.children?e.jsxRuntimeExports.jsx(t.default,{width:12,height:12}):c.trailingIcon?e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:c.trailingIcon}):void 0,variant:c.disabled?"inactive":E||c.selected||!u&&y?"selected":"default"})}))})}));exports.MenuItem=j;
@@ -9,6 +9,7 @@ interface MenuListProps {
9
9
  onInfiniteScroll?: () => void;
10
10
  onDropdownItemClick?: (option: DropdownOption) => void;
11
11
  useDefaultCursor?: boolean;
12
+ focusedIndex?: number;
12
13
  }
13
14
  export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement[]>>;
14
15
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../node_modules/react/jsx-runtime.js"),t=require("react"),n=require("./MenuItem.js"),s=require("./MenuList.styled.js");const r=t.forwardRef(((r,o)=>{let{options:i,isMultiSelect:u,showDescription:c,onSelect:l,version:p,onInfiniteScroll:x,onDropdownItemClick:j,useDefaultCursor:a}=r;const m=t.useRef(null),d=t.useRef(null),f=t.useCallback((()=>{m.current&&m.current.disconnect(),m.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==x||x())})),d.current&&m.current.observe(d.current)}),[x]);return t.useEffect((()=>(f(),()=>{m.current&&m.current.disconnect()})),[f,i]),e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i.map(((t,r)=>{const x=r===i.length-1;if(t.options){const i=t;return e.jsxRuntimeExports.jsxs("div",Object.assign({style:{marginTop:"2.0"===p?2:0}},{children:[e.jsxRuntimeExports.jsxs(s.StyledGroupedLabel,Object.assign({version:p},{children:[i.leadingIcon?e.jsxRuntimeExports.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((t,s)=>e.jsxRuntimeExports.jsx(n.MenuItem,{version:p,last:s===i.options.length-1,onSelect:l,showDescription:c,onDropdownItemClick:j,isMultiSelect:u,option:t,useDefaultCursor:a,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${s}`))),x?e.jsxRuntimeExports.jsx("span",{ref:d}):null]}),r)}return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(n.MenuItem,{version:p,last:x,onSelect:l,showDescription:c,onDropdownItemClick:j,isMultiSelect:u,option:t,useDefaultCursor:a,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},r),x?e.jsxRuntimeExports.jsx("span",{ref:d}):null]},r)}))})}));exports.MenuList=r;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../node_modules/react/jsx-runtime.js"),t=require("react"),s=require("./MenuItem.js"),n=require("./MenuList.styled.js");const r=t.forwardRef(((r,o)=>{let{options:i,isMultiSelect:u,showDescription:c,onSelect:l,version:d,onInfiniteScroll:x,onDropdownItemClick:a,useDefaultCursor:p,focusedIndex:j=-1}=r;const m=t.useRef(null),f=t.useRef(null),b=t.useCallback((()=>{m.current&&m.current.disconnect(),m.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==x||x())})),f.current&&m.current.observe(f.current)}),[x]);t.useEffect((()=>(b(),()=>{m.current&&m.current.disconnect()})),[b,i]);let I=-1;const R=e=>(e.disabled||(I+=1),I);return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:i.map(((t,r)=>{const x=r===i.length-1;if(t.options){const i=t;return e.jsxRuntimeExports.jsxs("div",Object.assign({style:{marginTop:"2.0"===d?2:0}},{children:[e.jsxRuntimeExports.jsxs(n.StyledGroupedLabel,Object.assign({version:d},{children:[i.leadingIcon?e.jsxRuntimeExports.jsx("span",Object.assign({style:{marginRight:8}},{children:i.leadingIcon})):null,i.label]})),i.options.map(((t,n)=>{const x=R(t),m=x===j&&!t.disabled;return e.jsxRuntimeExports.jsx(s.MenuItem,{version:d,last:n===i.options.length-1,onSelect:l,showDescription:c,onDropdownItemClick:a,isMultiSelect:u,option:t,useDefaultCursor:p,isFocused:m,dataIndex:x,ref:e=>{o&&"object"==typeof o&&o.current&&e&&e&&e&&e&&(o.current[r]=e)}},`${r}-${n}`)})),x?e.jsxRuntimeExports.jsx("span",{ref:f}):null]}),r)}const m=t,b=R(m),I=b===j&&!m.disabled;return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(s.MenuItem,{version:d,last:x,onSelect:l,showDescription:c,onDropdownItemClick:a,isMultiSelect:u,option:m,useDefaultCursor:p,isFocused:I,dataIndex:b,ref:e=>{o&&"object"==typeof o&&o.current&&e&&(o.current[r]=e)}},r),x?e.jsxRuntimeExports.jsx("span",{ref:f}):null]},r)}))})}));exports.MenuList=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),s=require("../../assets/icons/whatsNew.svg.js"),e=require("../../constants/Theme.js"),n=require("../tooltips/Tooltip.js"),i=require("./WhatsNew.styles.js");exports.WhatsNewButton=o=>{let{onClick:r,newContentCount:a=0,isOpen:c=!1,isLoading:x=!1,tooltip:d="What's new",testId:j="whats-new-button",iconWidth:l=24,iconHeight:u=24,customIcon:p}=o;return x?t.jsxRuntimeExports.jsxs("div",Object.assign({style:{margin:"0px 8px"}},{children:[t.jsxRuntimeExports.jsx("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t.jsxRuntimeExports.jsx("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):t.jsxRuntimeExports.jsx(i.WhatsNewIconContainer,Object.assign({count:a},{children:t.jsxRuntimeExports.jsxs("div",Object.assign({className:"main-icon-class "+(c?"icon-active":""),style:{color:c?e.COLORS.content.brand:e.COLORS.content.primary},onClick:r,"data-testid":j},{children:[t.jsxRuntimeExports.jsx(n.Tooltip,Object.assign({body:d},{children:t.jsxRuntimeExports.jsx("div",{children:p?t.jsxRuntimeExports.jsx(p,{width:l,height:u,color:c?e.COLORS.content.brand:e.COLORS.content.primary}):t.jsxRuntimeExports.jsx(s.default,{width:l,height:u})})})),a>0&&t.jsxRuntimeExports.jsx("div",Object.assign({className:"notification--count"},{children:t.jsxRuntimeExports.jsx("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),s=require("../../assets/icons/whatsNew.svg.js"),e=require("../../constants/Theme.js"),n=require("../tooltips/Tooltip.js"),i=require("./WhatsNew.styles.js");exports.WhatsNewButton=o=>{let{onClick:r,newContentCount:a=0,isOpen:c=!1,isLoading:x=!1,tooltip:d="What's new",testId:j="whats-new-button",iconWidth:l=32,iconHeight:u=32,customIcon:p}=o;return x?t.jsxRuntimeExports.jsxs("div",Object.assign({style:{margin:"0px 8px"}},{children:[t.jsxRuntimeExports.jsx("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t.jsxRuntimeExports.jsx("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):t.jsxRuntimeExports.jsx(i.WhatsNewIconContainer,Object.assign({count:a},{children:t.jsxRuntimeExports.jsxs("div",Object.assign({className:"main-icon-class "+(c?"icon-active":""),style:{color:c?e.COLORS.content.brand:e.COLORS.content.primary},onClick:r,"data-testid":j},{children:[t.jsxRuntimeExports.jsx(n.Tooltip,Object.assign({body:d},{children:t.jsxRuntimeExports.jsx("div",{children:p?t.jsxRuntimeExports.jsx(p,{width:l,height:u,color:c?e.COLORS.content.brand:e.COLORS.content.primary}):t.jsxRuntimeExports.jsx(s.default,{width:l,height:u})})})),a>0&&t.jsxRuntimeExports.jsx("div",Object.assign({className:"notification--count"},{children:t.jsxRuntimeExports.jsx("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("date-fns"),s=require("react"),r=require("../../assets/icons/searchIconWhatsNew.svg.js"),n=require("../../assets/icons/whatsNew.svg.js"),i=require("../../constants/Theme.js"),a=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),d=require("../searchBar/searchBar.js"),c=require("../side-modal/SideModal.js"),x=require("../TypographyStyle.js"),l=require("./WhatsNew.styles.js");exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:h,isLoading:p=!1,title:g="What's new on BIK",searchPlaceholder:R="Search posts",emptyStateTitle:E="Nothing new!",emptyStateDescription:w="There are no new updates or features at the moment. Check back soon!",noResultsText:b="Sorry, no results found.",width:C="480px",onContentClick:O,renderCustomContent:y}=u;const[f,N]=s.useState(""),[S,v]=s.useState(!1),[M,q]=s.useState(""),L=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},T=s.useMemo((()=>{if(!f.trim())return h;const e=f.toLowerCase();return h.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[h,f]),k=0===h.length,B=0===T.length;return j?e.jsxRuntimeExports.jsxs(c.SideModal,Object.assign({width:C,onClose:m,header:"",headerCustomComponent:e.jsxRuntimeExports.jsx(x.TitleMedium,Object.assign({color:i.COLORS.background.inverse},{children:g})),headerStyle:{background:i.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxRuntimeExports.jsxs(l.MainContainer,{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-8"},{children:e.jsxRuntimeExports.jsx(d.SearchBar,{width:"100%",isEnabled:!k,onChange:e=>{N(e)},onEnter:e=>{N(e)},placeholder:R,variant:"default",searchValue:f,onClickCross:()=>{N("")}})})),e.jsxRuntimeExports.jsx(l.WhatsNewWrapper,{children:k||B?e.jsxRuntimeExports.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"icon--wrapper"},{children:k?e.jsxRuntimeExports.jsx(n.default,{width:32,height:32}):e.jsxRuntimeExports.jsx(r.default,{width:32,height:32})})),k?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(x.TitleRegular,{children:E}),e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:w}))]}):B?e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:b})):null]})):e.jsxRuntimeExports.jsx("div",Object.assign({className:"scroller"},{children:T.map(((s,r)=>y?y(s):e.jsxRuntimeExports.jsxs(l.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsxRuntimeExports.jsx(l.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxRuntimeExports.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[L(s)?e.jsxRuntimeExports.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsxRuntimeExports.jsx(x.Caption,{children:"New"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),e.jsxRuntimeExports.jsx(x.Caption,Object.assign({style:{color:i.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt--8"},{children:e.jsxRuntimeExports.jsx(x.TitleSmall,{children:s.title})})),e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsxRuntimeExports.jsx(a.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(q(e.productVideo),v(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),O&&O(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${r}`)))}))})]}),e.jsxRuntimeExports.jsx(o.VideoModal,{isOpen:S,videoUrl:M,onClose:()=>{v(!1)}})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/react/jsx-runtime.js"),t=require("date-fns"),s=require("react"),r=require("../../assets/icons/searchIcon.svg.js"),n=require("../../assets/icons/whatsNew.svg.js"),i=require("../../constants/Theme.js"),a=require("../button/Button.js"),o=require("../feature-announcements/VideoModal.js"),d=require("../searchBar/searchBar.js"),c=require("../side-modal/SideModal.js"),x=require("../TypographyStyle.js"),l=require("./WhatsNew.styles.js");exports.WhatsNewPanel=u=>{let{isOpen:j,onClose:m,content:h,isLoading:p=!1,title:g="What's new on BIK",searchPlaceholder:R="Search posts",emptyStateTitle:E="Nothing new!",emptyStateDescription:w="There are no new updates or features at the moment. Check back soon!",noResultsText:b="Sorry, no results found.",width:C="480px",onContentClick:O,renderCustomContent:y}=u;const[f,N]=s.useState(""),[S,v]=s.useState(!1),[M,q]=s.useState(""),L=e=>{if(!e.createdAt)return!1;const s=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return t.differenceInBusinessDays(new Date,s)<7},T=s.useMemo((()=>{if(!f.trim())return h;const e=f.toLowerCase();return h.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[h,f]),k=0===h.length,B=0===T.length;return j?e.jsxRuntimeExports.jsxs(c.SideModal,Object.assign({width:C,onClose:m,header:"",headerCustomComponent:e.jsxRuntimeExports.jsx(x.TitleMedium,Object.assign({color:i.COLORS.background.inverse},{children:g})),headerStyle:{background:i.COLORS.background.brandLight},hideFooter:!0},{children:[e.jsxRuntimeExports.jsxs(l.MainContainer,{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-8"},{children:e.jsxRuntimeExports.jsx(d.SearchBar,{width:"100%",isEnabled:!k,onChange:e=>{N(e)},onEnter:e=>{N(e)},placeholder:R,variant:"default",searchValue:f,onClickCross:()=>{N("")}})})),e.jsxRuntimeExports.jsx(l.WhatsNewWrapper,{children:k||B?e.jsxRuntimeExports.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsxRuntimeExports.jsx("div",Object.assign({className:"icon--wrapper"},{children:k?e.jsxRuntimeExports.jsx(n.default,{width:32,height:32}):e.jsxRuntimeExports.jsx(r.default,{width:32,height:32})})),k?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(x.TitleRegular,{children:E}),e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:w}))]}):B?e.jsxRuntimeExports.jsx(x.BodyPrimary,Object.assign({color:i.COLORS.content.secondary,className:"text--align",style:{maxWidth:300}},{children:b})):null]})):e.jsxRuntimeExports.jsx("div",Object.assign({className:"scroller"},{children:T.map(((s,r)=>y?y(s):e.jsxRuntimeExports.jsxs(l.MainCardContainer,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsxRuntimeExports.jsx(l.BackgroundImageContainer,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxRuntimeExports.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[L(s)?e.jsxRuntimeExports.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsxRuntimeExports.jsx(x.Caption,{children:"New"})})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{}),e.jsxRuntimeExports.jsx(x.Caption,Object.assign({style:{color:i.COLORS.content.placeholder}},{children:s.createdAt?t.format(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsxRuntimeExports.jsx("div",Object.assign({className:"mt--8"},{children:e.jsxRuntimeExports.jsx(x.TitleSmall,{children:s.title})})),e.jsxRuntimeExports.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsxRuntimeExports.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsxRuntimeExports.jsx(a.Button,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(q(e.productVideo),v(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),O&&O(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${r}`)))}))})]}),e.jsxRuntimeExports.jsx(o.VideoModal,{isOpen:S,videoUrl:M,onClose:()=>{v(!1)}})]})):e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{})};
@@ -0,0 +1 @@
1
+ import*as r from"react";var t;function e(){return e=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}return r},e.apply(this,arguments)}var a=a=>r.createElement("svg",e({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},a),t||(t=r.createElement("path",{stroke:"currentColor",d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z"})));export{a as default};
@@ -1 +1 @@
1
- import*as e from"react";var t;function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},r.apply(this,arguments)}var a=a=>e.createElement("svg",r({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},a),t||(t=e.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5},e.createElement("path",{d:"m18.135 13.479-5.044 7.323a.562.562 0 0 0-.076.524l.315.875a.564.564 0 0 0 .887.243l2.836-2.27"}),e.createElement("path",{d:"M6.834 15.248a.562.562 0 0 0 .488.896c4.3-.295 7.47 1.858 7.47 1.858l2.26 1.672a2.813 2.813 0 0 0 3.344-4.523l-2.261-1.672s-2.989-2.398-4.114-7.073a.562.562 0 0 0-1-.204l-6.187 9.046ZM7.769 10.561l-1.582-.547M9.707 8.268l-.79-1.741M8.19 9.264l-2.44-2.11"}))));export{a as default};
1
+ import*as e from"react";var t,r;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},a.apply(this,arguments)}var n=n=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 32 32"},n),t||(t=e.createElement("g",{stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.5,clipPath:"url(#whatsNew_svg__a)"},e.createElement("path",{strokeLinejoin:"round",d:"m22.18 15.305-6.725 9.097a.75.75 0 0 0-.102.7l.42 1.165a.75.75 0 0 0 1.183.325l3.78-3.027"}),e.createElement("path",{strokeLinejoin:"round",d:"M6.446 17.664a.75.75 0 0 0 .65 1.194c6.4-.393 10.625 2.478 10.625 2.478l3.016 2.23a3.75 3.75 0 1 0 4.458-6.032l-3.015-2.229s-3.985-3.197-5.486-9.43a.75.75 0 0 0-1.332-.273L6.446 17.664Z"}),e.createElement("path",{d:"m7.692 12.082-2.443-.73m5.693-2.995L9.89 6.036m-.97 3.65L5.667 6.87"}))),r||(r=e.createElement("defs",null,e.createElement("clipPath",{id:"whatsNew_svg__a"},e.createElement("path",{fill:"#fff",d:"M4 4h24v24H4z"})))));export{n as default};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const Menus: ({
3
2
  displayName: string;
4
3
  key: number;
@@ -1 +1 @@
1
- import{j as e}from"../../../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as o,useEffect as n}from"react";import{ZeroState as s}from"../../../zeroState/ZeroState.js";import{useOutside as i}from"../../../../hooks/useOutside.js";import{useDropdown as r}from"../../hooks/useDropdown.js";import{Description as l}from"./description/Description.js";import{FreeFormMenu as c}from"./menu/FreeFormMenu.js";import{MenuList as a}from"./menu/MenuList.js";import{SelectAllMenu as u}from"./menu/SelectAllMenu.js";import p from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as d,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as h}from"./searchbox/SearchBox.js";import{SearchZeroState as f}from"./searchbox/SearchZeroState.js";const j=304,S=290,b=b=>{let{options:g,isSearchable:x,isMultiSelect:O,maxSelections:v,width:w,allowFreeForm:y,height:C,onClose:D,onSelect:M,onSearch:L,version:k,skipSorting:A,headerRef:F,hideSelectAll:I,primaryButtonText:B,onInfiniteScroll:H,onMultiSelectClear:T,onDropdownItemClick:z,buttonOptions:R,isSearchLoading:W,disableSearchOptions:Z,disableSearchedOptionExcept:q,useDefaultCursor:E,containerStyle:K={},zeroState:N}=b;const{dropdownOptions:P,search:_,searchedString:G,searchedOptions:J,onApplyHandler:Q,selectAllHandler:U,onMultiSelectClear:V,onFreeFormSelect:X,onMultiSelectApply:Y,latestDropdownOptionsRef:$,getSelectedOptions:ee,getCurrentSelectionCount:te}=r(k,g,M,A,O,L,Z,q,v),[oe,ne]=t(null!=w?w:S),[se,ie]=t(null),re=o(null),le=o([]);i(re,(()=>{if(ie(null),O&&"2.0"===k){const e=ee($.current);null==D||D(e)}else null==D||D(P)}),[F,le]);const ce=null!=C?C:j,ae="number"==typeof ce?x&&O?ce-96:x&&!O||!x&&O?ce-48:ce:ce;n((()=>{const e=null!=w?w:S;if(null===se)ne(e);else if("number"==typeof e)ne(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ne(t)}}),[se]);const ue=[],pe=(e=>{if(!O||!v&&0!==v)return e;const t=te(e)>=v;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const o=e;return Object.assign(Object.assign({},o),{disabled:o.disabled||!o.selected&&t})}})):e})((G&&L?J:P).map((e=>{var t,o;if(G&&!L){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(G.toLowerCase()))&&(ue.push(!G||e.label===G),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(G.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(G.toLowerCase()))?(ue.push(!G||e.label===G),e):null}return e})).filter((e=>null!==e))),de=!!x&&G&&0===pe.length;return e.jsxs(d,Object.assign({version:k,ref:re,style:Object.assign({width:oe},K)},{children:[e.jsxs("div",Object.assign({style:{width:se?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(h,{onSearch:_,version:k}),pe.length||G?e.jsxs(m,Object.assign({minHeight:ce,maxHeight:ae},{children:[!!O&&!de&&!I&&e.jsx(u,{version:k,options:G&&L?J:P,onSelect:U}),!y&&de&&e.jsx(f,{isLoading:W,height:ae,searchedString:G,containerWidth:w}),y&&(de||!!ue.length&&ue.every((e=>!1===e)))&&e.jsx(c,{version:k,isMultiSelect:O,onSelect:X,searchedString:G}),e.jsx(a,{onInfiniteScroll:H,onDropdownItemClick:z,version:k,onSelect:Q,showDescription:function(e,t){ie(e&&t?{title:e,description:t}:null)},isMultiSelect:O,options:pe,useDefaultCursor:E,ref:le})]})):e.jsx("div",Object.assign({style:{height:ce,display:"flex"}},{children:e.jsx(s,Object.assign({},N,{title:(null==N?void 0:N.title)||"No results found",subTitle:(null==N?void 0:N.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!O&&!(!pe.length&&!G)&&"2.0"!==k&&e.jsx(p,{onClear:()=>{V(),null==T||T()},onApply:Y,list:G&&L?J:P,buttonText:B,buttonOptions:R})]})),!!se&&e.jsx(l,{title:se.title,description:se.description,version:k})]}))};export{b as OpenedDropdown};
1
+ import{j as e}from"../../../../node_modules/react/jsx-runtime.js";import{useState as t,useRef as o,useEffect as n}from"react";import{ZeroState as s}from"../../../zeroState/ZeroState.js";import{useOutside as i}from"../../../../hooks/useOutside.js";import{useDropdown as r}from"../../hooks/useDropdown.js";import{Description as l}from"./description/Description.js";import{FreeFormMenu as c}from"./menu/FreeFormMenu.js";import{MenuList as a}from"./menu/MenuList.js";import{SelectAllMenu as u}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as p,MenuListContainer as h}from"./OpennedDropdown.styled.js";import{SearchBox as m}from"./searchbox/SearchBox.js";import{SearchZeroState as f}from"./searchbox/SearchZeroState.js";const b=304,j=290,g=g=>{let{options:S,isSearchable:v,isMultiSelect:x,maxSelections:w,width:y,allowFreeForm:O,height:C,onClose:D,onSelect:k,onSearch:L,version:M,skipSorting:A,headerRef:I,hideSelectAll:E,primaryButtonText:F,onInfiniteScroll:T,onMultiSelectClear:B,onDropdownItemClick:H,buttonOptions:q,isSearchLoading:z,disableSearchOptions:R,disableSearchedOptionExcept:V,useDefaultCursor:W,containerStyle:Z={},zeroState:$}=g;const{dropdownOptions:K,search:N,searchedString:P,searchedOptions:U,onApplyHandler:_,selectAllHandler:G,onMultiSelectClear:J,onFreeFormSelect:Q,onMultiSelectApply:X,latestDropdownOptionsRef:Y,getSelectedOptions:ee,getCurrentSelectionCount:te}=r(M,S,k,A,x,L,R,V,w),[oe,ne]=t(null!=y?y:j),[se,ie]=t(null),[re,le]=t(-1),ce=o(null),ae=o([]),ue=o(null);i(ce,(()=>{if(ie(null),x&&"2.0"===M){const e=ee(Y.current);null==D||D(e)}else null==D||D(K)}),[I,ae]);n((()=>{const e=e=>{const t=(e=>{const t=[];return e.forEach((e=>{if(e.options)e.options.forEach((e=>{e.disabled||t.push(e)}));else{const o=e;o.disabled||t.push(o)}})),t})(P&&L?U:K);if(0!==t.length)if("ArrowDown"===e.key)e.preventDefault(),le((e=>{const o=e<t.length-1?e+1:0;return setTimeout((()=>{var e;const t=null===(e=ue.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${o}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),o}));else if("ArrowUp"===e.key)e.preventDefault(),le((e=>{const o=e>0?e-1:t.length-1;return setTimeout((()=>{var e;const t=null===(e=ue.current)||void 0===e?void 0:e.querySelector(`[data-option-index="${o}"]`);t&&t.scrollIntoView({block:"nearest",behavior:"smooth"})}),0),o}));else if("Enter"===e.key&&re>=0){e.preventDefault();const o=t[re];o&&_(Object.assign(Object.assign({},o),{selected:!o.selected}))}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[re,P,U,K,L,_]);const de=null!=C?C:b,pe="number"==typeof de?v&&x?de-96:v&&!x||!v&&x?de-48:de:de;n((()=>{const e=null!=y?y:j;if(null===se)ne(e);else if("number"==typeof e)ne(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ne(t)}}),[se]);const he=[],me=(e=>{if(!x||!w&&0!==w)return e;const t=te(e)>=w;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const o=e;return Object.assign(Object.assign({},o),{disabled:o.disabled||!o.selected&&t})}})):e})((P&&L?U:K).map((e=>{var t,o;if(P&&!L){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))&&(he.push(!P||e.label===P),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(P.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(P.toLowerCase()))?(he.push(!P||e.label===P),e):null}return e})).filter((e=>null!==e))),fe=!!v&&P&&0===me.length;return e.jsxs(p,Object.assign({version:M,ref:ce,style:Object.assign({width:oe},Z)},{children:[e.jsxs("div",Object.assign({style:{width:se?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!v&&e.jsx(m,{onSearch:N,version:M}),me.length||P?e.jsxs(h,Object.assign({minHeight:de,maxHeight:pe,ref:ue},{children:[!!x&&!fe&&!E&&e.jsx(u,{version:M,options:P&&L?U:K,onSelect:G}),!O&&fe&&e.jsx(f,{isLoading:z,height:pe,searchedString:P,containerWidth:y}),O&&(fe||!!he.length&&he.every((e=>!1===e)))&&e.jsx(c,{version:M,isMultiSelect:x,onSelect:Q,searchedString:P}),e.jsx(a,{onInfiniteScroll:T,onDropdownItemClick:H,version:M,onSelect:_,showDescription:function(e,t){ie(e&&t?{title:e,description:t}:null)},isMultiSelect:x,options:me,useDefaultCursor:W,ref:ae,focusedIndex:re})]})):e.jsx("div",Object.assign({style:{height:de,display:"flex"}},{children:e.jsx(s,Object.assign({},$,{title:(null==$?void 0:$.title)||"No results found",subTitle:(null==$?void 0:$.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!x&&!(!me.length&&!P)&&"2.0"!==M&&e.jsx(d,{onClear:()=>{J(),null==B||B()},onApply:X,list:P&&L?U:K,buttonText:F,buttonOptions:q})]})),!!se&&e.jsx(l,{title:se.title,description:se.description,version:M})]}))};export{g as OpenedDropdown};
@@ -9,6 +9,8 @@ interface MenuItemProps {
9
9
  last?: boolean;
10
10
  version?: '1.0' | '2.0';
11
11
  useDefaultCursor?: boolean;
12
+ isFocused?: boolean;
13
+ dataIndex?: number;
12
14
  }
13
15
  export declare const MenuItem: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
14
16
  export {};
@@ -1,4 +1,4 @@
1
- import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import t from"../../../../../assets/icons/chevronRight.svg.js";import{forwardRef as n,useState as o}from"react";import s from"styled-components";import{CheckBox as i}from"../../../../checkBox/CheckBox.js";import{ListItem as r}from"../../../../list-item/ListItem.js";import{Tooltip as l}from"../../../../tooltips/Tooltip.js";import{BodyCaption as a}from"../../../../TypographyStyle.js";import{DEFAULT_THEME as c,COLORS as d}from"../../../../../constants/Theme.js";import{FreeFormContainer as m}from"./FreeFormMenu.styled.js";const p=s(r)`
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import t from"../../../../../assets/icons/chevronRight.svg.js";import{forwardRef as n,useState as o}from"react";import s from"styled-components";import{CheckBox as i}from"../../../../checkBox/CheckBox.js";import{ListItem as r}from"../../../../list-item/ListItem.js";import{Tooltip as l}from"../../../../tooltips/Tooltip.js";import{BodyCaption as a}from"../../../../TypographyStyle.js";import{DEFAULT_THEME as c,COLORS as d}from"../../../../../constants/Theme.js";import{FreeFormContainer as p}from"./FreeFormMenu.styled.js";const m=s(r)`
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"};
@@ -10,4 +10,4 @@ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import t fr
10
10
  border: ${e=>{let{version:t}=e;return"1.0"===t?`1px solid ${c.colorsV2.stroke.primary}`:"none"}};
11
11
  max-height: 248px;
12
12
  overflow-y: auto;
13
- `,g=n(((n,s)=>{let{option:r,isMultiSelect:g,showDescription:x,onSelect:j,last:v,version:h,onDropdownItemClick:b,useDefaultCursor:f}=n;var y;const[C,I]=o(r.selected),O=(e,t)=>{if(!e.children){F(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==b||b(n)}},F=e=>{r.disabled||j(Object.assign(Object.assign({},r),{selected:e}))},k=f?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(l,Object.assign({body:"",tooltipContent:r.children?e.jsx("div",Object.assign({style:{backgroundColor:c.colorsV2.surface.standard},ref:s,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1)},{children:e.jsx(u,Object.assign({version:null!=h?h:"2.0"},{children:r.children.map((t=>{var n;return e.jsx(p,{version:h,style:"1.0"!==h&&(null!==(n=null==r?void 0:r.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),O(t,r)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:r.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(p,{version:h,style:v?Object.assign({borderBottom:0},k):Object.assign({},k),onClick:e=>{e.preventDefault(),O(r)},onMouseOver:()=>{r.description?x(r.label,r.description):x()},listItem:{value:r.value,label:r.label},subText:r.subText,leadingIcon:g?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(i,{size:"2.0"===h?"SMALL":"DEFAULT",isDisabled:null!==(y=r.disabled)&&void 0!==y&&y,isChecked:!!r.selected,onValueChange:F}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:r.leadingIcon}))]})):r.leadingIcon?e.jsx(e.Fragment,{children:r.leadingIcon}):void 0,customComponent:r.customComponent,trailingIcon:r.isFreeForm?e.jsx(m,{children:e.jsx(a,Object.assign({style:{color:d.content.secondary}},{children:"Freeform"}))}):r.children?e.jsx(t,{width:12,height:12}):r.trailingIcon?e.jsx(e.Fragment,{children:r.trailingIcon}):void 0,variant:r.disabled?"inactive":r.selected||!g&&C?"selected":"default"})}))})}));export{g as MenuItem};
13
+ `,g=n(((n,s)=>{let{option:r,isMultiSelect:g,showDescription:x,onSelect:j,last:v,version:h,onDropdownItemClick:b,useDefaultCursor:f,isFocused:y=!1,dataIndex:I=-1}=n;var C;const[O,F]=o(r.selected),k=(e,t)=>{if(!e.children){T(!e.selected);const n=t?Object.assign(Object.assign({},e),{parent:t}):e;null==b||b(n)}},T=e=>{r.disabled||j(Object.assign(Object.assign({},r),{selected:e}))},w=f?{cursor:"default"}:{};return e.jsx(e.Fragment,{children:e.jsx(l,Object.assign({body:"",tooltipContent:r.children?e.jsx("div",Object.assign({style:{backgroundColor:c.colorsV2.surface.standard},ref:s,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1)},{children:e.jsx(u,Object.assign({version:null!=h?h:"2.0"},{children:r.children.map((t=>{var n;return e.jsx(m,{version:h,style:"1.0"!==h&&(null!==(n=null==r?void 0:r.children)&&void 0!==n?n:[]).length-1?{borderBottom:0}:{},onClick:e=>{e.preventDefault(),k(t,r)},listItem:{value:t.value,label:t.label},subText:t.subText,leadingIcon:t.leadingIcon||void 0,customComponent:t.customComponent,trailingIcon:t.trailingIcon||void 0,variant:r.disabled?"inactive":t.selected?"selected":"default"},t.value)}))}))})):e.jsx(e.Fragment,{}),placement:"right-start",hideArrow:!0},{children:e.jsx(m,{version:h,style:v?Object.assign({borderBottom:0},w):Object.assign({},w),onClick:e=>{e.preventDefault(),k(r)},onMouseOver:()=>{r.description?x(r.label,r.description):x()},listItem:{value:r.value,label:r.label},subText:r.subText,"data-option-index":I,leadingIcon:g?e.jsxs("div",Object.assign({style:{display:"flex",alignContent:"center",justifyContent:"center",gap:8}},{children:[e.jsx(i,{size:"2.0"===h?"SMALL":"DEFAULT",isDisabled:null!==(C=r.disabled)&&void 0!==C&&C,isChecked:!!r.selected,onValueChange:T}),e.jsx("div",Object.assign({style:{marginRight:"-4px"}},{children:r.leadingIcon}))]})):r.leadingIcon?e.jsx(e.Fragment,{children:r.leadingIcon}):void 0,customComponent:r.customComponent,trailingIcon:r.isFreeForm?e.jsx(p,{children:e.jsx(a,Object.assign({style:{color:d.content.secondary}},{children:"Freeform"}))}):r.children?e.jsx(t,{width:12,height:12}):r.trailingIcon?e.jsx(e.Fragment,{children:r.trailingIcon}):void 0,variant:r.disabled?"inactive":y||r.selected||!g&&O?"selected":"default"})}))})}));export{g as MenuItem};
@@ -9,6 +9,7 @@ interface MenuListProps {
9
9
  onInfiniteScroll?: () => void;
10
10
  onDropdownItemClick?: (option: DropdownOption) => void;
11
11
  useDefaultCursor?: boolean;
12
+ focusedIndex?: number;
12
13
  }
13
14
  export declare const MenuList: import("react").ForwardRefExoticComponent<MenuListProps & import("react").RefAttributes<HTMLDivElement[]>>;
14
15
  export {};
@@ -1 +1 @@
1
- import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import{forwardRef as n,useRef as t,useCallback as r,useEffect as s}from"react";import{MenuItem as o}from"./MenuItem.js";import{StyledGroupedLabel as i}from"./MenuList.styled.js";const c=n(((n,c)=>{let{options:l,isMultiSelect:u,showDescription:p,onSelect:a,version:j,onInfiniteScroll:m,onDropdownItemClick:d,useDefaultCursor:f}=n;const g=t(null),h=t(null),x=r((()=>{g.current&&g.current.disconnect(),g.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==m||m())})),h.current&&g.current.observe(h.current)}),[m]);return s((()=>(x(),()=>{g.current&&g.current.disconnect()})),[x,l]),e.jsx(e.Fragment,{children:l.map(((n,t)=>{const r=t===l.length-1;if(n.options){const s=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===j?2:0}},{children:[e.jsxs(i,Object.assign({version:j},{children:[s.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:s.leadingIcon})):null,s.label]})),s.options.map(((n,r)=>e.jsx(o,{version:j,last:r===s.options.length-1,onSelect:a,showDescription:p,onDropdownItemClick:d,isMultiSelect:u,option:n,useDefaultCursor:f,ref:e=>{c&&"object"==typeof c&&c.current&&e&&e&&e&&e&&(c.current[t]=e)}},`${t}-${r}`))),r?e.jsx("span",{ref:h}):null]}),t)}return e.jsxs("div",{children:[e.jsx(o,{version:j,last:r,onSelect:a,showDescription:p,onDropdownItemClick:d,isMultiSelect:u,option:n,useDefaultCursor:f,ref:e=>{c&&"object"==typeof c&&c.current&&e&&(c.current[t]=e)}},t),r?e.jsx("span",{ref:h}):null]},t)}))})}));export{c as MenuList};
1
+ import{j as e}from"../../../../../node_modules/react/jsx-runtime.js";import{forwardRef as n,useRef as t,useCallback as r,useEffect as s}from"react";import{MenuItem as o}from"./MenuItem.js";import{StyledGroupedLabel as i}from"./MenuList.styled.js";const c=n(((n,c)=>{let{options:l,isMultiSelect:u,showDescription:d,onSelect:a,version:p,onInfiniteScroll:j,onDropdownItemClick:m,useDefaultCursor:f,focusedIndex:x=-1}=n;const g=t(null),I=t(null),b=r((()=>{g.current&&g.current.disconnect(),g.current=new IntersectionObserver((e=>{e[0].isIntersecting&&(null==j||j())})),I.current&&g.current.observe(I.current)}),[j]);s((()=>(b(),()=>{g.current&&g.current.disconnect()})),[b,l]);let h=-1;const D=e=>(e.disabled||(h+=1),h);return e.jsx(e.Fragment,{children:l.map(((n,t)=>{const r=t===l.length-1;if(n.options){const s=n;return e.jsxs("div",Object.assign({style:{marginTop:"2.0"===p?2:0}},{children:[e.jsxs(i,Object.assign({version:p},{children:[s.leadingIcon?e.jsx("span",Object.assign({style:{marginRight:8}},{children:s.leadingIcon})):null,s.label]})),s.options.map(((n,r)=>{const i=D(n),l=i===x&&!n.disabled;return e.jsx(o,{version:p,last:r===s.options.length-1,onSelect:a,showDescription:d,onDropdownItemClick:m,isMultiSelect:u,option:n,useDefaultCursor:f,isFocused:l,dataIndex:i,ref:e=>{c&&"object"==typeof c&&c.current&&e&&e&&e&&e&&(c.current[t]=e)}},`${t}-${r}`)})),r?e.jsx("span",{ref:I}):null]}),t)}const s=n,j=D(s),g=j===x&&!s.disabled;return e.jsxs("div",{children:[e.jsx(o,{version:p,last:r,onSelect:a,showDescription:d,onDropdownItemClick:m,isMultiSelect:u,option:s,useDefaultCursor:f,isFocused:g,dataIndex:j,ref:e=>{c&&"object"==typeof c&&c.current&&e&&(c.current[t]=e)}},t),r?e.jsx("span",{ref:I}):null]},t)}))})}));export{c as MenuList};
@@ -1 +1 @@
1
- import{j as t}from"../../node_modules/react/jsx-runtime.js";import s from"../../assets/icons/whatsNew.svg.js";import{COLORS as n}from"../../constants/Theme.js";import{Tooltip as i}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as e}from"./WhatsNew.styles.js";const o=o=>{let{onClick:r,newContentCount:a=0,isOpen:c=!1,isLoading:d=!1,tooltip:l="What's new",testId:m="whats-new-button",iconWidth:h=24,iconHeight:j=24,customIcon:p}=o;return d?t.jsxs("div",Object.assign({style:{margin:"0px 8px"}},{children:[t.jsx("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t.jsx("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):t.jsx(e,Object.assign({count:a},{children:t.jsxs("div",Object.assign({className:"main-icon-class "+(c?"icon-active":""),style:{color:c?n.content.brand:n.content.primary},onClick:r,"data-testid":m},{children:[t.jsx(i,Object.assign({body:l},{children:t.jsx("div",{children:p?t.jsx(p,{width:h,height:j,color:c?n.content.brand:n.content.primary}):t.jsx(s,{width:h,height:j})})})),a>0&&t.jsx("div",Object.assign({className:"notification--count"},{children:t.jsx("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};export{o as WhatsNewButton};
1
+ import{j as t}from"../../node_modules/react/jsx-runtime.js";import s from"../../assets/icons/whatsNew.svg.js";import{COLORS as n}from"../../constants/Theme.js";import{Tooltip as i}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as e}from"./WhatsNew.styles.js";const o=o=>{let{onClick:r,newContentCount:a=0,isOpen:c=!1,isLoading:d=!1,tooltip:l="What's new",testId:m="whats-new-button",iconWidth:h=32,iconHeight:j=32,customIcon:p}=o;return d?t.jsxs("div",Object.assign({style:{margin:"0px 8px"}},{children:[t.jsx("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),t.jsx("style",{children:"\n\t\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t\t}\n\t\t\t\t\t"})]})):t.jsx(e,Object.assign({count:a},{children:t.jsxs("div",Object.assign({className:"main-icon-class "+(c?"icon-active":""),style:{color:c?n.content.brand:n.content.primary},onClick:r,"data-testid":m},{children:[t.jsx(i,Object.assign({body:l},{children:t.jsx("div",{children:p?t.jsx(p,{width:h,height:j,color:c?n.content.brand:n.content.primary}):t.jsx(s,{width:h,height:j})})})),a>0&&t.jsx("div",Object.assign({className:"notification--count"},{children:t.jsx("div",Object.assign({className:"count--text"},{children:a}))}))]}))}))};export{o as WhatsNewButton};
@@ -1 +1 @@
1
- import{j as e}from"../../node_modules/react/jsx-runtime.js";import{format as t,differenceInBusinessDays as s}from"date-fns";import{useState as n,useMemo as r}from"react";import a from"../../assets/icons/searchIconWhatsNew.svg.js";import o from"../../assets/icons/whatsNew.svg.js";import{COLORS as i}from"../../constants/Theme.js";import{Button as c}from"../button/Button.js";import{VideoModal as d}from"../feature-announcements/VideoModal.js";import{SearchBar as l}from"../searchBar/searchBar.js";import{SideModal as h}from"../side-modal/SideModal.js";import{TitleMedium as m,TitleRegular as j,BodyPrimary as x,Caption as g,TitleSmall as u}from"../TypographyStyle.js";import{MainContainer as p,WhatsNewWrapper as w,MainCardContainer as b,BackgroundImageContainer as f}from"./WhatsNew.styles.js";const y=y=>{let{isOpen:C,onClose:N,content:O,isLoading:v=!1,title:k="What's new on BIK",searchPlaceholder:A="Search posts",emptyStateTitle:D="Nothing new!",emptyStateDescription:S="There are no new updates or features at the moment. Check back soon!",noResultsText:T="Sorry, no results found.",width:L="480px",onContentClick:M,renderCustomContent:W}=y;const[B,F]=n(""),[U,V]=n(!1),[_,E]=n(""),I=e=>{if(!e.createdAt)return!1;const t=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return s(new Date,t)<7},P=r((()=>{if(!B.trim())return O;const e=B.toLowerCase();return O.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[O,B]),R=0===O.length,z=0===P.length;return C?e.jsxs(h,Object.assign({width:L,onClose:N,header:"",headerCustomComponent:e.jsx(m,Object.assign({color:i.background.inverse},{children:k})),headerStyle:{background:i.background.brandLight},hideFooter:!0},{children:[e.jsxs(p,{children:[e.jsx("div",Object.assign({className:"mt-8"},{children:e.jsx(l,{width:"100%",isEnabled:!R,onChange:e=>{F(e)},onEnter:e=>{F(e)},placeholder:A,variant:"default",searchValue:B,onClickCross:()=>{F("")}})})),e.jsx(w,{children:R||z?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:R?e.jsx(o,{width:32,height:32}):e.jsx(a,{width:32,height:32})})),R?e.jsxs(e.Fragment,{children:[e.jsx(j,{children:D}),e.jsx(x,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:S}))]}):z?e.jsx(x,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:T})):null]})):e.jsx("div",Object.assign({className:"scroller"},{children:P.map(((s,n)=>W?W(s):e.jsxs(b,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsx(f,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[I(s)?e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(g,{children:"New"})})):e.jsx(e.Fragment,{}),e.jsx(g,Object.assign({style:{color:i.content.placeholder}},{children:s.createdAt?t(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(u,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(c,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(E(e.productVideo),V(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),M&&M(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${n}`)))}))})]}),e.jsx(d,{isOpen:U,videoUrl:_,onClose:()=>{V(!1)}})]})):e.jsx(e.Fragment,{})};export{y as WhatsNewPanel};
1
+ import{j as e}from"../../node_modules/react/jsx-runtime.js";import{format as t,differenceInBusinessDays as s}from"date-fns";import{useState as n,useMemo as r}from"react";import a from"../../assets/icons/searchIcon.svg.js";import o from"../../assets/icons/whatsNew.svg.js";import{COLORS as i}from"../../constants/Theme.js";import{Button as c}from"../button/Button.js";import{VideoModal as d}from"../feature-announcements/VideoModal.js";import{SearchBar as l}from"../searchBar/searchBar.js";import{SideModal as m}from"../side-modal/SideModal.js";import{TitleMedium as h,TitleRegular as j,BodyPrimary as x,Caption as g,TitleSmall as u}from"../TypographyStyle.js";import{MainContainer as p,WhatsNewWrapper as w,MainCardContainer as b,BackgroundImageContainer as f}from"./WhatsNew.styles.js";const y=y=>{let{isOpen:C,onClose:N,content:O,isLoading:v=!1,title:k="What's new on BIK",searchPlaceholder:A="Search posts",emptyStateTitle:D="Nothing new!",emptyStateDescription:S="There are no new updates or features at the moment. Check back soon!",noResultsText:T="Sorry, no results found.",width:L="480px",onContentClick:M,renderCustomContent:W}=y;const[B,F]=n(""),[U,V]=n(!1),[_,E]=n(""),I=e=>{if(!e.createdAt)return!1;const t=e.createdAt.toDate?e.createdAt.toDate():new Date(e.createdAt);return s(new Date,t)<7},P=r((()=>{if(!B.trim())return O;const e=B.toLowerCase();return O.filter((t=>t.title.toLowerCase().includes(e)||t.body.toLowerCase().includes(e)||t.content&&t.content.toLowerCase().includes(e)))}),[O,B]),R=0===O.length,z=0===P.length;return C?e.jsxs(m,Object.assign({width:L,onClose:N,header:"",headerCustomComponent:e.jsx(h,Object.assign({color:i.background.inverse},{children:k})),headerStyle:{background:i.background.brandLight},hideFooter:!0},{children:[e.jsxs(p,{children:[e.jsx("div",Object.assign({className:"mt-8"},{children:e.jsx(l,{width:"100%",isEnabled:!R,onChange:e=>{F(e)},onEnter:e=>{F(e)},placeholder:A,variant:"default",searchValue:B,onClickCross:()=>{F("")}})})),e.jsx(w,{children:R||z?e.jsxs("div",Object.assign({className:"no--data--found"},{children:[e.jsx("div",Object.assign({className:"icon--wrapper"},{children:R?e.jsx(o,{width:32,height:32}):e.jsx(a,{width:32,height:32})})),R?e.jsxs(e.Fragment,{children:[e.jsx(j,{children:D}),e.jsx(x,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:S}))]}):z?e.jsx(x,Object.assign({color:i.content.secondary,className:"text--align",style:{maxWidth:300}},{children:T})):null]})):e.jsx("div",Object.assign({className:"scroller"},{children:P.map(((s,n)=>W?W(s):e.jsxs(b,Object.assign({className:"padding--16 mb-mt-8"},{children:[e.jsx(f,{imageUrl:s.image,height:"209px",width:"100%",style:{borderRadius:"4px"}}),e.jsx("div",Object.assign({className:"mt-20 full--width"},{children:e.jsxs("div",Object.assign({className:"created--at flex flex--row"},{children:[I(s)?e.jsx("div",Object.assign({className:"new--content--tag"},{children:e.jsx(g,{children:"New"})})):e.jsx(e.Fragment,{}),e.jsx(g,Object.assign({style:{color:i.content.placeholder}},{children:s.createdAt?t(s.createdAt.toDate?s.createdAt.toDate():new Date(s.createdAt),"dd MMMM yyyy"):""}))]}))})),e.jsx("div",Object.assign({className:"mt--8"},{children:e.jsx(u,{children:s.title})})),e.jsx("div",{dangerouslySetInnerHTML:{__html:s.body},className:"card--desc mt--12"}),e.jsx("div",Object.assign({className:"flex flex--row mt-20 full--width"},{children:e.jsx(c,{buttonText:s.buttonText||"Explore the feature",onClick:()=>(e=>{e.productVideo?(E(e.productVideo),V(!0)):e.redirectUrl&&window.open(e.redirectUrl,"_blank"),M&&M(e)})(s),matchParentWidth:!0,size:"medium"})}))]}),`whats-new-${n}`)))}))})]}),e.jsx(d,{isOpen:U,videoUrl:_,onClose:()=>{V(!1)}})]})):e.jsx(e.Fragment,{})};export{y as WhatsNewPanel};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.725-beta.9",
3
+ "version": "0.0.726-beta.0",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- import*as r from"react";var e;function t(){return t=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},t.apply(this,arguments)}var a=a=>r.createElement("svg",t({fill:"none",viewBox:"0 0 24 24"},a),e||(e=r.createElement("path",{stroke:"currentColor",d:"m21 21-6-6m2-5a7 7 0 1 1-14 0 7 7 0 0 1 14 0z"})));export{a as default};