@veracity/vui 2.26.0-beta.6 → 2.26.0-beta.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.26.0-beta.6",
3
+ "version": "2.26.0-beta.7",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
package/src/chat/chat.tsx CHANGED
@@ -74,7 +74,6 @@ export const Chat = vui<'div', ChatProps>((props, ref) => {
74
74
  onStop={onStop}
75
75
  processingMessage={processingMessage}
76
76
  status={inputStatus}
77
- value=""
78
77
  />
79
78
  </Box>
80
79
  </Box>
@@ -15,7 +15,7 @@ export type ChatProps = Omit<BoxProps, 'size' | 'variant'> &
15
15
  inputStatus?: ChatInputStatus
16
16
  /** An array of chat messages */
17
17
  messages?: MessageProps[]
18
- /** Optional string indicating a help text */
18
+ /** Optional string indicating a help text under the input */
19
19
  helpText?: string
20
20
  /** Max height for the textarea @default 120 */
21
21
  maxTextareaHeight?: number
@@ -34,7 +34,7 @@ const CustomTextarea = styled.textareaBox`
34
34
  }
35
35
  `
36
36
  /**
37
- * Displays a chat interface with messages and actions.
37
+ * Displays a chat input interface.
38
38
  */
39
39
  export const ChatInput = vui<'input', ChatInputProps>((props, ref) => {
40
40
  const {
@@ -43,18 +43,17 @@ export const ChatInput = vui<'input', ChatInputProps>((props, ref) => {
43
43
  status = ChatInputStatus.Default,
44
44
  maxTextareaHeight = 120,
45
45
  processingMessage = 'Generating message',
46
- value: valueProp,
47
46
  onNewTopicClick,
48
47
  onSend,
49
48
  onStop,
50
49
  ...rest
51
50
  } = props
52
51
 
53
- const [value, setValue] = useState<string | undefined>(valueProp as string)
52
+ const [value, setValue] = useState<string>('')
54
53
  const styles = useStyleConfig('Chat', props)
55
54
 
56
55
  useEffect(() => {
57
- if (status === ChatInputStatus.Default) setValue(valueProp as string)
56
+ if (status === ChatInputStatus.Default) setValue('')
58
57
  }, [status])
59
58
 
60
59
  const onKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {