@xqmsg/ui-core 0.18.6 → 0.18.8

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.
@@ -3,6 +3,7 @@ import { Button as Button$2, Alert as Alert$1, AlertDescription, Flex, Box, Text
3
3
  import { FormProvider, useWatch, Controller } from 'react-hook-form';
4
4
  import { debounce, truncate } from 'lodash-es';
5
5
  import { QuestionOutlineIcon, CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
6
+ import { Link as Link$3 } from 'react-router-dom';
6
7
  import { HiOutlineRefresh } from 'react-icons/hi';
7
8
  import { ChakraProvider } from '@chakra-ui/provider';
8
9
  import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
@@ -587,7 +588,7 @@ var SpinnerButton = function SpinnerButton(_ref) {
587
588
  className = _ref.className;
588
589
  return /*#__PURE__*/React__default.createElement(Button$2, {
589
590
  spinner: /*#__PURE__*/React__default.createElement(Spinner, {
590
- size: 'sm'
591
+ size: 'xs'
591
592
  }),
592
593
  isLoading: isLoading,
593
594
  onClick: onClick,
@@ -687,7 +688,13 @@ var StackedInput = /*#__PURE__*/React__default.forwardRef(function (_ref2, _ref)
687
688
  type: type,
688
689
  isRequired: isRequired
689
690
  }, props, {
690
- ref: _ref
691
+ ref: _ref,
692
+ onKeyDown: function onKeyDown(e) {
693
+ if (e.key === 'Enter') {
694
+ e.stopPropagation();
695
+ e.preventDefault();
696
+ }
697
+ }
691
698
  })), rightElement && rightElement);
692
699
  });
693
700
 
@@ -1067,7 +1074,13 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
1067
1074
  return /*#__PURE__*/React__default.createElement(Textarea$1, Object.assign({
1068
1075
  ref: _ref
1069
1076
  }, props, {
1070
- fontSize: "13px"
1077
+ fontSize: "13px",
1078
+ onKeyDown: function onKeyDown(e) {
1079
+ if (e.key === 'Enter') {
1080
+ e.stopPropagation();
1081
+ e.preventDefault();
1082
+ }
1083
+ }
1071
1084
  }));
1072
1085
  });
1073
1086
 
@@ -1508,6 +1521,11 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1508
1521
  }, [latestTokenElement, watchedValue]);
1509
1522
 
1510
1523
  var onHandleKeyDown = function onHandleKeyDown(e) {
1524
+ if (e.key === 'Enter') {
1525
+ e.stopPropagation();
1526
+ e.preventDefault();
1527
+ }
1528
+
1511
1529
  if ((e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') && localValue.trim().length) {
1512
1530
  if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
1513
1531
  setLocalValue(lastestFormValueToArray[tokenIndex]);
@@ -2839,22 +2857,31 @@ var NavigationMenuItem = function NavigationMenuItem(_ref) {
2839
2857
  var label = _ref.label,
2840
2858
  leftIcon = _ref.leftIcon,
2841
2859
  href = _ref.href,
2860
+ to = _ref.to,
2842
2861
  rightIcon = _ref.rightIcon,
2843
2862
  isExternal = _ref.isExternal,
2844
2863
  isSelected = _ref.isSelected,
2845
2864
  onClick = _ref.onClick;
2846
2865
  var additionalProps = {};
2866
+ var reactRouterLinkProps = {};
2867
+
2868
+ if (to) {
2869
+ reactRouterLinkProps = {
2870
+ to: to,
2871
+ as: Link$3
2872
+ };
2873
+ }
2847
2874
 
2848
2875
  if (isExternal) {
2849
2876
  additionalProps = _extends$6({}, additionalProps, {
2850
2877
  referrerPolicy: 'no-referrer',
2851
- target: '_blank'
2878
+ target: '_blank',
2879
+ href: href,
2880
+ isExternal: true
2852
2881
  });
2853
2882
  }
2854
2883
 
2855
- return /*#__PURE__*/React__default.createElement(Link$2, Object.assign({
2856
- href: href
2857
- }, additionalProps, {
2884
+ return /*#__PURE__*/React__default.createElement(Link$2, Object.assign({}, reactRouterLinkProps, additionalProps, {
2858
2885
  onClick: onClick,
2859
2886
  display: "flex",
2860
2887
  alignItems: "center",