@bikdotai/bik-component-library 0.0.646-beta.zero.0 → 0.0.646-beta.zero.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),o=require("../../../../hooks/useOutside.js"),i=require("../../hooks/useDropdown.js"),r=require("./description/Description.js"),s=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),a=require("./multiSelect/MultiSelectDropdownBottomBar.js"),c=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=f=>{let{options:j,isSearchable:x,isMultiSelect:b,width:g,allowFreeForm:v,height:w,onClose:O,onSelect:m,onSearch:y,version:C,skipSorting:D,headerRef:M,hideSelectAll:q,primaryButtonText:L,onInfiniteScroll:F,onMultiSelectClear:k,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:I,disableSearchOptions:H,disableSearchedOptionExcept:R,useDefaultCursor:T,containerStyle:Z={},zeroState:W}=f;const{dropdownOptions:z,search:E,searchedString:P,searchedOptions:_,onApplyHandler:K,selectAllHandler:N,onMultiSelectClear:G,onFreeFormSelect:J,onMultiSelectApply:Q,latestDropdownOptionsRef:U,getSelectedOptions:V}=i.useDropdown(C,j,m,D,b,y,H,R),[X,Y]=t.useState(null!=g?g:S),[$,ee]=t.useState(null),te=t.useRef(null),ne=t.useRef([]);o.useOutside(te,(()=>{if(ee(null),b&&"2.0"===C){const e=V(U.current);null==O||O(e)}else null==O||O(z)}),[M,ne]);const oe=null!=w?w:h,ie="number"==typeof oe?x&&b?oe-96:x&&!b||!x&&b?oe-48:oe:oe;t.useEffect((()=>{const e=null!=g?g:S;if(null===$)Y(e);else if("number"==typeof e)Y(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));Y(t)}}),[$]);const re=[],se=(P&&y?_:z).map((e=>{var t,n;if(P&&!y){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()))&&(re.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===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(P.toLowerCase()))?(re.push(!P||e.label===P),e):null}return e})).filter((e=>null!==e)),le=!!x&&P&&0===se.length;return e.jsxs(c.OpennedDropdownContainer,Object.assign({version:C,ref:te,style:Object.assign({width:X},Z)},{children:[e.jsxs("div",Object.assign({style:{width:$?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(d.SearchBox,{onSearch:E,version:C}),se.length||P?e.jsxs(c.MenuListContainer,Object.assign({minHeight:oe,maxHeight:ie},{children:[!!b&&!le&&!q&&e.jsx(u.SelectAllMenu,{version:C,options:P&&y?_:z,onSelect:N}),!v&&le&&e.jsx(p.SearchZeroState,{isLoading:I,height:ie,searchedString:P}),v&&(le||!!re.length&&re.every((e=>!1===e)))&&e.jsx(s.FreeFormMenu,{version:C,isMultiSelect:b,onSelect:J,searchedString:P}),e.jsx(l.MenuList,{onInfiniteScroll:F,onDropdownItemClick:A,version:C,onSelect:K,showDescription:function(e,t){ee(e&&t?{title:e,description:t}:null)},isMultiSelect:b,options:se,useDefaultCursor:T,ref:ne})]})):e.jsx("div",Object.assign({style:{height:oe,display:"flex"}},{children:e.jsx(n.ZeroState,{buttonWidth:null==W?void 0:W.buttonWidth,title:(null==W?void 0:W.title)||"No results found",subTitle:(null==W?void 0:W.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance.",actionButton:null==W?void 0:W.actionButton})})),!!b&&!(!se.length&&!P)&&"2.0"!==C&&e.jsx(a.default,{onClear:()=>{G(),null==k||k()},onApply:Q,list:P&&y?_:z,buttonText:L,buttonOptions:B})]})),!!$&&e.jsx(r.Description,{title:$.title,description:$.description,version:C})]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),r=require("../../../../hooks/useOutside.js"),s=require("../../hooks/useDropdown.js"),o=require("./description/Description.js"),i=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),a=require("./multiSelect/MultiSelectDropdownBottomBar.js"),c=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=f=>{let{options:j,isSearchable:x,isMultiSelect:g,width:b,allowFreeForm:v,height:w,onClose:O,onSelect:m,onSearch:y,version:C,skipSorting:D,headerRef:M,hideSelectAll:q,primaryButtonText:L,onInfiniteScroll:F,onMultiSelectClear:k,onDropdownItemClick:A,buttonOptions:B,isSearchLoading:I,disableSearchOptions:H,disableSearchedOptionExcept:R,useDefaultCursor:T,containerStyle:Z={},zeroState:z}=f;const{dropdownOptions:E,search:P,searchedString:_,searchedOptions:K,onApplyHandler:N,selectAllHandler:W,onMultiSelectClear:G,onFreeFormSelect:J,onMultiSelectApply:Q,latestDropdownOptionsRef:U,getSelectedOptions:V}=s.useDropdown(C,j,m,D,g,y,H,R),[X,Y]=t.useState(null!=b?b:S),[$,ee]=t.useState(null),te=t.useRef(null),ne=t.useRef([]);r.useOutside(te,(()=>{if(ee(null),g&&"2.0"===C){const e=V(U.current);null==O||O(e)}else null==O||O(E)}),[M,ne]);const re=null!=w?w:h,se="number"==typeof re?x&&g?re-96:x&&!g||!x&&g?re-48:re:re;t.useEffect((()=>{const e=null!=b?b:S;if(null===$)Y(e);else if("number"==typeof e)Y(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));Y(t)}}),[$]);const oe=[],ie=(_&&y?K:E).map((e=>{var t,n;if(_&&!y){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(_.toLowerCase()))&&(oe.push(!_||e.label===_),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(_.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(_.toLowerCase()))?(oe.push(!_||e.label===_),e):null}return e})).filter((e=>null!==e)),le=!!x&&_&&0===ie.length;return e.jsxs(c.OpennedDropdownContainer,Object.assign({version:C,ref:te,style:Object.assign({width:X},Z)},{children:[e.jsxs("div",Object.assign({style:{width:$?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!x&&e.jsx(d.SearchBox,{onSearch:P,version:C}),ie.length||_?e.jsxs(c.MenuListContainer,Object.assign({minHeight:re,maxHeight:se},{children:[!!g&&!le&&!q&&e.jsx(u.SelectAllMenu,{version:C,options:_&&y?K:E,onSelect:W}),!v&&le&&e.jsx(p.SearchZeroState,{isLoading:I,height:se,searchedString:_}),v&&(le||!!oe.length&&oe.every((e=>!1===e)))&&e.jsx(i.FreeFormMenu,{version:C,isMultiSelect:g,onSelect:J,searchedString:_}),e.jsx(l.MenuList,{onInfiniteScroll:F,onDropdownItemClick:A,version:C,onSelect:N,showDescription:function(e,t){ee(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:ie,useDefaultCursor:T,ref:ne})]})):e.jsx("div",Object.assign({style:{height:re,display:"flex"}},{children:e.jsx(n.ZeroState,Object.assign({},z,{title:(null==z?void 0:z.title)||"No results found",subTitle:(null==z?void 0:z.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!g&&!(!ie.length&&!_)&&"2.0"!==C&&e.jsx(a.default,{onClear:()=>{G(),null==k||k()},onApply:Q,list:_&&y?K:E,buttonText:L,buttonOptions:B})]})),!!$&&e.jsx(o.Description,{title:$.title,description:$.description,version:C})]}))};
@@ -31,6 +31,8 @@ export interface OpenDropdownProps {
31
31
  'data-test'?: string;
32
32
  containerStyle?: React.CSSProperties;
33
33
  zeroState?: {
34
+ Icon?: React.ReactNode;
35
+ IconHolderStyle?: React.CSSProperties;
34
36
  actionButton?: ButtonProps;
35
37
  buttonWidth?: number;
36
38
  title: string;
@@ -8,4 +8,5 @@ export declare const ZeroState: React.FC<{
8
8
  style?: React.CSSProperties /** now this component is extendable through styled-component */;
9
9
  actionButton?: ButtonProps;
10
10
  buttonWidth?: number;
11
+ Icon?: React.ReactNode;
11
12
  }>;
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("styled-components"),i=require("../spinner/Spinner.js"),r=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),l=require("../../assets/icons/alert.svg.js"),o=require("../button/Button.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(n);const u=c.default.div`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("styled-components"),i=require("../spinner/Spinner.js"),r=require("../TypographyStyle.js"),s=require("../../constants/Theme.js"),l=require("../../assets/icons/alert.svg.js"),o=require("../button/Button.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(n);const d=c.default.div`
2
2
  background: ${s.COLORS.surface.standard};
3
3
  display: flex;
4
4
  flex-direction: column;
5
5
  align-items: center;
6
6
  justify-content: center;
7
7
  flex: 1;
8
- `,d=c.default.div`
8
+ `,u=c.default.div`
9
9
  background: ${s.COLORS.background.base};
10
10
  width: 48px;
11
11
  height: 48px;
@@ -14,4 +14,4 @@
14
14
  align-items: center;
15
15
  justify-content: center;
16
16
  border-radius: 24px;
17
- `;exports.ZeroState=n=>{var{subTitle:a,title:c,IconHolderStyle:j,style:g,isLoading:y}=n,x=e.__rest(n,["subTitle","title","IconHolderStyle","style","isLoading"]);return t.jsxs(u,Object.assign({style:null!=g?g:{}},{children:[y?t.jsx(i.Spinner,{size:"large",color:s.COLORS.stroke.brand}):t.jsx(d,Object.assign({style:null!=j?j:{}},{children:t.jsx(l.default,{color:s.COLORS.content.placeholder,height:24,width:24})})),t.jsx(r.TitleRegular,Object.assign({style:{marginTop:8,color:s.COLORS.content.primary}},{children:y?"Loading...":c||"No results found"})),!!a&&!y&&t.jsx(r.BodyCaption,Object.assign({style:{marginTop:4,color:s.COLORS.content.secondary,textAlign:"center",maxWidth:184}},{children:a})),!!(null==x?void 0:x.actionButton)&&t.jsx("div",Object.assign({style:(null==x?void 0:x.buttonWidth)?{width:null==x?void 0:x.buttonWidth}:{}},{children:t.jsx(o.Button,Object.assign({},null==x?void 0:x.actionButton))}))]}))};
17
+ `;exports.ZeroState=n=>{var{subTitle:a,title:c,IconHolderStyle:j,style:g,isLoading:y}=n,x=e.__rest(n,["subTitle","title","IconHolderStyle","style","isLoading"]);return t.jsxs(d,Object.assign({style:null!=g?g:{}},{children:[y?t.jsx(i.Spinner,{size:"large",color:s.COLORS.stroke.brand}):t.jsx(u,Object.assign({style:null!=j?j:{}},{children:(null==x?void 0:x.Icon)||t.jsx(l.default,{color:s.COLORS.content.placeholder,height:24,width:24})})),t.jsx(r.TitleRegular,Object.assign({style:{marginTop:8,color:s.COLORS.content.primary}},{children:y?"Loading...":c||"No results found"})),!!a&&!y&&t.jsx(r.BodyCaption,Object.assign({style:{marginTop:4,color:s.COLORS.content.secondary,textAlign:"center",maxWidth:184}},{children:a})),!!(null==x?void 0:x.actionButton)&&t.jsx("div",Object.assign({style:(null==x?void 0:x.buttonWidth)?{width:null==x?void 0:x.buttonWidth,display:"flex"}:{}},{children:t.jsx(o.Button,Object.assign({},null==x?void 0:x.actionButton))}))]}))};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as i}from"react";import{ZeroState as l}from"../../../zeroState/ZeroState.js";import{useOutside as r}from"../../../../hooks/useOutside.js";import{useDropdown as s}from"../../hooks/useDropdown.js";import{Description as c}from"./description/Description.js";import{FreeFormMenu as u}from"./menu/FreeFormMenu.js";import{MenuList as a}from"./menu/MenuList.js";import{SelectAllMenu as p}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as h,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as S}from"./searchbox/SearchZeroState.js";const b=304,g=290,v=v=>{let{options:w,isSearchable:j,isMultiSelect:y,width:O,allowFreeForm:x,height:C,onClose:D,onSelect:M,onSearch:L,version:k,skipSorting:A,headerRef:B,hideSelectAll:F,primaryButtonText:I,onInfiniteScroll:H,onMultiSelectClear:T,onDropdownItemClick:W,buttonOptions:z,isSearchLoading:R,disableSearchOptions:Z,disableSearchedOptionExcept:q,useDefaultCursor:E,containerStyle:K={},zeroState:N}=v;const{dropdownOptions:P,search:G,searchedString:J,searchedOptions:Q,onApplyHandler:U,selectAllHandler:V,onMultiSelectClear:X,onFreeFormSelect:Y,onMultiSelectApply:$,latestDropdownOptionsRef:_,getSelectedOptions:ee}=s(k,w,M,A,y,L,Z,q),[te,oe]=o(null!=O?O:g),[ne,ie]=o(null),le=n(null),re=n([]);r(le,(()=>{if(ie(null),y&&"2.0"===k){const e=ee(_.current);null==D||D(e)}else null==D||D(P)}),[B,re]);const se=null!=C?C:b,ce="number"==typeof se?j&&y?se-96:j&&!y||!j&&y?se-48:se:se;i((()=>{const e=null!=O?O:g;if(null===ne)oe(e);else if("number"==typeof e)oe(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));oe(t)}}),[ne]);const ue=[],ae=(J&&L?Q:P).map((e=>{var t,o;if(J&&!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(J.toLowerCase()))&&(ue.push(!J||e.label===J),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(J.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(J.toLowerCase()))?(ue.push(!J||e.label===J),e):null}return e})).filter((e=>null!==e)),pe=!!j&&J&&0===ae.length;return e(h,Object.assign({version:k,ref:le,style:Object.assign({width:te},K)},{children:[e("div",Object.assign({style:{width:ne?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!j&&t(f,{onSearch:G,version:k}),ae.length||J?e(m,Object.assign({minHeight:se,maxHeight:ce},{children:[!!y&&!pe&&!F&&t(p,{version:k,options:J&&L?Q:P,onSelect:V}),!x&&pe&&t(S,{isLoading:R,height:ce,searchedString:J}),x&&(pe||!!ue.length&&ue.every((e=>!1===e)))&&t(u,{version:k,isMultiSelect:y,onSelect:Y,searchedString:J}),t(a,{onInfiniteScroll:H,onDropdownItemClick:W,version:k,onSelect:U,showDescription:function(e,t){ie(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:ae,useDefaultCursor:E,ref:re})]})):t("div",Object.assign({style:{height:se,display:"flex"}},{children:t(l,{buttonWidth:null==N?void 0:N.buttonWidth,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.",actionButton:null==N?void 0:N.actionButton})})),!!y&&!(!ae.length&&!J)&&"2.0"!==k&&t(d,{onClear:()=>{X(),null==T||T()},onApply:$,list:J&&L?Q:P,buttonText:I,buttonOptions:z})]})),!!ne&&t(c,{title:ne.title,description:ne.description,version:k})]}))};export{v as OpenedDropdown};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as o,useRef as n,useEffect as i}from"react";import{ZeroState as l}from"../../../zeroState/ZeroState.js";import{useOutside as r}from"../../../../hooks/useOutside.js";import{useDropdown as s}from"../../hooks/useDropdown.js";import{Description as c}from"./description/Description.js";import{FreeFormMenu as a}from"./menu/FreeFormMenu.js";import{MenuList as u}from"./menu/MenuList.js";import{SelectAllMenu as p}from"./menu/SelectAllMenu.js";import d from"./multiSelect/MultiSelectDropdownBottomBar.js";import{OpennedDropdownContainer as h,MenuListContainer as m}from"./OpennedDropdown.styled.js";import{SearchBox as f}from"./searchbox/SearchBox.js";import{SearchZeroState as S}from"./searchbox/SearchZeroState.js";const g=304,b=290,v=v=>{let{options:j,isSearchable:w,isMultiSelect:y,width:O,allowFreeForm:x,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:Z,disableSearchOptions:q,disableSearchedOptionExcept:E,useDefaultCursor:K,containerStyle:N={},zeroState:P}=v;const{dropdownOptions:W,search:G,searchedString:J,searchedOptions:Q,onApplyHandler:U,selectAllHandler:V,onMultiSelectClear:X,onFreeFormSelect:Y,onMultiSelectApply:$,latestDropdownOptionsRef:_,getSelectedOptions:ee}=s(k,j,M,A,y,L,q,E),[te,oe]=o(null!=O?O:b),[ne,ie]=o(null),le=n(null),re=n([]);r(le,(()=>{if(ie(null),y&&"2.0"===k){const e=ee(_.current);null==D||D(e)}else null==D||D(W)}),[F,re]);const se=null!=C?C:g,ce="number"==typeof se?w&&y?se-96:w&&!y||!w&&y?se-48:se:se;i((()=>{const e=null!=O?O:b;if(null===ne)oe(e);else if("number"==typeof e)oe(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));oe(t)}}),[ne]);const ae=[],ue=(J&&L?Q:W).map((e=>{var t,o;if(J&&!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(J.toLowerCase()))&&(ae.push(!J||e.label===J),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(J.toLowerCase()))||(null===(o=e.searchKey)||void 0===o?void 0:o.toLowerCase().includes(J.toLowerCase()))?(ae.push(!J||e.label===J),e):null}return e})).filter((e=>null!==e)),pe=!!w&&J&&0===ue.length;return e(h,Object.assign({version:k,ref:le,style:Object.assign({width:te},N)},{children:[e("div",Object.assign({style:{width:ne?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!w&&t(f,{onSearch:G,version:k}),ue.length||J?e(m,Object.assign({minHeight:se,maxHeight:ce},{children:[!!y&&!pe&&!I&&t(p,{version:k,options:J&&L?Q:W,onSelect:V}),!x&&pe&&t(S,{isLoading:Z,height:ce,searchedString:J}),x&&(pe||!!ae.length&&ae.every((e=>!1===e)))&&t(a,{version:k,isMultiSelect:y,onSelect:Y,searchedString:J}),t(u,{onInfiniteScroll:H,onDropdownItemClick:z,version:k,onSelect:U,showDescription:function(e,t){ie(e&&t?{title:e,description:t}:null)},isMultiSelect:y,options:ue,useDefaultCursor:K,ref:re})]})):t("div",Object.assign({style:{height:se,display:"flex"}},{children:t(l,Object.assign({},P,{title:(null==P?void 0:P.title)||"No results found",subTitle:(null==P?void 0:P.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!y&&!(!ue.length&&!J)&&"2.0"!==k&&t(d,{onClear:()=>{X(),null==T||T()},onApply:$,list:J&&L?Q:W,buttonText:B,buttonOptions:R})]})),!!ne&&t(c,{title:ne.title,description:ne.description,version:k})]}))};export{v as OpenedDropdown};
@@ -31,6 +31,8 @@ export interface OpenDropdownProps {
31
31
  'data-test'?: string;
32
32
  containerStyle?: React.CSSProperties;
33
33
  zeroState?: {
34
+ Icon?: React.ReactNode;
35
+ IconHolderStyle?: React.CSSProperties;
34
36
  actionButton?: ButtonProps;
35
37
  buttonWidth?: number;
36
38
  title: string;
@@ -8,4 +8,5 @@ export declare const ZeroState: React.FC<{
8
8
  style?: React.CSSProperties /** now this component is extendable through styled-component */;
9
9
  actionButton?: ButtonProps;
10
10
  buttonWidth?: number;
11
+ Icon?: React.ReactNode;
11
12
  }>;
@@ -14,4 +14,4 @@ import{__rest as t}from"../../_virtual/_tslib.js";import{jsxs as e,jsx as n}from
14
14
  align-items: center;
15
15
  justify-content: center;
16
16
  border-radius: 24px;
17
- `,m=o=>{var{subTitle:m,title:p,IconHolderStyle:g,style:y,isLoading:b}=o,h=t(o,["subTitle","title","IconHolderStyle","style","isLoading"]);return e(a,Object.assign({style:null!=y?y:{}},{children:[b?n(i,{size:"large",color:s.stroke.brand}):n(u,Object.assign({style:null!=g?g:{}},{children:n(c,{color:s.content.placeholder,height:24,width:24})})),n(r,Object.assign({style:{marginTop:8,color:s.content.primary}},{children:b?"Loading...":p||"No results found"})),!!m&&!b&&n(l,Object.assign({style:{marginTop:4,color:s.content.secondary,textAlign:"center",maxWidth:184}},{children:m})),!!(null==h?void 0:h.actionButton)&&n("div",Object.assign({style:(null==h?void 0:h.buttonWidth)?{width:null==h?void 0:h.buttonWidth}:{}},{children:n(d,Object.assign({},null==h?void 0:h.actionButton))}))]}))};export{m as ZeroState};
17
+ `,m=o=>{var{subTitle:m,title:p,IconHolderStyle:g,style:y,isLoading:b}=o,f=t(o,["subTitle","title","IconHolderStyle","style","isLoading"]);return e(a,Object.assign({style:null!=y?y:{}},{children:[b?n(i,{size:"large",color:s.stroke.brand}):n(u,Object.assign({style:null!=g?g:{}},{children:(null==f?void 0:f.Icon)||n(c,{color:s.content.placeholder,height:24,width:24})})),n(r,Object.assign({style:{marginTop:8,color:s.content.primary}},{children:b?"Loading...":p||"No results found"})),!!m&&!b&&n(l,Object.assign({style:{marginTop:4,color:s.content.secondary,textAlign:"center",maxWidth:184}},{children:m})),!!(null==f?void 0:f.actionButton)&&n("div",Object.assign({style:(null==f?void 0:f.buttonWidth)?{width:null==f?void 0:f.buttonWidth,display:"flex"}:{}},{children:n(d,Object.assign({},null==f?void 0:f.actionButton))}))]}))};export{m as ZeroState};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.646-beta.zero.0",
3
+ "version": "0.0.646-beta.zero.2",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",