@livechat/design-system-react-components 2.2.3 → 2.3.1

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,6 +1,6 @@
1
1
  import { ComponentCoreProps } from '../../../../utils/types';
2
2
  import * as React from 'react';
3
- export interface INavigationItemProps extends ComponentCoreProps {
3
+ export interface INavigationItemProps extends ComponentCoreProps, Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick'> {
4
4
  /**
5
5
  * The ID of the item
6
6
  */
@@ -13,3 +13,7 @@ export declare const CustomBackgroundAlert: React.FC<{
13
13
  show: boolean;
14
14
  onClose: () => void;
15
15
  }>;
16
+ export declare const InfoAlert: React.FC<{
17
+ show: boolean;
18
+ onClose: () => void;
19
+ }>;
@@ -0,0 +1,2 @@
1
+ export declare const MOBILE_BREAKPOINT = 705;
2
+ export declare const ALERTS_MOBILE_BREAKPOINT = 751;
@@ -2,15 +2,16 @@ import * as React from 'react';
2
2
  interface ExampleAppContentProps {
3
3
  showToggle: boolean;
4
4
  alerts?: boolean[];
5
- setAlerts?: (alerts: boolean[]) => void;
6
5
  topBarVisible: boolean;
7
6
  setTopBarVisible: (visible: boolean) => void;
7
+ visibleAlert: number | null;
8
+ setVisibleAlert: (index: number | null) => void;
8
9
  }
9
10
  export declare const ExampleAppContent: React.FC<ExampleAppContentProps>;
10
11
  export declare const ExampleTopBar: React.FC<{
11
- visibleAlerts: boolean[];
12
12
  topBarVisible: boolean;
13
- setAlerts: (alerts: boolean[]) => void;
13
+ visibleAlert: number | null;
14
+ setVisibleAlert: (index: number | null) => void;
14
15
  }>;
15
16
  export declare const getBadgeContent: (item: string) => "dot" | "alert" | 5 | undefined;
16
17
  export declare const getChatsMenu: (activeSubItem: number, handler: (o: number) => void) => import("react/jsx-runtime").JSX.Element;
@@ -34,10 +34,9 @@ export interface IAppFrameProps extends ComponentCoreProps {
34
34
  */
35
35
  contentClassName?: string;
36
36
  /**
37
- * The value that will determine on which resolution mobile view will be displayed
38
- * @default 705
37
+ * Set the initial visibility of the side navigation bar
39
38
  */
40
- mobileViewBreakpoint?: number;
39
+ isSideNavigationVisible?: boolean;
41
40
  }
42
41
  export type { INavigationProps } from './components/Navigation/types';
43
42
  export type { INavigationGroupProps } from './components/NavigationGroup/types';
@@ -1,8 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { IconSource } from '../Icon';
3
3
 
4
- export type ProductId = 'livechat' | 'helpdesk' | 'chatbot' | 'openwidget' | 'knowledgebase' | 'hello' | 'accounts';
5
- export type ProductName = 'LiveChat' | 'HelpDesk' | 'ChatBot' | 'OpenWidget' | 'KnowledgeBase' | 'Hello' | 'Accounts';
4
+ export type ProductId = 'livechat' | 'helpdesk' | 'chatbot' | 'openwidget' | 'knowledgebase' | 'teamchat' | 'accounts';
5
+ export type ProductName = 'LiveChat' | 'HelpDesk' | 'ChatBot' | 'OpenWidget' | 'KnowledgeBase' | 'TeamChat' | 'Accounts';
6
6
  export type Env = 'labs' | 'staging' | 'prod';
7
7
  export interface ProductSwitcherProps {
8
8
  mainProductId: ProductId;
@@ -1,4 +1,4 @@
1
- import { ButtonKind } from '../Button';
1
+ import { ButtonKind, ButtonProps } from '../Button';
2
2
  import * as React from 'react';
3
3
  export interface IPromoBannerV2Props {
4
4
  /**
@@ -16,7 +16,7 @@ export interface IPromoBannerV2Props {
16
16
  handleClick: () => void;
17
17
  label: string;
18
18
  kind?: ButtonKind;
19
- };
19
+ } & ButtonProps;
20
20
  /**
21
21
  * Shows the secondary CTA button
22
22
  */
@@ -41,5 +41,10 @@ export interface IPromoBannerV2Props {
41
41
  * Event handler for close button press
42
42
  */
43
43
  onClose?: () => void;
44
+ /**
45
+ * Specify the kind of PromoBannerV2
46
+ * @default 'default'
47
+ */
48
+ kind?: 'default' | 'dark';
44
49
  }
45
50
  export declare const PromoBannerV2: React.FC<React.PropsWithChildren<IPromoBannerV2Props>>;
@@ -11,6 +11,8 @@ export declare const ShadowToken: {
11
11
  Focus: string;
12
12
  DividerBottom: string;
13
13
  DividerTop: string;
14
+ DividerRight: string;
15
+ DividerLeft: string;
14
16
  DividerBottomLeft: string;
15
17
  DividerTopLeft: string;
16
18
  DividerTopRight: string;
@@ -6,7 +6,7 @@ interface UseAnimationsProps {
6
6
  interface IUseAnimations {
7
7
  isOpen: boolean;
8
8
  isMounted: boolean;
9
- setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
9
+ setShouldBeVisible: React.Dispatch<React.SetStateAction<boolean>>;
10
10
  }
11
11
  export declare const useAnimations: ({ isVisible, elementRef, }: UseAnimationsProps) => IUseAnimations;
12
12
  export {};