@xqmsg/ui-core 0.17.0 → 0.17.1

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.
@@ -2,9 +2,7 @@ import React__default, { memo, forwardRef, createElement, useMemo, useCallback,
2
2
  import { Button as Button$2, Alert as Alert$1, AlertDescription, Flex, Box, Text as Text$2, Spinner, Checkbox, InputGroup, Input as Input$2, RadioGroup, Radio, InputRightElement, Textarea as Textarea$1, useOutsideClick, Switch as Switch$1, FormLabel as FormLabel$1, Tooltip, FormControl, FormErrorMessage, FormHelperText, SimpleGrid, useMediaQuery, Grid, GridItem, IconButton, Collapse, Link as Link$2, Table as Table$2, Tbody, Tr, Td, TableContainer, Thead, Th, Tabs as Tabs$1, TabList, Tab, extendTheme } from '@chakra-ui/react';
3
3
  import { FormProvider, useWatch, Controller } from 'react-hook-form';
4
4
  import { debounce, truncate } from 'lodash-es';
5
- import { Close as Close$1 } from 'src/components/icons/close';
6
5
  import { QuestionOutlineIcon, CloseIcon, HamburgerIcon } from '@chakra-ui/icons';
7
- import colors$1 from 'src/theme/foundations/colors';
8
6
  import { HiOutlineRefresh } from 'react-icons/hi';
9
7
  import { ChakraProvider } from '@chakra-ui/provider';
10
8
  import { createBreakpoints, transparentize, mode, getColor } from '@chakra-ui/theme-tools';
@@ -1072,6 +1070,40 @@ var StackedTextarea = /*#__PURE__*/React__default.forwardRef(function (_ref2, _r
1072
1070
  }));
1073
1071
  });
1074
1072
 
1073
+ var _path$7;
1074
+ function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
1075
+ var SvgClose = function SvgClose(props, ref) {
1076
+ return /*#__PURE__*/createElement("svg", _extends$8({
1077
+ viewBox: "0 0 56 56",
1078
+ fill: "none",
1079
+ xmlns: "http://www.w3.org/2000/svg",
1080
+ ref: ref
1081
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/createElement("path", {
1082
+ fillRule: "evenodd",
1083
+ clipRule: "evenodd",
1084
+ d: "M28 56c15.464 0 28-12.536 28-28S43.463 0 28 0 0 12.536 0 28s12.536 28 28 28Zm-6.02-37.731a2.625 2.625 0 0 0-3.712 3.712L24.288 28l-6.02 6.019a2.625 2.625 0 1 0 3.713 3.712l6.018-6.019 6.02 6.02a2.625 2.625 0 0 0 3.712-3.713L31.71 28l6.02-6.019a2.625 2.625 0 0 0-3.713-3.712L28 24.288l-6.02-6.02Z",
1085
+ fill: "#3C3C43",
1086
+ fillOpacity: 0.6
1087
+ })));
1088
+ };
1089
+ var ForwardRef$7 = /*#__PURE__*/forwardRef(SvgClose);
1090
+ var Memo$7 = /*#__PURE__*/memo(ForwardRef$7);
1091
+
1092
+ /**
1093
+ * A functional React component utilized to render the `Close` icon component
1094
+ */
1095
+
1096
+ var Close = function Close(_ref) {
1097
+ var boxSize = _ref.boxSize,
1098
+ onClick = _ref.onClick;
1099
+ return /*#__PURE__*/React__default.createElement(Memo$7, {
1100
+ width: boxSize,
1101
+ height: boxSize,
1102
+ onClick: onClick,
1103
+ cursor: "pointer"
1104
+ });
1105
+ };
1106
+
1075
1107
  var Token = function Token(_ref) {
1076
1108
  var label = _ref.label,
1077
1109
  onDelete = _ref.onDelete;
@@ -1095,7 +1127,7 @@ var Token = function Token(_ref) {
1095
1127
  }, truncate(label.trim(), {
1096
1128
  length: 15,
1097
1129
  omission: '...'
1098
- })), /*#__PURE__*/React__default.createElement(Close$1, {
1130
+ })), /*#__PURE__*/React__default.createElement(Close, {
1099
1131
  boxSize: "11px",
1100
1132
  onClick: onDelete
1101
1133
  }));
@@ -1475,7 +1507,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1475
1507
  }, [latestTokenElement, watchedValue]);
1476
1508
 
