@bikdotai/bik-component-library 0.0.786-beta.7 → 0.0.786-beta.9

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.
@@ -6,7 +6,7 @@
6
6
  top: 0;
7
7
  left: 0;
8
8
  z-index: 10;
9
- overflow-y: auto;
9
+ overflow-y: hidden;
10
10
  height: 100vh;
11
11
 
12
12
  .bik-header-logo {
@@ -26,8 +26,8 @@
26
26
  `,a=o.default.div`
27
27
  margin: 0px 0px 16px;
28
28
  `,d=o.default.div``,s=o.default.div`
29
- overflow-y: auto;
30
- padding: 0px 8px;
29
+ position: relative;
30
+ padding: 0px 6px;
31
31
  margin-bottom: 6px;
32
32
  > * {
33
33
  gap: 4px;
@@ -161,7 +161,7 @@
161
161
  position: absolute;
162
162
  right: 100%;
163
163
  top: 0;
164
- width: 24px;
164
+ width: 6px;
165
165
  height: 100%;
166
166
  }
167
167
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),i=require("../tooltips/Tooltip.js"),r=require("./IconButton.styled.js"),l=require("./theme.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(o);const n=o.forwardRef(((o,s)=>{var{id:n,iconButtonType:c="default",Icon:a,height:u=20,width:b=20,bordered:y,disabled:p,isSelected:j,style:h,svgStyle:f,iconColor:g,disabledTooltip:v}=o,B=e.__rest(o,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor","disabledTooltip"]);const I=l.getIconColor(c,p,j),T=t.jsx(r.IconButton,Object.assign({id:n,ref:s,style:h,iconButtonType:c,bordered:y,disabled:p,isSelected:j},B,{children:d.default.createElement(a,{height:u,width:b,color:g||I,style:Object.assign({display:"block"},null!=f?f:{})})}));return p&&v?t.jsx(i.Tooltip,Object.assign({body:v},{children:t.jsx("span",Object.assign({style:{display:"inline-block",cursor:"not-allowed"}},{children:T}))})):T}));n.displayName="IconButton",exports.IconButton=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),o=require("react"),i=require("../tooltips/Tooltip.js"),r=require("./IconButton.styled.js"),d=require("./theme.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=l(o);const s=o.forwardRef(((o,l)=>{var{id:s,iconButtonType:c="default",Icon:a,height:u=20,width:b=20,bordered:y,disabled:p,isSelected:j,style:g,svgStyle:h,iconColor:f,iconPadding:v,disabledTooltip:B}=o,I=e.__rest(o,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor","iconPadding","disabledTooltip"]);const T=d.getIconColor(c,p,j),q=t.jsx(r.IconButton,Object.assign({id:s,ref:l,style:g,iconButtonType:c,bordered:y,disabled:p,isSelected:j,iconPadding:v},I,{children:n.default.createElement(a,{height:u,width:b,color:f||T,style:Object.assign({display:"block"},null!=h?h:{})})}));return p&&B?t.jsx(i.Tooltip,Object.assign({body:B},{children:t.jsx("span",Object.assign({style:{display:"inline-block",cursor:"not-allowed"}},{children:q}))})):q}));s.displayName="IconButton",exports.IconButton=s;
@@ -3,4 +3,5 @@ export declare const IconButton: import("styled-components").StyledComponent<"bu
3
3
  bordered?: boolean | undefined;
4
4
  iconButtonType: IconButtonType;
5
5
  isSelected?: boolean | undefined;
