@bikdotai/bik-component-library 0.0.703-beta.5 → 0.0.703-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/whats-new/WhatsNew.d.ts +5 -0
- package/dist/cjs/components/whats-new/WhatsNew.js +1 -1
- package/dist/cjs/components/whats-new/WhatsNew.types.d.ts +5 -0
- package/dist/cjs/components/whats-new/WhatsNewButton.js +1 -1
- package/dist/esm/components/whats-new/WhatsNew.d.ts +5 -0
- package/dist/esm/components/whats-new/WhatsNew.js +1 -1
- package/dist/esm/components/whats-new/WhatsNew.types.d.ts +5 -0
- package/dist/esm/components/whats-new/WhatsNewButton.js +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,11 @@ interface WhatsNewProps {
|
|
|
13
13
|
buttonTestId?: string;
|
|
14
14
|
iconWidth?: number;
|
|
15
15
|
iconHeight?: number;
|
|
16
|
+
customIcon?: React.ComponentType<{
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
}>;
|
|
16
21
|
}
|
|
17
22
|
export declare const WhatsNew: React.FC<WhatsNewProps>;
|
|
18
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),e=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:u="Search posts",emptyStateTitle:c="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:p,renderCustomContent:w,buttonTestId:x="whats-new-button",iconWidth:m=32,iconHeight:C=32,customIcon:j}=r;const[W,N]=e.useState(!1),{whatsNewContent:g,isLoading:S,newContentCount:y}=s.useWhatsNewContext();return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(n.WhatsNewButton,{onClick:()=>N(!0),newContentCount:y,isOpen:W,isLoading:S,tooltip:a,testId:x,iconWidth:m,iconHeight:C,customIcon:j}),t.jsxRuntimeExports.jsx(o.WhatsNewPanel,{isOpen:W,onClose:()=>N(!1),content:g,isLoading:S,title:i,searchPlaceholder:u,emptyStateTitle:c,emptyStateDescription:h,noResultsText:l,width:d,onContentClick:t=>{p&&p(t)},renderCustomContent:w})]})};
|
|
@@ -28,6 +28,11 @@ export interface WhatsNewButtonProps {
|
|
|
28
28
|
testId?: string;
|
|
29
29
|
iconWidth?: number;
|
|
30
30
|
iconHeight?: number;
|
|
31
|
+
customIcon?: React.ComponentType<{
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
color?: string;
|
|
35
|
+
}>;
|
|
31
36
|
}
|
|
32
37
|
export interface WhatsNewPanelProps {
|
|
33
38
|
isOpen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),s=require("../../constants/Theme.js"),e=require("../tooltips/Tooltip.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("../../node_modules/react/jsx-runtime.js"),s=require("../../constants/Theme.js"),e=require("../tooltips/Tooltip.js"),n=require("./WhatsNew.styles.js");const i=s=>{let{width:e=32,height:n=32}=s;return t.jsxRuntimeExports.jsxs("svg",Object.assign({width:e,height:n,viewBox:"0 0 32 32",fill:"none"},{children:[t.jsxRuntimeExports.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),t.jsxRuntimeExports.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))};exports.WhatsNewButton=o=>{let{onClick:r,newContentCount:c=0,isOpen:x=!1,isLoading:a=!1,tooltip:d="What's new",testId:l="whats-new-button",iconWidth:j=32,iconHeight:h=32,customIcon:u}=o;return a?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(n.WhatsNewIconContainer,Object.assign({count:c},{children:t.jsxRuntimeExports.jsxs("div",Object.assign({className:"main-icon-class "+(x?"icon-active":""),style:{color:x?s.COLORS.content.brand:s.COLORS.content.secondary},onClick:r,"data-testid":l},{children:[t.jsxRuntimeExports.jsx(e.Tooltip,Object.assign({body:d},{children:t.jsxRuntimeExports.jsx("div",{children:u?t.jsxRuntimeExports.jsx(u,{width:j,height:h,color:x?s.COLORS.content.brand:s.COLORS.content.secondary}):t.jsxRuntimeExports.jsx(i,{width:j,height:h})})})),c>0&&t.jsxRuntimeExports.jsx("div",Object.assign({className:"notification--count"},{children:t.jsxRuntimeExports.jsx("div",Object.assign({className:"count--text"},{children:c}))}))]}))}))};
|
|
@@ -13,6 +13,11 @@ interface WhatsNewProps {
|
|
|
13
13
|
buttonTestId?: string;
|
|
14
14
|
iconWidth?: number;
|
|
15
15
|
iconHeight?: number;
|
|
16
|
+
customIcon?: React.ComponentType<{
|
|
17
|
+
width?: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
}>;
|
|
16
21
|
}
|
|
17
22
|
export declare const WhatsNew: React.FC<WhatsNewProps>;
|
|
18
23
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"../../node_modules/react/jsx-runtime.js";import{useState as e}from"react";import{WhatsNewButton as o}from"./WhatsNewButton.js";import{WhatsNewPanel as n}from"./WhatsNewPanel.js";import{useWhatsNewContext as s}from"./WhatsNewProvider.js";const i=i=>{let{title:r="What's new",tooltip:a="What's new",searchPlaceholder:
|
|
1
|
+
import{j as t}from"../../node_modules/react/jsx-runtime.js";import{useState as e}from"react";import{WhatsNewButton as o}from"./WhatsNewButton.js";import{WhatsNewPanel as n}from"./WhatsNewPanel.js";import{useWhatsNewContext as s}from"./WhatsNewProvider.js";const i=i=>{let{title:r="What's new",tooltip:a="What's new",searchPlaceholder:c="Search posts",emptyStateTitle:h="Nothing new!",emptyStateDescription:m="There are no new updates or features at the moment. Check back soon!",noResultsText:l="Sorry, no results found.",width:d="480px",onContentClick:p,renderCustomContent:u,buttonTestId:C="whats-new-button",iconWidth:w=32,iconHeight:j=32,customIcon:x}=i;const[f,g]=e(!1),{whatsNewContent:W,isLoading:S,newContentCount:T}=s();return t.jsxs(t.Fragment,{children:[t.jsx(o,{onClick:()=>g(!0),newContentCount:T,isOpen:f,isLoading:S,tooltip:a,testId:C,iconWidth:w,iconHeight:j,customIcon:x}),t.jsx(n,{isOpen:f,onClose:()=>g(!1),content:W,isLoading:S,title:r,searchPlaceholder:c,emptyStateTitle:h,emptyStateDescription:m,noResultsText:l,width:d,onContentClick:t=>{p&&p(t)},renderCustomContent:u})]})};export{i as WhatsNew};
|
|
@@ -28,6 +28,11 @@ export interface WhatsNewButtonProps {
|
|
|
28
28
|
testId?: string;
|
|
29
29
|
iconWidth?: number;
|
|
30
30
|
iconHeight?: number;
|
|
31
|
+
customIcon?: React.ComponentType<{
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
color?: string;
|
|
35
|
+
}>;
|
|
31
36
|
}
|
|
32
37
|
export interface WhatsNewPanelProps {
|
|
33
38
|
isOpen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"../../node_modules/react/jsx-runtime.js";import{COLORS as s}from"../../constants/Theme.js";import{Tooltip as
|
|
1
|
+
import{j as t}from"../../node_modules/react/jsx-runtime.js";import{COLORS as s}from"../../constants/Theme.js";import{Tooltip as n}from"../tooltips/Tooltip.js";import{WhatsNewIconContainer as i}from"./WhatsNew.styles.js";const e=s=>{let{width:n=32,height:i=32}=s;return t.jsxs("svg",Object.assign({width:n,height:i,viewBox:"0 0 32 32",fill:"none"},{children:[t.jsx("path",{d:"M16 2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14S23.732 2 16 2zm0 25c-6.065 0-11-4.935-11-11S9.935 5 16 5s11 4.935 11 11-4.935 11-11 11z",fill:"currentColor"}),t.jsx("path",{d:"M16 10.5c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zM15 15h2v8h-2v-8z",fill:"currentColor"})]}))},o=o=>{let{onClick:r,newContentCount:c=0,isOpen:a=!1,isLoading:d=!1,tooltip:l="What's new",testId:h="whats-new-button",iconWidth:j=32,iconHeight:m=32,customIcon:x}=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(i,Object.assign({count:c},{children:t.jsxs("div",Object.assign({className:"main-icon-class "+(a?"icon-active":""),style:{color:a?s.content.brand:s.content.secondary},onClick:r,"data-testid":h},{children:[t.jsx(n,Object.assign({body:l},{children:t.jsx("div",{children:x?t.jsx(x,{width:j,height:m,color:a?s.content.brand:s.content.secondary}):t.jsx(e,{width:j,height:m})})})),c>0&&t.jsx("div",Object.assign({className:"notification--count"},{children:t.jsx("div",Object.assign({className:"count--text"},{children:c}))}))]}))}))};export{o as WhatsNewButton};
|