@swisper.ai/web-chat-ui 0.2.12 → 0.2.14
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/components/chat-suggestion/chat-suggestion.d.ts +1 -1
- package/dist/components/chat-suggestion/chat-suggestion.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.js +885 -885
- package/dist/index.es.js.map +1 -1
- package/package.json +2 -2
- package/src/components/chat-suggestion/chat-suggestion.json +1 -2
- package/src/components/chat-suggestion/chat-suggestion.tsx +9 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swisper.ai/web-chat-ui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "React components for the Swisper chat: messages, composer and cards",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@swisper.ai/design-system": "0.1.0",
|
|
67
67
|
"@swisper.ai/icons": "0.0.15",
|
|
68
68
|
"@swisper.ai/tailwind-config": "0.0.7",
|
|
69
|
-
"@swisper.ai/ui": "0.4.
|
|
69
|
+
"@swisper.ai/ui": "0.4.11",
|
|
70
70
|
"@swisper.ai/web-core": "0.0.8",
|
|
71
71
|
"@tanstack/react-virtual": "^3.14.5",
|
|
72
72
|
"chroma-js": "^3.2.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"behaviour": {
|
|
66
66
|
"states": ["default", "highlighted (background, actions revealed)", "disabled"],
|
|
67
67
|
"rules": [
|
|
68
|
-
"ChatSuggestions passes each direct child its zero-based index; ChatSuggestionLabelIcon shows index + 1
|
|
68
|
+
"ChatSuggestions passes each direct child its zero-based index; ChatSuggestionLabelIcon shows index + 1 as plain caption text unless it is given an icon as children",
|
|
69
69
|
"A ChatSuggestion only renders inside ChatSuggestions, also when there is one suggestion; on its own it throws",
|
|
70
70
|
"onSelect fires on a click anywhere in the suggestion and on Enter or Space, usually to send its text as the next message",
|
|
71
71
|
"Highlighted means the pointer is over the suggestion or focus is inside it; exactly one suggestion is highlighted at a time, and hovering never pulls focus out of ChatInput",
|
|
@@ -88,7 +88,6 @@
|
|
|
88
88
|
"web-chat-ui/ChatSuggestionActions",
|
|
89
89
|
"web-chat-ui/ChatSuggestionAction",
|
|
90
90
|
"ui/icon-button",
|
|
91
|
-
"ui/order-chip",
|
|
92
91
|
"icon"
|
|
93
92
|
],
|
|
94
93
|
"avoidCombinations": [
|
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
ListItemTitle,
|
|
19
19
|
ListItemTrigger,
|
|
20
20
|
listItemVariants,
|
|
21
|
-
OrderChip,
|
|
22
21
|
Typography,
|
|
23
22
|
type ListItemActionProps,
|
|
24
23
|
type ListItemProps,
|
|
@@ -146,7 +145,7 @@ export interface ChatSuggestionLabelIconProps {
|
|
|
146
145
|
innerClassName?: string;
|
|
147
146
|
}
|
|
148
147
|
|
|
149
|
-
/** The leading slot: the suggestion's number
|
|
148
|
+
/** The leading slot: the suggestion's number, or the icon passed as children. */
|
|
150
149
|
export function ChatSuggestionLabelIcon({
|
|
151
150
|
children,
|
|
152
151
|
className,
|
|
@@ -175,11 +174,14 @@ export function ChatSuggestionLabelIcon({
|
|
|
175
174
|
)}
|
|
176
175
|
>
|
|
177
176
|
{children || (
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
177
|
+
<Typography
|
|
178
|
+
variant="caption-md"
|
|
179
|
+
fontWeight="normal"
|
|
180
|
+
className="text-inherit leading-none"
|
|
181
|
+
asChild
|
|
182
|
+
>
|
|
183
|
+
<span>{index + 1}</span>
|
|
184
|
+
</Typography>
|
|
183
185
|
)}
|
|
184
186
|
</span>
|
|
185
187
|
</span>
|