@livechat/design-system-react-components 2.0.0-alpha.4 → 2.0.0-alpha.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.
Files changed (65) hide show
  1. package/dist/components/AppFrame/AppFrame.d.ts +3 -0
  2. package/dist/components/AppFrame/components/ExpirationCounter/ExpirationCounter.d.ts +21 -0
  3. package/dist/components/AppFrame/components/Navigation/Navigation.d.ts +3 -0
  4. package/dist/components/AppFrame/components/Navigation/types.d.ts +8 -0
  5. package/dist/components/AppFrame/components/NavigationGroup/NavigationGroup.d.ts +3 -0
  6. package/dist/components/AppFrame/components/NavigationGroup/types.d.ts +16 -0
  7. package/dist/components/AppFrame/components/NavigationItem/NavigationItem.d.ts +3 -0
  8. package/dist/components/AppFrame/components/NavigationItem/types.d.ts +40 -0
  9. package/dist/components/AppFrame/components/NavigationTopBar/NavigationTopBar.d.ts +45 -0
  10. package/dist/components/AppFrame/components/NavigationTopBar/examples.d.ts +15 -0
  11. package/dist/components/AppFrame/components/NavigationTopBar/types.d.ts +59 -0
  12. package/dist/components/AppFrame/components/SideNavigation/SideNavigation.d.ts +3 -0
  13. package/dist/components/AppFrame/components/SideNavigation/types.d.ts +28 -0
  14. package/dist/components/AppFrame/components/SideNavigationGroup/SideNavigationGroup.d.ts +3 -0
  15. package/dist/components/AppFrame/components/SideNavigationGroup/types.d.ts +32 -0
  16. package/dist/components/AppFrame/components/SideNavigationItem/SideNavigationItem.d.ts +3 -0
  17. package/dist/components/AppFrame/components/SideNavigationItem/constants.d.ts +3 -0
  18. package/dist/components/AppFrame/components/SideNavigationItem/types.d.ts +44 -0
  19. package/dist/components/AppFrame/components/index.d.ts +9 -0
  20. package/dist/components/AppFrame/hooks/useAppFrameAnimations.d.ts +12 -0
  21. package/dist/components/AppFrame/index.d.ts +2 -0
  22. package/dist/components/AppFrame/stories-helpers.d.ts +19 -0
  23. package/dist/components/AppFrame/types.d.ts +38 -0
  24. package/dist/components/Badge/Badge.d.ts +3 -0
  25. package/dist/components/DetailsCard/DetailsCard.d.ts +1 -1
  26. package/dist/components/Modal/components/ActionModalContent.d.ts +29 -0
  27. package/dist/components/Modal/components/ModalPortal.d.ts +5 -4
  28. package/dist/components/Modal/index.d.ts +1 -0
  29. package/dist/components/OnboardingChecklist/OnboardingChecklist.d.ts +3 -0
  30. package/dist/components/OnboardingChecklist/components/CheckListItem.d.ts +3 -0
  31. package/dist/components/OnboardingChecklist/components/index.d.ts +1 -0
  32. package/dist/components/OnboardingChecklist/index.d.ts +2 -0
  33. package/dist/components/OnboardingChecklist/types.d.ts +97 -0
  34. package/dist/components/Picker/components/PickerTriggerBody.d.ts +1 -0
  35. package/dist/components/Picker/hooks/useFloatingPicker.d.ts +2 -1
  36. package/dist/components/Picker/hooks/usePickerItems.d.ts +4 -2
  37. package/dist/components/Popover/types.d.ts +2 -1
  38. package/dist/components/ProductSwitcher/ProductSwitcher.d.ts +4 -0
  39. package/dist/components/ProductSwitcher/components/ProductRow/ProductRow.d.ts +10 -0
  40. package/dist/components/ProductSwitcher/components/ProductTile/ProductTile.d.ts +9 -0
  41. package/dist/components/ProductSwitcher/constants.d.ts +7 -0
  42. package/dist/components/ProductSwitcher/helpers.d.ts +10 -0
  43. package/dist/components/ProductSwitcher/hooks/useProductSwitcher.d.ts +14 -0
  44. package/dist/components/ProductSwitcher/index.d.ts +4 -0
  45. package/dist/components/ProductSwitcher/openwidgetLogoUri.d.ts +1 -0
  46. package/dist/components/ProductSwitcher/types.d.ts +44 -0
  47. package/dist/components/StatusBadge/StatusBadge.d.ts +13 -0
  48. package/dist/components/StatusBadge/index.d.ts +1 -0
  49. package/dist/components/Tooltip/types.d.ts +4 -0
  50. package/dist/components/Typography/Text.d.ts +2 -0
  51. package/dist/components/UpdateBadge/UpdateBadge.d.ts +2 -0
  52. package/dist/components/UpdateBadge/index.d.ts +1 -0
  53. package/dist/foundations/design-token.d.ts +7 -0
  54. package/dist/index.cjs +1 -1
  55. package/dist/index.d.ts +6 -1
  56. package/dist/index.js +4348 -2720
  57. package/dist/providers/AppFrameProvider.d.ts +11 -0
  58. package/dist/providers/ThemeProvider.d.ts +19 -0
  59. package/dist/providers/constants.d.ts +4 -0
  60. package/dist/providers/helpers.d.ts +4 -0
  61. package/dist/providers/index.d.ts +5 -0
  62. package/dist/providers/types.d.ts +1 -0
  63. package/dist/style.css +1 -1
  64. package/dist/utils/plural.d.ts +1 -0
  65. package/package.json +7 -7