1477
1509
  var onHandleKeyDown = function onHandleKeyDown(e) {
1478
- if (e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') {
1510
+ if ((e.key === ' ' || e.key === 'Enter' || e.key === ',' || e.key === 'Tab') && localValue.trim().length) {
1479
1511
  if (e.key === 'Enter' && !localValue.trim().length && tokenIndex !== null) {
1480
1512
  setLocalValue(lastestFormValueToArray[tokenIndex]);
1481
1513
 
@@ -1977,25 +2009,25 @@ function FormSection(_ref) {
1977
2009
  }));
1978
2010
  }
1979
2011
 
1980
- var _path$7;
1981
- function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
2012
+ var _path$8;
2013
+ function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
1982
2014
  var SvgChevronDown = function SvgChevronDown(props, ref) {
1983
- return /*#__PURE__*/createElement("svg", _extends$8({
2015
+ return /*#__PURE__*/createElement("svg", _extends$9({
1984
2016
  width: 8,
1985
2017
  height: 6,
1986
2018
  viewBox: "0 0 8 6",
1987
2019
  fill: "none",
1988
2020
  xmlns: "http://www.w3.org/2000/svg",
1989
2021
  ref: ref
1990
- }, props), _path$7 || (_path$7 = /*#__PURE__*/createElement("path", {
2022
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/createElement("path", {
1991
2023
  fillRule: "evenodd",
1992
2024
  clipRule: "evenodd",
1993
2025
  d: "M.184.768a.6.6 0 0 1 .849.016L4 3.934 6.968.784a.6.6 0 0 1 .864.832l-3.4 3.6a.6.6 0 0 1-.865 0l-3.4-3.6A.6.6 0 0 1 .185.768Z",
1994
2026
  fill: "#fff"
1995
2027
  })));
1996
2028
  };
1997
- var ForwardRef$7 = /*#__PURE__*/forwardRef(SvgChevronDown);
1998
- var Memo$7 = /*#__PURE__*/memo(ForwardRef$7);
2029
+ var ForwardRef$8 = /*#__PURE__*/forwardRef(SvgChevronDown);
2030
+ var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
1999
2031
 
2000
2032
  /**
2001
2033
  * A functional React component utilized to render the `ChevronDown` icon component
@@ -2003,31 +2035,31 @@ var Memo$7 = /*#__PURE__*/memo(ForwardRef$7);
2003
2035
 
2004
2036
  var ChevronDown = function ChevronDown(_ref) {
2005
2037
  var boxSize = _ref.boxSize;
2006
- return /*#__PURE__*/React__default.createElement(Memo$7, {
2038
+ return /*#__PURE__*/React__default.createElement(Memo$8, {
2007
2039
  boxSize: boxSize,
2008
2040
  fill: colors.fill.action
2009
2041
  });
2010
2042
  };
2011
2043
 
2012
- var _path$8;
2013
- function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
2044
+ var _path$9;
2045
+ function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
2014
2046
  var SvgChevronRight = function SvgChevronRight(props, ref) {
2015
- return /*#__PURE__*/createElement("svg", _extends$9({
2047
+ return /*#__PURE__*/createElement("svg", _extends$a({
2016
2048
  width: 6,
2017
2049
  height: 8,
2018
2050
  viewBox: "0 0 6 8",
2019
2051
  fill: "none",
2020
2052
  xmlns: "http://www.w3.org/2000/svg",
2021
2053
  ref: ref
2022
- }, props), _path$8 || (_path$8 = /*#__PURE__*/createElement("path", {
2054
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/createElement("path", {
2023
2055
  fillRule: "evenodd",
2024
2056
  clipRule: "evenodd",
2025
2057
  d: "M.768 7.816a.6.6 0 0 1 .016-.848L3.934 4 .784 1.032a.6.6 0 0 1 .832-.865l3.6 3.4a.6.6 0 0 1 0 .865l-3.6 3.4a.6.6 0 0 1-.848-.016Z",
2026
2058
  fill: "#fff"
2027
2059
  })));
2028
2060
  };
2029
- var ForwardRef$8 = /*#__PURE__*/forwardRef(SvgChevronRight);
2030
- var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
2061
+ var ForwardRef$9 = /*#__PURE__*/forwardRef(SvgChevronRight);
2062
+ var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2031
2063
 
2032
2064
  /**
2033
2065
  * A functional React component utilized to render the `ChevronRight` icon component
@@ -2035,30 +2067,30 @@ var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
2035
2067
 
2036
2068
  var ChevronRight = function ChevronRight(_ref) {
2037
2069
  var boxSize = _ref.boxSize;
2038
- return /*#__PURE__*/React__default.createElement(Memo$8, {
2070
+ return /*#__PURE__*/React__default.createElement(Memo$9, {
2039
2071
  boxSize: boxSize
2040
2072
  });
2041
2073
  };
2042
2074
 
2043
- var _path$9;
2044
- function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
2075
+ var _path$a;
2076
+ function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
2045
2077
  var SvgClock = function SvgClock(props, ref) {
2046
- return /*#__PURE__*/createElement("svg", _extends$a({
2078
+ return /*#__PURE__*/createElement("svg", _extends$b({
2047
2079
  width: 14,
2048
2080
  height: 14,
2049
2081
  viewBox: "0 0 14 14",
2050
2082
  fill: "none",
2051
2083
  xmlns: "http://www.w3.org/2000/svg",
2052
2084
  ref: ref
2053
- }, props), _path$9 || (_path$9 = /*#__PURE__*/createElement("path", {
2085
+ }, props), _path$a || (_path$a = /*#__PURE__*/createElement("path", {
2054
2086
  d: "M7 3v4h3m3 0A6 6 0 1 1 1 7a6 6 0 0 1 12 0Z",
2055
2087
  stroke: "#0082ff",
2056
2088
  strokeLinecap: "round",
2057
2089
  strokeLinejoin: "round"
2058
2090
  })));
2059
2091
  };
2060
- var ForwardRef$9 = /*#__PURE__*/forwardRef(SvgClock);
2061
- var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2092
+ var ForwardRef$a = /*#__PURE__*/forwardRef(SvgClock);
2093
+ var Memo$a = /*#__PURE__*/memo(ForwardRef$a);
2062
2094
 
2063
2095
  /**
2064
2096
  * A functional React component utilized to render the `Clock` icon component
@@ -2066,41 +2098,8 @@ var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2066
2098
 
2067
2099
  var Clock = function Clock(_ref) {
2068
2100
  var boxSize = _ref.boxSize;
2069
- return /*#__PURE__*/React__default.createElement(Memo$9, {
2070
- boxSize: boxSize
2071
- });
2072
- };
2073
-
2074
- var _path$a;
2075
- function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
2076
- var SvgClose = function SvgClose(props, ref) {
2077
- return /*#__PURE__*/createElement("svg", _extends$b({
2078
- viewBox: "0 0 56 56",
2079
- fill: "none",
2080
- xmlns: "http://www.w3.org/2000/svg",
2081
- ref: ref
2082
- }, props), _path$a || (_path$a = /*#__PURE__*/createElement("path", {
2083
- fillRule: "evenodd",
2084
- clipRule: "evenodd",
2085
- d: "M28 56c15.464 0 28-12.536 28-28S43.463 0 28 0 0 12.536 0 28s12.536 28 28 28Zm-6.02-37.731a2.625 2.625 0 0 0-3.712 3.712L24.288 28l-6.02 6.019a2.625 2.625 0 1 0 3.713 3.712l6.018-6.019 6.02 6.02a2.625 2.625 0 0 0 3.712-3.713L31.71 28l6.02-6.019a2.625 2.625 0 0 0-3.713-3.712L28 24.288l-6.02-6.02Z",
2086
- fill: "#3C3C43",
2087
- fillOpacity: 0.6
2088
- })));
2089
- };
2090
- var ForwardRef$a = /*#__PURE__*/forwardRef(SvgClose);
2091
- var Memo$a = /*#__PURE__*/memo(ForwardRef$a);
2092
-
2093
- /**
2094
- * A functional React component utilized to render the `Close` icon component
2095
- */
2096
-
2097
- var Close = function Close(_ref) {
2098
- var boxSize = _ref.boxSize,
2099
- onClick = _ref.onClick;
2100
2101
  return /*#__PURE__*/React__default.createElement(Memo$a, {
2101
- boxSize: boxSize,
2102
- onClick: onClick,
2103
- cursor: "pointer"
2102
+ boxSize: boxSize
2104
2103
  });
2105
2104
  };
2106
2105
 
@@ -2777,8 +2776,8 @@ var NavigationMenuItem = function NavigationMenuItem(_ref) {
2777
2776
  px: "4px",
2778
2777
  height: "26px",
2779
2778
  width: "204px",
2780
- color: colors$1.label.primary,
2781
- bg: isSelected ? colors$1.fill.light.tertiary : 'transparent',
2779
+ color: colors.label.primary,
2780
+ bg: isSelected ? colors.fill.light.tertiary : 'transparent',
2782
2781
  borderRadius: "4px",
2783
2782
  fontSize: "13px",
2784
2783
  textDecoration: "none",