@xqmsg/ui-core 0.18.6 → 0.18.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,5 +1,5 @@
1
1
  {
2
- "version": "0.18.6",
2
+ "version": "0.18.7",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -21,7 +21,7 @@ export const SpinnerButton: React.FC<SpinnerButtonProps> = ({
21
21
  }) => {
22
22
  return (
23
23
  <Button
24
- spinner={<Spinner size={'sm'} />}
24
+ spinner={<Spinner size={'xs'} />}
25
25
  isLoading={isLoading}
26
26
  onClick={onClick}
27
27
  type={type}
@@ -19,7 +19,18 @@ const StackedInput = React.forwardRef<HTMLInputElement, StackedInputProps>(
19
19
  return (
20
20
  <InputGroup>
21
21
  {leftElement && leftElement}
22
- <Input type={type} isRequired={isRequired} {...props} ref={_ref} />
22
+ <Input
23
+ type={type}
24
+ isRequired={isRequired}
25
+ {...props}
26
+ ref={_ref}
27
+ onKeyDown={e => {
28
+ if (e.key === 'Enter') {
29
+ e.stopPropagation();
30
+ e.preventDefault();
31
+ }
32
+ }}
33
+ />
23
34
  {rightElement && rightElement}
24
35
  </InputGroup>
25
36
  );
@@ -63,6 +63,11 @@ const StackedPilledInput = React.forwardRef<
63
63
  }, [latestTokenElement, watchedValue]);
64
64
 
65
65
  const onHandleKeyDown = (e: React.KeyboardEvent) => {
66
+ if (e.key === 'Enter') {
67
+ e.stopPropagation();
68
+ e.preventDefault();
69
+ }
70
+
66
71
  if (
67
72
  (e.key === ' ' ||
68
73
  e.key === 'Enter' ||
@@ -11,7 +11,19 @@ const StackedTextarea = React.forwardRef<
11
11
  HTMLTextAreaElement,
12
12
  StackedTextareaProps
13
13
  >(({ ...props }, _ref) => {
14
- return <Textarea ref={_ref} {...props} fontSize="13px" />;
14
+ return (
15
+ <Textarea
16
+ ref={_ref}
17
+ {...props}
18
+ fontSize="13px"
19
+ onKeyDown={e => {
20
+ if (e.key === 'Enter') {
21
+ e.stopPropagation();
22
+ e.preventDefault();
23
+ }
24
+ }}
25
+ />
26
+ );
15
27
  });
16
28
 
17
29
  export default StackedTextarea;