@livechat/design-system-react-components 1.33.0 → 1.33.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.
@@ -10,7 +10,7 @@ import { INavigationTopBarProps, ITopBarAlertProps, ITopBarTitleProps } from './
10
10
  * </NavigationTopBar>
11
11
  */
12
12
  export declare const NavigationTopBar: {
13
- ({ children, additionalNodes, }: INavigationTopBarProps): React.ReactElement;
13
+ ({ children, className, additionalNodes, }: INavigationTopBarProps): React.ReactElement;
14
14
  Alert: React.FC<ITopBarAlertProps>;
15
15
  Title: React.FC<ITopBarTitleProps>;
16
16
  };
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ButtonProps } from 'components/Button';
2
3
  import { ComponentCoreProps } from 'utils/types';
3
4
  export type NavigationTopBarKind = 'info' | 'success' | 'warning' | 'error';
4
5
  export interface INavigationTopBarProps extends ComponentCoreProps {
@@ -17,6 +18,10 @@ export interface ITopBarTitleProps extends ComponentCoreProps {
17
18
  */
18
19
  children: React.ReactNode;
19
20
  }
21
+ type CTAProps = {
22
+ label: string;
23
+ onClick: () => void;
24
+ } & Omit<ButtonProps, 'onClick' | 'children'>;
20
25
  export interface ITopBarAlertProps extends ComponentCoreProps {
21
26
  /**
22
27
  * Visual style of the alert. You can also use `className` to style the alert if you need to set a custom background color.
@@ -38,22 +43,17 @@ export interface ITopBarAlertProps extends ComponentCoreProps {
38
43
  children: React.ReactNode;
39
44
  /**
40
45
  * Primary CTA button. The button will be rendered if defined.
41
- * Simple on purpose - if you need more complex buttons, you can use the `children` prop.
46
+ * Allows ButtonProps, but `children` is recommended for more complex use-cases.
42
47
  * */
43
- primaryCta?: {
44
- label: string;
45
- onClick: () => void;
46
- };
48
+ primaryCta?: CTAProps;
47
49
  /**
48
50
  * Secondary CTA button. The button will be rendered if defined.
49
- * Simple on purpose - if you need more complex buttons, you can use the `children` prop.
51
+ * Allows ButtonProps, but `children` is recommended for more complex use-cases.
50
52
  * */
51
- secondaryCta?: {
52
- label: string;
53
- onClick: () => void;
54
- };
53
+ secondaryCta?: CTAProps;
55
54
  /**
56
55
  * Show or hide the alert, defaults to `true`. Changes to this prop are animated - the alert will enter and leave smoothly.
57
56
  * */
58
57
  isVisible?: boolean;
59
58
  }
59
+ export {};
@@ -17,5 +17,6 @@ export interface ITriggerBodyProps {
17
17
  onClear: () => void;
18
18
  virtualItemRef: React.MutableRefObject<HTMLElement | null>;
19
19
  isTriggerFocused: boolean;
20
+ inputRef?: React.RefObject<HTMLInputElement>;
20
21
  }
21
22
  export declare const PickerTriggerBody: React.FC<ITriggerBodyProps>;
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { IPickerListItem } from '../types';
2
3
  interface UsePickerItemsProps {
3
4
  selected?: IPickerListItem[] | null;
@@ -6,6 +7,8 @@ interface UsePickerItemsProps {
6
7
  selectAllOptionText?: string;
7
8
  onSelect: (items: IPickerListItem[] | null) => void;
8
9
  setOpen: (isOpen: boolean) => void;
10
+ clearSearchAfterSelection: boolean;
11
+ inputRef: React.RefObject<HTMLInputElement>;
9
12
  }
10
13
  interface IUsePickerItems {
11
14
  selectedKeys: string[];
@@ -16,5 +19,5 @@ interface IUsePickerItems {
16
19
  handleItemRemove: (itemKey: string) => void;
17
20
  handleClear: () => void;
18
21
  }
19
- export declare const usePickerItems: ({ selected, options, type, selectAllOptionText, onSelect, setOpen, }: UsePickerItemsProps) => IUsePickerItems;
22
+ export declare const usePickerItems: ({ selected, options, type, selectAllOptionText, onSelect, setOpen, clearSearchAfterSelection, inputRef, }: UsePickerItemsProps) => IUsePickerItems;
20
23
  export {};
@@ -9,6 +9,7 @@ export interface ProductSwitcherProps {
9
9
  isVisible?: boolean;
10
10
  onOpen?: (event?: Event) => void;
11
11
  onClose?: (event?: Event) => void;
12
+ onSelect?: (id: ProductId) => void;
12
13
  }
13
14
  export declare const SSOProductIdMap: Record<ProductId, ProductName>;
14
15
  export type ProductSubscription = Partial<Record<ProductId, {
@@ -369,5 +369,6 @@ export declare const DesignToken: {
369
369
  ProductsPlatform: string;
370
370
  SurfaceCheckListItemOpenBackground: string;
371
371
  SurfaceCheckListBackground: string;
372
+ ContentBasicPlaceholder: string;
372
373
  };
373
374
  export type DesignTokenKey = keyof typeof DesignToken;