@@ -0,0 +1,3 @@
1
+ import { IAppFrameProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const AppFrame: React.FC<IAppFrameProps>;
@@ -0,0 +1,21 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface IExpirationCounterProps extends ComponentCoreProps {
4
+ /**
5
+ * The ID of the item
6
+ */
7
+ id: string;
8
+ /**
9
+ * The number of days left
10
+ */
11
+ daysLeft: number;
12
+ /**
13
+ * The URL to navigate to
14
+ */
15
+ url?: string;
16
+ /**
17
+ * The function to call on click
18
+ */
19
+ onClick: (e: React.MouseEvent<HTMLAnchorElement>, id: string) => void;
20
+ }
21
+ export declare const ExpirationCounter: React.FC<IExpirationCounterProps>;
@@ -0,0 +1,3 @@
1
+ import { INavigationProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const Navigation: React.FC<INavigationProps>;
@@ -0,0 +1,8 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface INavigationProps extends ComponentCoreProps {
4
+ /**
5
+ * It will display your navigation elements
6
+ */
7
+ children: React.ReactNode;
8
+ }
@@ -0,0 +1,3 @@
1
+ import { INavigationGroupProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const NavigationGroup: React.FC<INavigationGroupProps>;
@@ -0,0 +1,16 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface INavigationGroupProps extends ComponentCoreProps {
4
+ /**
5
+ * It will display your navigation elements
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * The CSS class for the navigation bar list
10
+ */
11
+ className?: string;
12
+ /**
13
+ * Specify whether the list should be scrollable
14
+ */
15
+ scrollable?: boolean;
16
+ }
@@ -0,0 +1,3 @@
1
+ import { INavigationItemProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const NavigationItem: React.FC<INavigationItemProps>;
@@ -0,0 +1,40 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface INavigationItemProps extends ComponentCoreProps {
4
+ /**
5
+ * The ID of the item
6
+ */
7
+ id: string;
8
+ /**
9
+ * The label of the item visible in the tooltip
10
+ */
11
+ label?: string;
12
+ /**
13
+ * Container for the icon or any other element
14
+ */
15
+ icon: React.ReactElement;
16
+ /**
17
+ * The URL to navigate to
18
+ */
19
+ url?: string;
20
+ /**
21
+ * Set if you are preparing a custom element as a button icon and you do not want it to be semi-transparent without hover
22
+ */
23
+ disableOpacity?: boolean;
24
+ /**
25
+ * Specify whether the navigation item is disabled
26
+ */
27
+ disabled?: boolean;
28
+ /**
29
+ * Specify whether the badge should be visible and what type it should be
30
+ */
31
+ badge?: 'dot' | 'alert' | number;
32
+ /**
33
+ * Specify whether the item is active
34
+ */
35
+ isActive?: boolean;
36
+ /**
37
+ * The function to call on click
38
+ */
39
+ onClick: (e: React.MouseEvent<HTMLAnchorElement>, id: string) => void;
40
+ }
@@ -0,0 +1,45 @@
1
+ import { INavigationTopBarProps, ITopBarAlertProps, ITopBarTitleProps } from './types';
2
+ import * as React from 'react';
3
+ /**
4
+ * NavigationTopBar is used to display a top bar in the app frame - mostly to display alerts, but arbitrary content can be placed there too.
5
+ * @example
6
+ * <NavigationTopBar>
7
+ * <NavigationTopBar.Alert kind="error">
8
+ * Something went wrong
9
+ * </NavigationTopBar.Alert>
10
+ * </NavigationTopBar>
11
+ */
12
+ export declare const NavigationTopBar: {
13
+ ({ children, className, additionalNodes, }: INavigationTopBarProps): React.ReactElement;
14
+ Alert: React.FC<ITopBarAlertProps>;
15
+ Title: React.FC<ITopBarTitleProps>;
16
+ };
17
+ /**
18
+ * Title component for the NavigationTopBar. Supposed to be placed in the `additionalNodes` prop of the NavigationTopBar.
19
+ * @example
20
+ * <NavigationTopBar additionalNodes={<NavigationTopBar.Title>Example top bar content</NavigationTopBar.Title>}>
21
+ * </NavigationTopBar>
22
+ */
23
+ export declare const NavigationTopBarTitle: React.FC<ITopBarTitleProps>;
24
+ /**
25
+ * Alert component for the NavigationTopBar.
26
+ * @example
27
+ * <NavigationTopBar>
28
+ * <NavigationTopBar.Alert kind="error" show={!!error}>
29
+ * Something went wrong
30
+ * </NavigationTopBar.Alert>
31
+ * </NavigationTopBar>
32
+ * @example
33
+ * <NavigationTopBar>
34
+ * <NavigationTopBarAlert
35
+ * kind="warning"
36
+ * primaryCta={{ label: 'Save', onClick: () => console.log('Save clicked') }}
37
+ * secondaryCta={{ label: 'Discard', onClick: () => console.log('Discard clicked') }}
38
+ * closeButton={{ onClick: () => console.log('Close clicked') }}
39
+ * show={!hasUnsavedChanges && !hasClosedAlert}
40
+ * >
41
+ * You have unsaved changes
42
+ * </NavigationTopBarAlert>
43
+ * </NavigationTopBar>
44
+ **/
45
+ export declare const NavigationTopBarAlert: React.FC<ITopBarAlertProps>;
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ export declare const DisconnectedAlert: React.FC<{
3
+ show: boolean;
4
+ onClose: () => void;
5
+ }>;
6
+ export declare const ChameleonAlert: React.FC<{
7
+ show: boolean;
8
+ onClose: () => void;
9
+ kind: 'info' | 'success' | 'warning' | 'error';
10
+ changeKind: () => void;
11
+ }>;
12
+ export declare const CustomBackgroundAlert: React.FC<{
13
+ show: boolean;
14
+ onClose: () => void;
15
+ }>;
@@ -0,0 +1,59 @@
1
+ import { ButtonProps } from 'components/Button';
2
+ import { ComponentCoreProps } from 'utils/types';
3
+ import * as React from 'react';
4
+ export type NavigationTopBarKind = 'info' | 'success' | 'warning' | 'error';
5
+ export interface INavigationTopBarProps extends ComponentCoreProps {
6
+ /**
7
+ * Contents of the top bar. You can use the `NavigationTopBar.Alert` component to display alerts.
8
+ */
9
+ children?: React.ReactNode;
10
+ /**
11
+ * Ńodes placed under the children.
12
+ */
13
+ additionalNodes?: React.ReactNode;
14
+ }
15
+ export interface ITopBarTitleProps extends ComponentCoreProps {
16
+ /**
17
+ * Content of the title.
18
+ */
19
+ children: React.ReactNode;
20
+ }
21
+ type CTAProps = {
22
+ label: string;
23
+ onClick: () => void;
24
+ } & Omit<ButtonProps, 'onClick' | 'children'>;
25
+ export interface ITopBarAlertProps extends ComponentCoreProps {
26
+ /**
27
+ * Visual style of the alert. You can also use `className` to style the alert if you need to set a custom background color.
28
+ * Defaults to `info`.
29
+ * */
30
+ kind?: NavigationTopBarKind;
31
+ /**
32
+ * Properties of the close button. If defined, the alert will be closable and the close button will be rendered.
33
+ * aria-label is highly recommended for accessibility.
34
+ * */
35
+ closeButton?: {
36
+ onClick: () => void;
37
+ 'data-testid'?: string;
38
+ 'aria-label'?: string;
39
+ };
40
+ /**
41
+ * Content of the alert.
42
+ */
43
+ children: React.ReactNode;
44
+ /**
45
+ * Primary CTA button. The button will be rendered if defined.
46
+ * Allows ButtonProps, but `children` is recommended for more complex use-cases.
47
+ * */
48
+ primaryCta?: CTAProps;
49
+ /**
50
+ * Secondary CTA button. The button will be rendered if defined.
51
+ * Allows ButtonProps, but `children` is recommended for more complex use-cases.
52
+ * */
53
+ secondaryCta?: CTAProps;
54
+ /**
55
+ * Show or hide the alert, defaults to `true`. Changes to this prop are animated - the alert will enter and leave smoothly.
56
+ * */
57
+ isVisible?: boolean;
58
+ }
59
+ export {};
@@ -0,0 +1,3 @@
1
+ import { ISideNavigationProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const SideNavigation: React.FC<ISideNavigationProps>;
@@ -0,0 +1,28 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface ISideNavigationProps extends ComponentCoreProps {
4
+ /**
5
+ * It will display your side navigation elements
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * It will display the title of the side navigation bar
10
+ */
11
+ title?: string;
12
+ /**
13
+ * It will display the custom element as title of the side navigation bar
14
+ */
15
+ customHeader?: React.ReactNode;
16
+ /**
17
+ * It will display the custom element as footer of the side navigation bar
18
+ */
19
+ customFooter?: React.ReactNode;
20
+ /**
21
+ * Specify whether the gaps between elements should be removed
22
+ */
23
+ noGaps?: boolean;
24
+ /**
25
+ * It will display the custom element on the right side of the side navigation bar title
26
+ */
27
+ rightNode?: React.ReactNode;
28
+ }
@@ -0,0 +1,3 @@
1
+ import { ISideNavigationGroupProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const SideNavigationGroup: React.FC<ISideNavigationGroupProps>;
@@ -0,0 +1,32 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface ISideNavigationGroupProps extends ComponentCoreProps {
4
+ /**
5
+ * It will display your side navigation elements
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * The label of the side navigation list
10
+ */
11
+ label?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
12
+ /**
13
+ * The right node of the side navigation list if `isCollapsible` is set to true
14
+ */
15
+ rightNode?: React.ReactNode | ((isOpen: boolean) => React.ReactNode);
16
+ /**
17
+ * Specify whether the list should be collapsible
18
+ */
19
+ isCollapsible?: boolean;
20
+ /**
21
+ * The function to call on item hover
22
+ */
23
+ onItemHover?: () => void;
24
+ /**
25
+ * Specify whether the list should be open on the first render
26
+ */
27
+ shouldOpenOnInit?: boolean;
28
+ /**
29
+ * Specify whether the list should be open if an item within the group is active
30
+ */
31
+ shouldOpenOnActive?: boolean;
32
+ }
@@ -0,0 +1,3 @@
1
+ import { ISideNavigationItemProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const SideNavigationItem: React.FC<ISideNavigationItemProps>;
@@ -0,0 +1,3 @@
1
+ export declare const SIDE_NAVIGATION_ITEM_TEST_ID = "side-navigation-item-test-id";
2
+ export declare const SIDE_NAVIGATION_ACTIVE_ITEM_TEST_ID = "side-navigation-active-item-test-id";
3
+ export declare const SIDE_NAVIGATION_PARENT_ICON_TEST_ID = "side-navigation-parent-icon";
@@ -0,0 +1,44 @@
1
+ import { ComponentCoreProps } from '../../../../utils/types';
2
+ import * as React from 'react';
3
+ export interface ISideNavigationItemProps extends ComponentCoreProps {
4
+ /**
5
+ * The label of the item
6
+ */
7
+ label: React.ReactNode;
8
+ /**
9
+ * Custom element on the right side of the side navigation item
10
+ */
11
+ rightNode?: React.ReactNode;
12
+ /**
13
+ * Custom element on the left side of the side navigation item
14
+ */
15
+ leftNode?: React.ReactNode;
16
+ /**
17
+ * Specify whether the icon space should be kept
18
+ */
19
+ shouldKeepIconSpace?: boolean;
20
+ /**
21
+ * The URL to navigate to
22
+ */
23
+ url?: string;
24
+ /**
25
+ * Specify whether the item is active
26
+ */
27
+ isActive?: boolean;
28
+ /**
29
+ * Specify whether the item is seen as the main one
30
+ */
31
+ isMainEntry?: boolean;
32
+ /**
33
+ * The function to call on click
34
+ */
35
+ onClick: () => void;
36
+ /**
37
+ * The function to call on item hover
38
+ */
39
+ onItemHover?: () => void;
40
+ /**
41
+ * Specify whether the icon should be hidden
42
+ */
43
+ isIconHidden?: boolean;
44
+ }
@@ -0,0 +1,9 @@
1
+ export { SideNavigation } from './SideNavigation/SideNavigation';
2
+ export { SideNavigationGroup } from './SideNavigationGroup/SideNavigationGroup';
3
+ export { SideNavigationItem } from './SideNavigationItem/SideNavigationItem';
4
+ export { NavigationGroup } from './NavigationGroup/NavigationGroup';
5
+ export { NavigationItem } from './NavigationItem/NavigationItem';
6
+ export { Navigation } from './Navigation/Navigation';
7
+ export { NavigationTopBar, NavigationTopBarAlert, NavigationTopBarTitle, } from './NavigationTopBar/NavigationTopBar';
8
+ export { SIDE_NAVIGATION_ITEM_TEST_ID, SIDE_NAVIGATION_ACTIVE_ITEM_TEST_ID, SIDE_NAVIGATION_PARENT_ICON_TEST_ID, } from './SideNavigationItem/constants';
9
+ export { ExpirationCounter } from './ExpirationCounter/ExpirationCounter';
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ interface UseAppFrameAnimationsProps {
3
+ isVisible: boolean;
4
+ elementRef: React.RefObject<HTMLDivElement>;
5
+ }
6
+ interface IUseAppFrameAnimations {
7
+ isOpen: boolean;
8
+ isMounted: boolean;
9
+ setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
10
+ }
11
+ export declare const useAppFrameAnimations: ({ isVisible, elementRef, }: UseAppFrameAnimationsProps) => IUseAppFrameAnimations;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ export { AppFrame } from './AppFrame';
2
+ export * from './components';
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ interface ExampleAppContentProps {
3
+ showToggle: boolean;
4
+ alerts?: boolean[];
5
+ setAlerts?: (alerts: boolean[]) => void;
6
+ topBarVisible: boolean;
7
+ setTopBarVisible: (visible: boolean) => void;
8
+ }
9
+ export declare const ExampleAppContent: React.FC<ExampleAppContentProps>;
10
+ export declare const ExampleTopBar: React.FC<{
11
+ visibleAlerts: boolean[];
12
+ topBarVisible: boolean;
13
+ setAlerts: (alerts: boolean[]) => void;
14
+ }>;
15
+ export declare const getBadgeContent: (item: string) => "dot" | "alert" | 5 | undefined;
16
+ export declare const getChatsMenu: (activeSubItem: number, handler: (o: number) => void) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const getEngageSubMenu: (activeSubItem: number, handler: (o: number) => void) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const getArchivesSubMenu: (activeSubItem: number, handler: (o: number) => void) => import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,38 @@
1
+ import { ComponentCoreProps } from '../../utils/types';
2
+ import * as React from 'react';
3
+ export interface IAppFrameProps extends ComponentCoreProps {
4
+ /**
5
+ * It will display your app in the content area
6
+ */
7
+ children: React.ReactNode;
8
+ /**
9
+ * It will display navigation elements
10
+ */
11
+ navigation: React.ReactNode;
12
+ /**
13
+ * It will display the side navigation bar
14
+ */
15
+ sideNavigation?: React.ReactNode;
16
+ /**
17
+ * It will display the top bar with passed element
18
+ */
19
+ topBar?: React.ReactNode;
20
+ /**
21
+ * The CSS class for the top bar
22
+ */
23
+ topBarClassName?: string;
24
+ /**
25
+ * The CSS class for the sub navigation bar
26
+ */
27
+ sideNavigationContainerClassName?: string;
28
+ /**
29
+ * The CSS class for the content container
30
+ */
31
+ contentClassName?: string;
32
+ }
33
+ export type { INavigationProps } from './components/Navigation/types';
34
+ export type { INavigationGroupProps } from './components/NavigationGroup/types';
35
+ export type { INavigationItemProps } from './components/NavigationItem/types';
36
+ export type { ISideNavigationProps } from './components/SideNavigation/types';
37
+ export type { ISideNavigationGroupProps } from './components/SideNavigationGroup/types';
38
+ export type { ISideNavigationItemProps } from './components/SideNavigationItem/types';
@@ -6,6 +6,7 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
6
6
  count?: number;
7
7
  /**
8
8
  * Specify the badge kind
9
+ * @param secondary - is deprecated, use "primary" or "tertiary" instead
9
10
  */
10
11
  kind?: 'primary' | 'secondary' | 'tertiary';
11
12
  /**
@@ -14,10 +15,12 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
14
15
  max?: number;
15
16
  /**
16
17
  * Specify the badge size
18
+ * @param large - is deprecated, use "medium" or "compact" instead
17
19
  */
18
20
  size?: 'large' | 'medium' | 'compact';
19
21
  /**
20
22
  * Specify the badge type
23
+ * @param dot - is deprecated, use "UpdateBadge" component instead
21
24
  */
22
25
  type?: 'counter' | 'alert' | 'dot';
23
26
  }
@@ -35,6 +35,6 @@ export interface IDetailsCardProps {
35
35
  /**
36
36
  * Callback function called when the card label is clicked
37
37
  */
38
- onClick?: () => void;
38
+ onClick?: (e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement | HTMLDivElement>) => void;
39
39
  }
40
40
  export declare const DetailsCard: React.FC<React.PropsWithChildren<IDetailsCardProps>>;
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ interface IActionModalProps {
3
+ /**
4
+ * Optional element to render icon or image
5
+ */
6
+ icon?: React.ReactNode;
7
+ /**
8
+ * Set the header text
9
+ */
10
+ heading?: React.ReactNode;
11
+ /**
12
+ * Optional element to render action buttons
13
+ */
14
+ actions?: React.ReactNode;
15
+ /**
16
+ * The CSS class for main container
17
+ */
18
+ className?: string;
19
+ /**
20
+ * The CSS class for header container
21
+ */
22
+ headerClassName?: string;
23
+ /**
24
+ * The CSS class for content container
25
+ */
26
+ contentClassName?: string;
27
+ }
28
+ export declare const ActionModalContent: React.FC<React.PropsWithChildren<IActionModalProps>>;
29
+ export {};
@@ -1,7 +1,8 @@
1
- import * as React from 'react';
2
- export interface ModalPortalProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
1
+ import { FC, PropsWithChildren, ReactNode, HTMLAttributes } from 'react';
2
+
3
+ export interface ModalPortalProps extends HTMLAttributes<HTMLDivElement> {
4
+ children: ReactNode;
4
5
  zIndex: number;
5
6
  parentElementName?: string;
6
7
  }
7
- export declare const ModalPortal: React.FC<React.PropsWithChildren<ModalPortalProps>>;
8
+ export declare const ModalPortal: FC<PropsWithChildren<ModalPortalProps>>;
@@ -3,6 +3,7 @@ export { ModalBase } from './components/ModalBase';
3
3
  export { ModalCloseButton } from './components/ModalCloseButton';
4
4
  export { ModalPortal } from './components/ModalPortal';
5
5
  export { ModalHeader } from './components/ModalHeader';
6
+ export { ActionModalContent } from './components/ActionModalContent';
6
7
  export type { ModalProps } from './Modal';
7
8
  export type { ModalBaseProps } from './components/ModalBase';
8
9
  export type { ModalCloseButtonProps } from './components/ModalCloseButton';
@@ -0,0 +1,3 @@
1
+ import { IOnboardingChecklistProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const OnboardingChecklist: React.FC<IOnboardingChecklistProps>;
@@ -0,0 +1,3 @@
1
+ import { ICheckListItem } from '../types';
2
+ import * as React from 'react';
3
+ export declare const CheckListItem: React.FC<ICheckListItem>;
@@ -0,0 +1 @@
1
+ export { CheckListItem } from './CheckListItem';
@@ -0,0 +1,2 @@
1
+ export { OnboardingChecklist } from './OnboardingChecklist';
2
+ export type { IOnboardingChecklistProps, IChecklistItemProps, ICompletionMessageDataProps, } from './types';
@@ -0,0 +1,97 @@
1
+ import * as React from 'react';
2
+ export interface IChecklistItemProps {
3
+ /**
4
+ * Define the unique id of the item
5
+ */
6
+ id: string;
7
+ /**
8
+ * Set the title of the item
9
+ */
10
+ title: string;
11
+ /**
12
+ * Set the additional text for the title
13
+ */
14
+ titleHint?: string;
15
+ /**
16
+ * Set the description of the item
17
+ */
18
+ description: string;
19
+ /**
20
+ * The element to display when the item is active
21
+ */
22
+ cta: React.ReactElement;
23
+ /**
24
+ * The element to display in the right column when the item is active
25
+ */
26
+ placeholder: React.ReactElement;
27
+ }
28
+ export interface ICheckListItem extends Omit<IChecklistItemProps, 'placeholder'> {
29
+ isActive: boolean;
30
+ isChecked: boolean;
31
+ isLastElement: boolean;
32
+ onClick: (id: string) => void;
33
+ }
34
+ export type ICompletionMessageDataProps = {
35
+ /**
36
+ * Set the title of the complete state
37
+ */
38
+ title: string;
39
+ /**
40
+ * Set the greeting text of the complete state
41
+ */
42
+ greetingText?: string;
43
+ /**
44
+ * The element to display when the checklist is completed before the animation starts
45
+ */
46
+ placeholder?: React.ReactElement;
47
+ /**
48
+ * Define the delay betweend displaying complete placeholder and the animation starts
49
+ */
50
+ delay?: number;
51
+ /**
52
+ * Define the custom heigh of content visible after checklist complete
53
+ */
54
+ height?: number;
55
+ };
56
+ export interface IOnboardingChecklistProps {
57
+ /**
58
+ * The CSS class for the component
59
+ */
60
+ className?: string;
61
+ /**
62
+ * Set the title of the checklist
63
+ */
64
+ title: string;
65
+ /**
66
+ * Set the greeting text of the checklist
67
+ */
68
+ greetingText?: string;
69
+ /**
70
+ * The list of items to display
71
+ */
72
+ items: IChecklistItemProps[];
73
+ /**
74
+ * Set to define the active item
75
+ */
76
+ activeItemId: string;
77
+ /**
78
+ * Set to defined the complete items
79
+ */
80
+ completedItemsIds: string[];
81
+ /**
82
+ * Callback function when list element is clicked
83
+ */
84
+ onActiveChange: (id: string) => void;
85
+ /**
86
+ * The CSS class for the right column
87
+ */
88
+ placeholderClassName?: string;
89
+ /**
90
+ * Set to define the checklist is completed
91
+ */
92
+ isCompleted?: boolean;
93
+ /**
94
+ * Complete element which will be displayed when `isCompleted` is true
95
+ */
96
+ completionMessageData: ICompletionMessageDataProps;
97
+ }
@@ -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>;