6
+ iconPadding?: number | undefined;
6
7
  }, never>;
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),e=require("../../constants/Theme.js"),n=require("./theme.js");function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}const o=r(t).default.button`
2
- ${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${e.COLORS.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${n.generateBackgroundColor(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
3
- `;exports.IconButton=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("styled-components"),n=require("../../constants/Theme.js"),e=require("./theme.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}const r=o(t).default.button`
2
+ ${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: ${void 0!==t.iconPadding?t.iconPadding:6}px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${n.COLORS.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${e.generateBackgroundColor(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
3
+ `;exports.IconButton=r;
@@ -40,5 +40,10 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
40
40
  */
41
41
  isSelected?: boolean;
42
42
  iconColor?: string;
43
+ /**
44
+ * Custom padding for the icon button container
45
+ * @default 6
46
+ */
47
+ iconPadding?: number;
43
48
  disabledTooltip?: string;
44
49
  }
@@ -14,6 +14,7 @@ interface WhatsNewProps {
14
14
  iconWidth?: number;
15
15
  iconHeight?: number;
16
16
  iconColor?: string;
17
+ iconPadding?: number;
17
18
  customIcon?: React.ComponentType<{
18
19
  width?: number;
19
20
  height?: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("./WhatsNewButton.js"),o=require("./WhatsNewPanel.js"),s=require("./WhatsNewProvider.js");exports.WhatsNew=r=>{let{title:i="What's new",tooltip:a="What's new",searchPlaceholder:c="Search posts",emptyStateTitle:u="Nothing new!",emptyStateDescription:h="There are no new updates or features at the moment. Check back soon!",noResultsText:l="Sorry, no results found.",width:d="480px",onContentClick:w,renderCustomContent:C,buttonTestId:p="whats-new-button",iconWidth:m=24,iconHeight:W=24,iconColor:x,customIcon:N}=r;const[j,g]=t.useState(!1),{whatsNewContent:S,isLoading:y,newContentCount:P}=s.useWhatsNewContext();return e.jsxs(e.Fragment,{children:[e.jsx(n.WhatsNewButton,{onClick:()=>g(!0),newContentCount:P,isOpen:j,isLoading:y,tooltip:a,testId:p,iconWidth:m,iconHeight:W,iconColor:x,customIcon:N}),e.jsx(o.WhatsNewPanel,{isOpen:j,onClose:()=>g(!1),content:S,isLoading:y,title:i,searchPlaceholder:c,emptyStateTitle:u,emptyStateDescription:h,noResultsText:l,width:d,onContentClick:e=>{w&&w(e)},renderCustomContent:C})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("./WhatsNewButton.js"),o=require("./WhatsNewPanel.js"),s=require("./WhatsNewProvider.js");exports.WhatsNew=i=>{let{title:r="What's new",tooltip:a="What's new",searchPlaceholder:c="Search posts",emptyStateTitle:u="Nothing new!",emptyStateDescription:h="There are no new updates or features at the moment. Check back soon!",noResultsText:l="Sorry, no results found.",width:d="480px",onContentClick:w,renderCustomContent:C,buttonTestId:p="whats-new-button",iconWidth:m=24,iconHeight:W=24,iconColor:x,iconPadding:g,customIcon:N}=i;const[j,P]=t.useState(!1),{whatsNewContent:S,isLoading:y,newContentCount:T}=s.useWhatsNewContext();return e.jsxs(e.Fragment,{children:[e.jsx(n.WhatsNewButton,{onClick:()=>P(!0),newContentCount:T,isOpen:j,isLoading:y,tooltip:a,testId:p,iconWidth:m,iconHeight:W,iconColor:x,iconPadding:g,customIcon:N}),e.jsx(o.WhatsNewPanel,{isOpen:j,onClose:()=>P(!1),content:S,isLoading:y,title:r,searchPlaceholder:c,emptyStateTitle:u,emptyStateDescription:h,noResultsText:l,width:d,onContentClick:e=>{w&&w(e)},renderCustomContent:C})]})};
@@ -36,6 +36,7 @@ export interface WhatsNewButtonProps {
36
36
  iconWidth?: number;
37
37
  iconHeight?: number;
38
38
  iconColor?: string;
39
+ iconPadding?: number;
39
40
  customIcon?: React.ComponentType<{
40
41
  width?: number;
41
42
  height?: number;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../assets/icons/whatsNew.svg.js"),n=require("../../constants/Theme.js"),s=require("../icon-button/IconButton.js"),i=require("../tooltips/Tooltip.js"),o=require("./WhatsNew.styles.js");exports.WhatsNewButton=r=>{let{onClick:a,newContentCount:c=0,isOpen:l=!1,isLoading:d=!1,tooltip:u="What's new",testId:h="whats-new-button",iconWidth:j=24,iconHeight:p=24,iconColor:x,customIcon:b}=r;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.jsxs(o.WhatsNewIconContainer,Object.assign({count:c},{children:[t.jsx(i.Tooltip,Object.assign({body:u,placement:"bottom"},{children:t.jsx(s.IconButton,{Icon:null!=b?b:e.default,width:j,height:p,isSelected:l,iconColor:null!=x?x:l?n.COLORS.content.brand:n.COLORS.content.primary,onClick:a,"data-testid":h})})),c>0&&t.jsx("div",Object.assign({className:"notification--count"},{children:t.jsx("div",Object.assign({className:"count--text"},{children:c}))}))]}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react/jsx-runtime"),e=require("../../assets/icons/whatsNew.svg.js"),n=require("../../constants/Theme.js"),s=require("../icon-button/IconButton.js"),i=require("../tooltips/Tooltip.js"),o=require("./WhatsNew.styles.js");exports.WhatsNewButton=r=>{let{onClick:a,newContentCount:c=0,isOpen:d=!1,isLoading:l=!1,tooltip:u="What's new",testId:h="whats-new-button",iconWidth:j=24,iconHeight:p=24,iconColor:x,iconPadding:b,customIcon:g}=r;return l?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.jsxs(o.WhatsNewIconContainer,Object.assign({count:c},{children:[t.jsx(i.Tooltip,Object.assign({body:u,placement:"bottom"},{children:t.jsx(s.IconButton,{Icon:null!=g?g:e.default,width:j,height:p,isSelected:d,iconColor:null!=x?x:d?n.COLORS.content.brand:n.COLORS.content.primary,onClick:a,"data-testid":h})})),c>0&&t.jsx("div",Object.assign({className:"notification--count"},{children:t.jsx("div",Object.assign({className:"count--text"},{children:c}))}))]}))};
@@ -1,4 +1,4 @@
1
- import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../TypographyStyle.js";import{COLORS as o,BASE_COLORS as r,FONTS as n}from"../../../constants/Theme.js";const a=e.div`
1
+ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../TypographyStyle.js";import{COLORS as o,BASE_COLORS as r,FONTS as n}from"../../../constants/Theme.js";const d=e.div`
2
2
  background-color: #28034e;
3
3
  width: 72px;
4
4
  justify-content: space-between;
@@ -6,7 +6,7 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
6
6
  top: 0;
7
7
  left: 0;
8
8
  z-index: 10;
9
- overflow-y: auto;
9
+ overflow-y: hidden;
10
10
  height: 100vh;
11
11
 
12
12
  .bik-header-logo {
@@ -23,11 +23,11 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
23
23
  object-fit: container;
24
24
  }
25
25
  }
26
- `,d=e.div`
26
+ `,a=e.div`
27
27
  margin: 0px 0px 16px;
28
28
  `,p=e.div``,s=e.div`
29
- overflow-y: auto;
30
- padding: 0px 8px;
29
+ position: relative;
30
+ padding: 0px 6px;
31
31
  margin-bottom: 6px;
32
32
  > * {
33
33
  gap: 4px;
@@ -120,11 +120,11 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
120
120
  width: 85%;
121
121
  }
122
122
  `}}
123
- `,u=e.div`
123
+ `,l=e.div`
124
124
  display: flex;
125
125
  flex-direction: row;
126
126
  cursor: pointer;
127
- `,l=e(i)`
127
+ `,u=e(i)`
128
128
  user-select: none;
129
129
  color: ${e=>{let{isActive:t}=e;return t?o.content.primaryInverse:o.content.secondaryInverse}};
130
130
  margin-bottom: 0px;
@@ -161,7 +161,7 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
161
161
  position: absolute;
162
162
  right: 100%;
163
163
  top: 0;
164
- width: 24px;
164
+ width: 6px;
165
165
  height: 100%;
166
166
  }
167
167
  }
@@ -279,4 +279,4 @@ import e,{css as t}from"styled-components";import{BodyTiny as i}from"../../Typog
279
279
  border-radius: 8px;
280
280
  }
281
281
  }
282
- `;export{d as MainSideBarV2MenuWrapper,p as SibeBarV2MenuItem,a as SideBarV2Container,c as SidebarLockedChannel,s as SidebarMainMenu,u as SidebarMenuItemContainer,x as SidebarMenuItemInner,l as SidebarMenuItemText,b as SidebarNewTag,m as SidebarV2PopupContainer,g as SimpleSidebarV2Container};
282
+ `;export{a as MainSideBarV2MenuWrapper,p as SibeBarV2MenuItem,d as SideBarV2Container,c as SidebarLockedChannel,s as SidebarMainMenu,l as SidebarMenuItemContainer,x as SidebarMenuItemInner,u as SidebarMenuItemText,b as SidebarNewTag,m as SidebarV2PopupContainer,g as SimpleSidebarV2Container};
@@ -1 +1 @@
1
- import{__rest as t}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as i}from"react";import{Tooltip as l}from"../tooltips/Tooltip.js";import{IconButton as s}from"./IconButton.styled.js";import{getIconColor as r}from"./theme.js";const d=i(((i,d)=>{var{id:n,iconButtonType:c="default",Icon:a,height:p=20,width:b=20,bordered:m,disabled:y,isSelected:h,style:u,svgStyle:g,iconColor:j,disabledTooltip:f}=i,B=t(i,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor","disabledTooltip"]);const T=r(c,y,h),I=e(s,Object.assign({id:n,ref:d,style:u,iconButtonType:c,bordered:m,disabled:y,isSelected:h},B,{children:o.createElement(a,{height:p,width:b,color:j||T,style:Object.assign({display:"block"},null!=g?g:{})})}));return y&&f?e(l,Object.assign({body:f},{children:e("span",Object.assign({style:{display:"inline-block",cursor:"not-allowed"}},{children:I}))})):I}));d.displayName="IconButton";export{d as IconButton};
1
+ import{__rest as t}from"../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import o,{forwardRef as i}from"react";import{Tooltip as d}from"../tooltips/Tooltip.js";import{IconButton as l}from"./IconButton.styled.js";import{getIconColor as n}from"./theme.js";const s=i(((i,s)=>{var{id:r,iconButtonType:c="default",Icon:a,height:p=20,width:b=20,bordered:m,disabled:y,isSelected:h,style:g,svgStyle:u,iconColor:j,iconPadding:f,disabledTooltip:B}=i,T=t(i,["id","iconButtonType","Icon","height","width","bordered","disabled","isSelected","style","svgStyle","iconColor","iconPadding","disabledTooltip"]);const I=n(c,y,h),S=e(l,Object.assign({id:r,ref:s,style:g,iconButtonType:c,bordered:m,disabled:y,isSelected:h,iconPadding:f},T,{children:o.createElement(a,{height:p,width:b,color:j||I,style:Object.assign({display:"block"},null!=u?u:{})})}));return y&&B?e(d,Object.assign({body:B},{children:e("span",Object.assign({style:{display:"inline-block",cursor:"not-allowed"}},{children:S}))})):S}));s.displayName="IconButton";export{s as IconButton};
@@ -3,4 +3,5 @@ export declare const IconButton: import("styled-components").StyledComponent<"bu
3
3
  bordered?: boolean | undefined;
4
4
  iconButtonType: IconButtonType;
5
5
  isSelected?: boolean | undefined;
6
+ iconPadding?: number | undefined;
6
7
  }, never>;
@@ -1,3 +1,3 @@
1
1
  import t from"styled-components";import{COLORS as n}from"../../constants/Theme.js";import{generateBackgroundColor as o}from"./theme.js";const r=t.button`
2
- ${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: 6px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${n.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${o(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
2
+ ${t=>`\n\tall: unset;\n\tcursor: pointer;\n\tpadding: ${void 0!==t.iconPadding?t.iconPadding:6}px;\n\tborder-radius: 4px;\n\tflex-wrap: wrap;\n\t${t.bordered&&"ai"!==t.iconButtonType?`border: 1px solid ${n.stroke.primary};`:""}\n\t${t.isSelected?`\n\t\t\tbackground: ${o(t.iconButtonType)};\n\t\t\t\t`:"\n\t\t\t\t:hover {\n\t\t\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t\t\t}\n\t\t\t"}\n\t${t.disabled&&"\n\t\t\tcursor: not-allowed !important;\n\t\t\tbackground-color: rgba(0, 0, 0, 0.03);\n\t\t"}\n\n\t`}
3
3
  `;export{r as IconButton};
@@ -40,5 +40,10 @@ export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
40
40
  */
41
41
  isSelected?: boolean;
42
42
  iconColor?: string;
43
+ /**
44
+ * Custom padding for the icon button container
45
+ * @default 6
46
+ */
47
+ iconPadding?: number;
43
48
  disabledTooltip?: string;
44
49
  }
@@ -14,6 +14,7 @@ interface WhatsNewProps {
14
14
  iconWidth?: number;
15
15
  iconHeight?: number;
16
16
  iconColor?: string;
17
+ iconPadding?: number;
17
18
  customIcon?: React.ComponentType<{
18
19
  width?: number;
19
20
  height?: number;
@@ -1 +1 @@
1
- import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as n}from"react";import{WhatsNewButton as i}from"./WhatsNewButton.js";import{WhatsNewPanel as s}from"./WhatsNewPanel.js";import{useWhatsNewContext as r}from"./WhatsNewProvider.js";const c=c=>{let{title:a="What's new",tooltip:h="What's new",searchPlaceholder:l="Search posts",emptyStateTitle:m="Nothing new!",emptyStateDescription:p="There are no new updates or features at the moment. Check back soon!",noResultsText:C="Sorry, no results found.",width:d="480px",onContentClick:u,renderCustomContent:w,buttonTestId:f="whats-new-button",iconWidth:W=24,iconHeight:g=24,iconColor:S,customIcon:T}=c;const[k,x]=n(!1),{whatsNewContent:y,isLoading:N,newContentCount:j}=r();return t(e,{children:[o(i,{onClick:()=>x(!0),newContentCount:j,isOpen:k,isLoading:N,tooltip:h,testId:f,iconWidth:W,iconHeight:g,iconColor:S,customIcon:T}),o(s,{isOpen:k,onClose:()=>x(!1),content:y,isLoading:N,title:a,searchPlaceholder:l,emptyStateTitle:m,emptyStateDescription:p,noResultsText:C,width:d,onContentClick:t=>{u&&u(t)},renderCustomContent:w})]})};export{c as WhatsNew};
1
+ import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useState as n}from"react";import{WhatsNewButton as i}from"./WhatsNewButton.js";import{WhatsNewPanel as s}from"./WhatsNewPanel.js";import{useWhatsNewContext as r}from"./WhatsNewProvider.js";const c=c=>{let{title:a="What's new",tooltip:h="What's new",searchPlaceholder:l="Search posts",emptyStateTitle:d="Nothing new!",emptyStateDescription:m="There are no new updates or features at the moment. Check back soon!",noResultsText:p="Sorry, no results found.",width:C="480px",onContentClick:u,renderCustomContent:w,buttonTestId:g="whats-new-button",iconWidth:f=24,iconHeight:W=24,iconColor:P,iconPadding:S,customIcon:T}=c;const[k,x]=n(!1),{whatsNewContent:y,isLoading:N,newContentCount:j}=r();return t(e,{children:[o(i,{onClick:()=>x(!0),newContentCount:j,isOpen:k,isLoading:N,tooltip:h,testId:g,iconWidth:f,iconHeight:W,iconColor:P,iconPadding:S,customIcon:T}),o(s,{isOpen:k,onClose:()=>x(!1),content:y,isLoading:N,title:a,searchPlaceholder:l,emptyStateTitle:d,emptyStateDescription:m,noResultsText:p,width:C,onContentClick:t=>{u&&u(t)},renderCustomContent:w})]})};export{c as WhatsNew};
@@ -36,6 +36,7 @@ export interface WhatsNewButtonProps {
36
36
  iconWidth?: number;
37
37
  iconHeight?: number;
38
38
  iconColor?: string;
39
+ iconPadding?: number;
39
40
  customIcon?: React.ComponentType<{
40
41
  width?: number;
41
42
  height?: number;
@@ -1 +1 @@
1
- import{jsxs as t,jsx as n}from"react/jsx-runtime";import o from"../../assets/icons/whatsNew.svg.js";import{COLORS as i}from"../../constants/Theme.js";import{IconButton as e}from"../icon-button/IconButton.js";import{Tooltip as s}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as r}from"./WhatsNew.styles.js";const c=c=>{let{onClick:a,newContentCount:l=0,isOpen:d=!1,isLoading:m=!1,tooltip:p="What's new",testId:h="whats-new-button",iconWidth:f=24,iconHeight:b=24,iconColor:g,customIcon:u}=c;return m?t("div",Object.assign({style:{margin:"0px 8px"}},{children:[n("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),n("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(r,Object.assign({count:l},{children:[n(s,Object.assign({body:p,placement:"bottom"},{children:n(e,{Icon:null!=u?u:o,width:f,height:b,isSelected:d,iconColor:null!=g?g:d?i.content.brand:i.content.primary,onClick:a,"data-testid":h})})),l>0&&n("div",Object.assign({className:"notification--count"},{children:n("div",Object.assign({className:"count--text"},{children:l}))}))]}))};export{c as WhatsNewButton};
1
+ import{jsxs as t,jsx as n}from"react/jsx-runtime";import o from"../../assets/icons/whatsNew.svg.js";import{COLORS as i}from"../../constants/Theme.js";import{IconButton as e}from"../icon-button/IconButton.js";import{Tooltip as s}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as r}from"./WhatsNew.styles.js";const c=c=>{let{onClick:a,newContentCount:d=0,isOpen:l=!1,isLoading:m=!1,tooltip:p="What's new",testId:h="whats-new-button",iconWidth:f=24,iconHeight:g=24,iconColor:b,iconPadding:u,customIcon:j}=c;return m?t("div",Object.assign({style:{margin:"0px 8px"}},{children:[n("div",{style:{width:16,height:16,border:"2px solid #f3f3f3",borderTop:"2px solid #731DCF",borderRadius:"50%",animation:"spin 1s linear infinite"}}),n("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(r,Object.assign({count:d},{children:[n(s,Object.assign({body:p,placement:"bottom"},{children:n(e,{Icon:null!=j?j:o,width:f,height:g,isSelected:l,iconColor:null!=b?b:l?i.content.brand:i.content.primary,onClick:a,"data-testid":h})})),d>0&&n("div",Object.assign({className:"notification--count"},{children:n("div",Object.assign({className:"count--text"},{children:d}))}))]}))};export{c as WhatsNewButton};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.786-beta.7",
3
+ "version": "0.0.786-beta.9",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",