@nlxai/touchpoint-ui 1.0.4-alpha.3 → 1.0.5-alpha.0
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/index.html +83 -85
- package/lib/App.d.ts +25 -5
- package/lib/components/FullscreenError.d.ts +2 -0
- package/lib/components/{ChatHeader.d.ts → Header.d.ts} +2 -2
- package/lib/components/{ChatInput.d.ts → Input.d.ts} +3 -3
- package/lib/components/{ChatMessages.d.ts → Messages.d.ts} +2 -2
- package/lib/components/{ChatSettings.d.ts → Settings.d.ts} +2 -2
- package/lib/components/ui/Carousel.d.ts +4 -0
- package/lib/components/ui/CustomCard.d.ts +24 -3
- package/lib/components/ui/DateInput.d.ts +8 -2
- package/lib/components/ui/IconButton.d.ts +28 -2
- package/lib/components/ui/Icons.d.ts +12 -0
- package/lib/components/ui/TextButton.d.ts +20 -2
- package/lib/index.d.ts +31 -7
- package/lib/index.js +3779 -3219
- package/lib/index.umd.js +45 -44
- package/lib/preview.d.ts +10 -0
- package/lib/types.d.ts +5 -1
- package/package.json +8 -8
- package/typedoc.cjs +14 -0
- package/lib/context.d.ts +0 -6
package/index.html
CHANGED
|
@@ -1,95 +1,93 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
|
6
|
+
<style>
|
|
7
|
+
main {
|
|
8
|
+
padding: 15px;
|
|
9
|
+
}
|
|
3
10
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
main * {
|
|
12
|
+
font-family: Helvetica, sans-serif;
|
|
13
|
+
}
|
|
14
|
+
</style>
|
|
15
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
16
|
+
<title>Touchpoint prototype</title>
|
|
17
|
+
</head>
|
|
11
18
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
</style>
|
|
16
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
17
|
-
<title>Touchpoint prototype</title>
|
|
18
|
-
</head>
|
|
19
|
+
<body>
|
|
20
|
+
<main>
|
|
21
|
+
<h1>Loreum ipsum dolor sit amet</h1>
|
|
19
22
|
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
<p>
|
|
24
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
|
|
25
|
+
fermentum nisi nec placerat facilisis. Ut fringilla magna ac ipsum
|
|
26
|
+
finibus, vitae scelerisque magna molestie. Donec mollis ut elit a
|
|
27
|
+
tristique. Phasellus tempus velit quam, non tempor dolor tempus a.
|
|
28
|
+
Quisque sed risus tortor. Duis ultricies maximus imperdiet. Vivamus eget
|
|
29
|
+
accumsan nulla. Sed accumsan ipsum in pharetra ornare. In ac scelerisque
|
|
30
|
+
metus. In hac habitasse platea dictumst. Proin est massa, interdum ut
|
|
31
|
+
risus sit amet, congue bibendum dolor. Donec dapibus lacus vel sem
|
|
32
|
+
hendrerit, sit amet placerat odio blandit. Cras laoreet sapien id erat
|
|
33
|
+
ornare, in hendrerit tortor commodo.
|
|
34
|
+
</p>
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
hendrerit, sit amet placerat odio blandit. Cras laoreet sapien id erat
|
|
34
|
-
ornare, in hendrerit tortor commodo.
|
|
35
|
-
</p>
|
|
36
|
+
<p>
|
|
37
|
+
Nulla porta quis sem id pellentesque. Aenean elit enim, vestibulum vitae
|
|
38
|
+
libero quis, pretium vestibulum nunc. Proin id dolor vulputate, rhoncus
|
|
39
|
+
tellus quis, condimentum mi. Morbi sed varius nisi, sed convallis
|
|
40
|
+
tellus. Cras imperdiet feugiat nisi at tristique. Suspendisse potenti.
|
|
41
|
+
Cras in quam fermentum, laoreet tortor non, euismod leo. Mauris
|
|
42
|
+
tincidunt massa quis malesuada pellentesque. Nulla auctor arcu vel orci
|
|
43
|
+
sodales porttitor.
|
|
44
|
+
</p>
|
|
36
45
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
<p>
|
|
47
|
+
Integer magna mi, consectetur vitae dui tempus, ultricies commodo magna.
|
|
48
|
+
Morbi aliquet varius enim eget ullamcorper. Vestibulum tristique, risus
|
|
49
|
+
eget tincidunt tristique, nibh dolor laoreet purus, id viverra mi ipsum
|
|
50
|
+
eget neque. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
51
|
+
Vestibulum imperdiet ut ex et convallis. Lorem ipsum dolor sit amet,
|
|
52
|
+
consectetur adipiscing elit. Phasellus auctor eget odio ut dignissim.
|
|
53
|
+
Mauris eget velit ut orci vestibulum bibendum. Vestibulum sit amet
|
|
54
|
+
tincidunt enim.
|
|
55
|
+
</p>
|
|
46
56
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
massa, fermentum eget metus vitae, interdum viverra justo. Nam consequat
|
|
63
|
-
mauris orci, a rhoncus eros volutpat nec. Nunc iaculis erat efficitur,
|
|
64
|
-
pulvinar eros vel, commodo ligula. Praesent gravida, ipsum vitae tempus
|
|
65
|
-
aliquam, mauris elit pharetra sapien, vitae porttitor quam orci quis
|
|
66
|
-
dolor. Mauris et vulputate enim, et pellentesque libero. Proin cursus
|
|
67
|
-
malesuada condimentum. Donec scelerisque, quam in fringilla facilisis,
|
|
68
|
-
nibh sapien varius justo, eget pellentesque erat leo ac lectus. Nulla eu
|
|
69
|
-
auctor sem. Cras condimentum sem non mauris facilisis imperdiet. Integer
|
|
70
|
-
eu dolor ipsum. Praesent maximus ornare felis, non faucibus sem
|
|
71
|
-
porttitor nec.
|
|
72
|
-
</p>
|
|
73
|
-
|
|
74
|
-
<p>
|
|
75
|
-
Orci varius natoque penatibus et magnis dis parturient montes, nascetur
|
|
76
|
-
ridiculus mus. Nunc elementum non urna vel vulputate. Vestibulum vitae
|
|
77
|
-
felis turpis. Cras id mauris id ligula molestie eleifend. Vivamus in
|
|
78
|
-
ante at erat rutrum vulputate vel id arcu. Nam luctus sapien sed
|
|
79
|
-
fermentum fermentum. Ut dolor velit, elementum et metus vel, pretium
|
|
80
|
-
dapibus lectus. Nulla vulputate pulvinar elit quis convallis. Cras
|
|
81
|
-
pharetra, eros sit amet blandit ornare, eros odio accumsan urna, nec
|
|
82
|
-
vestibulum dolor purus nec neque. Phasellus vel quam sed magna vehicula
|
|
83
|
-
facilisis sit amet non risus. Phasellus libero eros, eleifend ut
|
|
84
|
-
vulputate non, malesuada sit amet purus. Etiam vel diam facilisis,
|
|
85
|
-
tempus quam eu, ullamcorper turpis. Duis nec enim ut est rutrum rhoncus.
|
|
86
|
-
Cras finibus urna at purus accumsan, viverra lacinia nunc faucibus. In
|
|
87
|
-
facilisis, ex eu commodo luctus, justo nisl hendrerit quam, quis
|
|
88
|
-
volutpat tellus lectus sit amet enim. Duis laoreet lorem vitae lorem
|
|
89
|
-
aliquam bibendum.
|
|
90
|
-
</p>
|
|
91
|
-
</main>
|
|
92
|
-
<script type="module" src="/src/index.tsx"></script>
|
|
93
|
-
</body>
|
|
57
|
+
<p>
|
|
58
|
+
Donec eu mauris ac lectus rutrum blandit ut id ante. Phasellus volutpat
|
|
59
|
+
imperdiet mauris in aliquet. Duis auctor, tellus ac faucibus fermentum,
|
|
60
|
+
ligula quam hendrerit eros, ut vehicula erat mi non nulla. Fusce odio
|
|
61
|
+
massa, fermentum eget metus vitae, interdum viverra justo. Nam consequat
|
|
62
|
+
mauris orci, a rhoncus eros volutpat nec. Nunc iaculis erat efficitur,
|
|
63
|
+
pulvinar eros vel, commodo ligula. Praesent gravida, ipsum vitae tempus
|
|
64
|
+
aliquam, mauris elit pharetra sapien, vitae porttitor quam orci quis
|
|
65
|
+
dolor. Mauris et vulputate enim, et pellentesque libero. Proin cursus
|
|
66
|
+
malesuada condimentum. Donec scelerisque, quam in fringilla facilisis,
|
|
67
|
+
nibh sapien varius justo, eget pellentesque erat leo ac lectus. Nulla eu
|
|
68
|
+
auctor sem. Cras condimentum sem non mauris facilisis imperdiet. Integer
|
|
69
|
+
eu dolor ipsum. Praesent maximus ornare felis, non faucibus sem
|
|
70
|
+
porttitor nec.
|
|
71
|
+
</p>
|
|
94
72
|
|
|
73
|
+
<p>
|
|
74
|
+
Orci varius natoque penatibus et magnis dis parturient montes, nascetur
|
|
75
|
+
ridiculus mus. Nunc elementum non urna vel vulputate. Vestibulum vitae
|
|
76
|
+
felis turpis. Cras id mauris id ligula molestie eleifend. Vivamus in
|
|
77
|
+
ante at erat rutrum vulputate vel id arcu. Nam luctus sapien sed
|
|
78
|
+
fermentum fermentum. Ut dolor velit, elementum et metus vel, pretium
|
|
79
|
+
dapibus lectus. Nulla vulputate pulvinar elit quis convallis. Cras
|
|
80
|
+
pharetra, eros sit amet blandit ornare, eros odio accumsan urna, nec
|
|
81
|
+
vestibulum dolor purus nec neque. Phasellus vel quam sed magna vehicula
|
|
82
|
+
facilisis sit amet non risus. Phasellus libero eros, eleifend ut
|
|
83
|
+
vulputate non, malesuada sit amet purus. Etiam vel diam facilisis,
|
|
84
|
+
tempus quam eu, ullamcorper turpis. Duis nec enim ut est rutrum rhoncus.
|
|
85
|
+
Cras finibus urna at purus accumsan, viverra lacinia nunc faucibus. In
|
|
86
|
+
facilisis, ex eu commodo luctus, justo nisl hendrerit quam, quis
|
|
87
|
+
volutpat tellus lectus sit amet enim. Duis laoreet lorem vitae lorem
|
|
88
|
+
aliquam bibendum.
|
|
89
|
+
</p>
|
|
90
|
+
</main>
|
|
91
|
+
<script type="module" src="/src/index.tsx"></script>
|
|
92
|
+
</body>
|
|
95
93
|
</html>
|
package/lib/App.d.ts
CHANGED
|
@@ -1,24 +1,44 @@
|
|
|
1
1
|
import { ConversationHandler, Config } from '@nlxai/chat-core';
|
|
2
2
|
import { ColorMode, WindowSize, Theme, CustomModalityComponent } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Main Touchpoint creation properties object
|
|
5
|
+
*/
|
|
3
6
|
export interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* Configuration object for Touchpoint
|
|
9
|
+
*/
|
|
4
10
|
config: Config;
|
|
11
|
+
/**
|
|
12
|
+
* Optional window size for the chat window, defaults to `half`
|
|
13
|
+
*/
|
|
5
14
|
windowSize?: WindowSize;
|
|
15
|
+
/**
|
|
16
|
+
* Optional color mode for the chat window, defaults to `dark`
|
|
17
|
+
*/
|
|
6
18
|
colorMode?: ColorMode;
|
|
7
19
|
/**
|
|
8
20
|
* URL of icon used to display the brand in the chat header
|
|
9
21
|
*/
|
|
10
22
|
brandIcon?: string;
|
|
11
23
|
/**
|
|
12
|
-
* URL of icon used on the launch icon in the bottom right when the experience is collapsed
|
|
24
|
+
* URL of icon used on the launch icon in the bottom right when the experience is collapsed.
|
|
25
|
+
*
|
|
26
|
+
* When set to `false`, no launch button is shown at all. When not set or set to `true`, the default launch icon is rendered.
|
|
27
|
+
*/
|
|
28
|
+
launchIcon?: string | boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Optional theme object to override default theme values
|
|
13
31
|
*/
|
|
14
|
-
launchIcon?: string;
|
|
15
32
|
theme?: Partial<Theme>;
|
|
33
|
+
/**
|
|
34
|
+
* Optional custom modality components to render in Touchpoint
|
|
35
|
+
*/
|
|
16
36
|
customModalities?: Record<string, CustomModalityComponent<any>>;
|
|
17
37
|
}
|
|
18
38
|
export interface AppRef {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
getConversationHandler: () => ConversationHandler
|
|
39
|
+
setExpanded: (val: boolean) => void;
|
|
40
|
+
getExpanded: () => boolean;
|
|
41
|
+
getConversationHandler: () => ConversationHandler;
|
|
22
42
|
}
|
|
23
43
|
declare const App: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<AppRef>>;
|
|
24
44
|
export default App;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { WindowSize, ColorMode } from '../types';
|
|
3
|
-
interface
|
|
3
|
+
interface HeaderProps {
|
|
4
4
|
windowSize: WindowSize;
|
|
5
5
|
colorMode: ColorMode;
|
|
6
6
|
brandIcon?: string;
|
|
@@ -9,5 +9,5 @@ interface ChatHeaderProps {
|
|
|
9
9
|
toggleSettings?: () => void;
|
|
10
10
|
isSettingsOpen: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const Header: FC<HeaderProps>;
|
|
13
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ConversationHandler, UploadUrl } from '@nlxai/chat-core';
|
|
3
3
|
import { ChoiceMessage } from '../types';
|
|
4
|
-
interface
|
|
4
|
+
interface InputProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
handler: ConversationHandler;
|
|
7
7
|
uploadUrl?: UploadUrl;
|
|
@@ -11,5 +11,5 @@ interface ChatInputProps {
|
|
|
11
11
|
}) => void;
|
|
12
12
|
choiceMessage?: ChoiceMessage;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
15
|
-
export
|
|
14
|
+
export declare const Input: FC<InputProps>;
|
|
15
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { Response, ConversationHandler, BotMessage } from '@nlxai/chat-core';
|
|
3
3
|
import { CustomModalityComponent, ColorMode } from '../types';
|
|
4
|
-
export interface
|
|
4
|
+
export interface MessagesProps {
|
|
5
5
|
isWaiting: boolean;
|
|
6
6
|
handler: ConversationHandler;
|
|
7
7
|
responses: Response[];
|
|
@@ -18,4 +18,4 @@ export declare const MessageChoices: FC<{
|
|
|
18
18
|
messageIndex: number;
|
|
19
19
|
className?: string;
|
|
20
20
|
}>;
|
|
21
|
-
export declare const
|
|
21
|
+
export declare const Messages: FC<MessagesProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { ConversationHandler } from '@nlxai/chat-core';
|
|
3
|
-
interface
|
|
3
|
+
interface SettingsProps {
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
handler: ConversationHandler;
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const Settings: FC<SettingsProps>;
|
|
9
9
|
export {};
|
|
@@ -1,21 +1,42 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
import { Icon } from '../ui/Icons';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the CustomCard component
|
|
5
|
+
*/
|
|
3
6
|
export interface CustomCardProps {
|
|
7
|
+
/**
|
|
8
|
+
* Content to be rendered inside the card.
|
|
9
|
+
*/
|
|
4
10
|
children: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the card is in a selected state. Used to highlight the card.
|
|
13
|
+
*/
|
|
5
14
|
selected?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Handler function for when the card is clicked
|
|
17
|
+
*/
|
|
6
18
|
onClick?: () => void;
|
|
7
19
|
}
|
|
8
|
-
export declare const CustomCards: FC<{
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
}>;
|
|
11
20
|
export declare const CustomCard: FC<CustomCardProps>;
|
|
12
21
|
export declare const CustomCardImageRow: FC<{
|
|
13
22
|
src: string;
|
|
14
23
|
alt?: string;
|
|
15
24
|
}>;
|
|
25
|
+
/**
|
|
26
|
+
* Props for the CustomCardRow component
|
|
27
|
+
*/
|
|
16
28
|
export interface CustomCardRowProps {
|
|
29
|
+
/**
|
|
30
|
+
* Content to be displayed on the left side of the row
|
|
31
|
+
*/
|
|
17
32
|
left: ReactNode;
|
|
33
|
+
/**
|
|
34
|
+
* Content to be displayed on the right side of the row
|
|
35
|
+
*/
|
|
18
36
|
right: ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Optional icon to be displayed in the center of the row
|
|
39
|
+
*/
|
|
19
40
|
icon?: Icon;
|
|
20
41
|
}
|
|
21
42
|
export declare const CustomCardRow: FC<CustomCardRowProps>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Props for the DateInput component
|
|
4
|
+
*/
|
|
5
|
+
export interface DateInputProps {
|
|
6
|
+
/**
|
|
7
|
+
* Handler function called when the date is submitted
|
|
8
|
+
* @param date - The submitted date in YYYY-MM-DD format
|
|
9
|
+
*/
|
|
3
10
|
onSubmit?: (date: string) => void;
|
|
4
11
|
}
|
|
5
12
|
export declare const DateInput: FC<DateInputProps>;
|
|
6
|
-
export {};
|
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { IconProps } from './Icons';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the different types of icon buttons available in the application.
|
|
5
|
+
*
|
|
6
|
+
* - `main`: The primary icon button.
|
|
7
|
+
* - `ghost`: A transparent or less prominent icon button.
|
|
8
|
+
* - `activated`: An icon button that indicates an active state.
|
|
9
|
+
* - `coverup`: An icon button used to cover up or mask something.
|
|
10
|
+
* - `overlay`: An icon button that appears over other content.
|
|
11
|
+
*/
|
|
3
12
|
export type IconButtonType = "main" | "ghost" | "activated" | "coverup" | "overlay";
|
|
4
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Props for the IconButton component
|
|
15
|
+
*/
|
|
16
|
+
export interface IconButtonProps {
|
|
17
|
+
/**
|
|
18
|
+
* Handler function called when the button is clicked
|
|
19
|
+
*/
|
|
5
20
|
onClick?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible label for the button
|
|
23
|
+
*/
|
|
6
24
|
label: string;
|
|
25
|
+
/**
|
|
26
|
+
* Additional CSS classes to apply to the button
|
|
27
|
+
*/
|
|
7
28
|
className?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Visual style variant of the button. One of IconButtonType.
|
|
31
|
+
*/
|
|
8
32
|
type: IconButtonType;
|
|
33
|
+
/**
|
|
34
|
+
* Icon component to display inside the button
|
|
35
|
+
*/
|
|
9
36
|
Icon: FC<IconProps>;
|
|
10
37
|
}
|
|
11
38
|
export declare const IconButton: FC<IconButtonProps>;
|
|
12
|
-
export {};
|
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for icon components
|
|
4
|
+
*/
|
|
2
5
|
export interface IconProps {
|
|
6
|
+
/**
|
|
7
|
+
* Additional CSS classes to apply to the icon
|
|
8
|
+
*/
|
|
3
9
|
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Custom size in pixels for the icon
|
|
12
|
+
*/
|
|
4
13
|
size?: number;
|
|
5
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Type definition for an icon component
|
|
17
|
+
*/
|
|
6
18
|
export type Icon = FC<IconProps>;
|
|
7
19
|
export declare const Action: Icon;
|
|
8
20
|
export declare const Assistant: Icon;
|
|
@@ -1,11 +1,29 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { IconProps } from './Icons';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Props for the TextButton component
|
|
5
|
+
*/
|
|
6
|
+
export interface TextButtonProps {
|
|
7
|
+
/**
|
|
8
|
+
* Handler function called when the button is clicked
|
|
9
|
+
*/
|
|
4
10
|
onClick?: () => void;
|
|
11
|
+
/**
|
|
12
|
+
* Text to display on the button
|
|
13
|
+
*/
|
|
5
14
|
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Additional CSS classes to apply to the button
|
|
17
|
+
*/
|
|
6
18
|
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Visual style variant of the button
|
|
21
|
+
* Default value is "ghost"
|
|
22
|
+
*/
|
|
7
23
|
type?: "main" | "ghost";
|
|
24
|
+
/**
|
|
25
|
+
* Icon component to display inside the button.
|
|
26
|
+
*/
|
|
8
27
|
Icon: FC<IconProps>;
|
|
9
28
|
}
|
|
10
29
|
export declare const TextButton: FC<TextButtonProps>;
|
|
11
|
-
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -3,16 +3,40 @@ import { Props } from './App';
|
|
|
3
3
|
import { TextButton } from './components/ui/TextButton';
|
|
4
4
|
import { IconButton } from './components/ui/IconButton';
|
|
5
5
|
import { BaseText, SmallText } from './components/ui/Typography';
|
|
6
|
-
import {
|
|
6
|
+
import { CustomCard, CustomCardRow, CustomCardImageRow } from './components/ui/CustomCard';
|
|
7
|
+
import { Carousel } from './components/ui/Carousel';
|
|
8
|
+
import { DateInput } from './components/ui/DateInput';
|
|
7
9
|
import * as Icons from "./components/ui/Icons";
|
|
8
|
-
export { useTouchpointContext } from './context';
|
|
9
10
|
export { default as React } from 'react';
|
|
10
11
|
export declare const html: (strings: TemplateStringsArray, ...values: any[]) => unknown;
|
|
11
|
-
export { TextButton, IconButton, BaseText, SmallText,
|
|
12
|
+
export { TextButton, IconButton, BaseText, SmallText, DateInput, Carousel, CustomCard, CustomCardRow, CustomCardImageRow, Icons, };
|
|
13
|
+
export { type CustomCardProps, type CustomCardRowProps, } from './components/ui/CustomCard';
|
|
14
|
+
export { type DateInputProps } from './components/ui/DateInput';
|
|
15
|
+
export { type IconButtonProps, type IconButtonType, } from './components/ui/IconButton';
|
|
16
|
+
export { type TextButtonProps } from './components/ui/TextButton';
|
|
17
|
+
export { type Props } from './App';
|
|
18
|
+
export { type ColorMode, type Theme, type WindowSize, type CustomModalityComponent, } from './types';
|
|
19
|
+
/**
|
|
20
|
+
* Instance of a Touchpoint UI component
|
|
21
|
+
*/
|
|
12
22
|
export interface TouchpointInstance {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Controls whether the Touchpoint UI is expanded or collapsed
|
|
25
|
+
*/
|
|
26
|
+
expanded: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The conversation handler instance for interacting with the application
|
|
29
|
+
*/
|
|
30
|
+
conversationHandler: ConversationHandler;
|
|
31
|
+
/**
|
|
32
|
+
* Method to remove the Touchpoint UI from the DOM
|
|
33
|
+
*/
|
|
16
34
|
teardown: () => void;
|
|
17
35
|
}
|
|
18
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Creates a new Touchpoint UI instance and appends it to the document body
|
|
38
|
+
* @param props - Configuration props for Touchpoint
|
|
39
|
+
* @returns A promise that resolves to a TouchpointInstance
|
|
40
|
+
*/
|
|
41
|
+
export declare const create: (props: Props) => Promise<TouchpointInstance>;
|
|
42
|
+
export { Container as PreviewContainer } from './preview';
|