@xqmsg/ui-core 0.17.0 → 0.17.2

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
 
@@ -1916,7 +1948,8 @@ function Input(_ref) {
1916
1948
  id: name,
1917
1949
  isInvalid: isInvalid,
1918
1950
  position: "relative",
1919
- py: (label || helperText || isInvalid) && inputType !== 'checkbox' ? 6 : 0
1951
+ py: label || helperText || isInvalid ? 6 : 0,
1952
+ pb: inputType === 'checkbox' ? 6 : 0
1920
1953
  }, label && inputType !== 'checkbox' && /*#__PURE__*/React__default.createElement(Label$1, {
1921
1954
  tooltipText: tooltipText,
1922
1955
  label: label,
@@ -1977,25 +2010,25 @@ function FormSection(_ref) {
1977
2010
  }));
1978
2011
  }
1979
2012
 
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); }
2013
+ var _path$8;
2014
+ 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
2015
  var SvgChevronDown = function SvgChevronDown(props, ref) {
1983
- return /*#__PURE__*/createElement("svg", _extends$8({
2016
+ return /*#__PURE__*/createElement("svg", _extends$9({
1984
2017
  width: 8,
1985
2018
  height: 6,
1986
2019
  viewBox: "0 0 8 6",
1987
2020
  fill: "none",
1988
2021
  xmlns: "http://www.w3.org/2000/svg",
1989
2022
  ref: ref
1990
- }, props), _path$7 || (_path$7 = /*#__PURE__*/createElement("path", {
2023
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/createElement("path", {
1991
2024
  fillRule: "evenodd",
1992
2025
  clipRule: "evenodd",
1993
2026
  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
2027
  fill: "#fff"
1995
2028
  })));
1996
2029
  };
1997
- var ForwardRef$7 = /*#__PURE__*/forwardRef(SvgChevronDown);
1998
- var Memo$7 = /*#__PURE__*/memo(ForwardRef$7);
2030
+ var ForwardRef$8 = /*#__PURE__*/forwardRef(SvgChevronDown);
2031
+ var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
1999
2032
 
2000
2033
  /**
2001
2034
  * A functional React component utilized to render the `ChevronDown` icon component
@@ -2003,31 +2036,31 @@ var Memo$7 = /*#__PURE__*/memo(ForwardRef$7);
2003
2036
 
2004
2037
  var ChevronDown = function ChevronDown(_ref) {
2005
2038
  var boxSize = _ref.boxSize;
2006
- return /*#__PURE__*/React__default.createElement(Memo$7, {
2039
+ return /*#__PURE__*/React__default.createElement(Memo$8, {
2007
2040
  boxSize: boxSize,
2008
2041
  fill: colors.fill.action
2009
2042
  });
2010
2043
  };
2011
2044
 
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); }
2045
+ var _path$9;
2046
+ 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
2047
  var SvgChevronRight = function SvgChevronRight(props, ref) {
2015
- return /*#__PURE__*/createElement("svg", _extends$9({
2048
+ return /*#__PURE__*/createElement("svg", _extends$a({
2016
2049
  width: 6,
2017
2050
  height: 8,
2018
2051
  viewBox: "0 0 6 8",
2019
2052
  fill: "none",
2020
2053
  xmlns: "http://www.w3.org/2000/svg",
2021
2054
  ref: ref
2022
- }, props), _path$8 || (_path$8 = /*#__PURE__*/createElement("path", {
2055
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/createElement("path", {
2023
2056
  fillRule: "evenodd",
2024
2057
  clipRule: "evenodd",
2025
2058
  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
2059
  fill: "#fff"
2027
2060
  })));
2028
2061
  };
2029
- var ForwardRef$8 = /*#__PURE__*/forwardRef(SvgChevronRight);
2030
- var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
2062
+ var ForwardRef$9 = /*#__PURE__*/forwardRef(SvgChevronRight);
2063
+ var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2031
2064
 
2032
2065
  /**
2033
2066
  * A functional React component utilized to render the `ChevronRight` icon component
@@ -2035,30 +2068,30 @@ var Memo$8 = /*#__PURE__*/memo(ForwardRef$8);
2035
2068
 
2036
2069
  var ChevronRight = function ChevronRight(_ref) {
2037
2070
  var boxSize = _ref.boxSize;
2038
- return /*#__PURE__*/React__default.createElement(Memo$8, {
2071
+ return /*#__PURE__*/React__default.createElement(Memo$9, {
2039
2072
  boxSize: boxSize
2040
2073
  });
2041
2074
  };
2042
2075
 
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); }
2076
+ var _path$a;
2077
+ 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
2078
  var SvgClock = function SvgClock(props, ref) {
2046
- return /*#__PURE__*/createElement("svg", _extends$a({
2079
+ return /*#__PURE__*/createElement("svg", _extends$b({
2047
2080
  width: 14,
2048
2081
  height: 14,
2049
2082
  viewBox: "0 0 14 14",
2050
2083
  fill: "none",
2051
2084
  xmlns: "http://www.w3.org/2000/svg",
2052
2085
  ref: ref
2053
- }, props), _path$9 || (_path$9 = /*#__PURE__*/createElement("path", {
2086
+ }, props), _path$a || (_path$a = /*#__PURE__*/createElement("path", {
2054
2087
  d: "M7 3v4h3m3 0A6 6 0 1 1 1 7a6 6 0 0 1 12 0Z",
2055
2088
  stroke: "#0082ff",
2056
2089
  strokeLinecap: "round",
2057
2090
  strokeLinejoin: "round"
2058
2091
  })));
2059
2092
  };
2060
- var ForwardRef$9 = /*#__PURE__*/forwardRef(SvgClock);
2061
- var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2093
+ var ForwardRef$a = /*#__PURE__*/forwardRef(SvgClock);
2094
+ var Memo$a = /*#__PURE__*/memo(ForwardRef$a);
2062
2095
 
2063
2096
  /**
2064
2097
  * A functional React component utilized to render the `Clock` icon component
@@ -2066,41 +2099,8 @@ var Memo$9 = /*#__PURE__*/memo(ForwardRef$9);
2066
2099
 
2067
2100
  var Clock = function Clock(_ref) {
2068
2101
  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
2102
  return /*#__PURE__*/React__default.createElement(Memo$a, {
2101
- boxSize: boxSize,
2102
- onClick: onClick,
2103
- cursor: "pointer"
2103
+ boxSize: boxSize
2104
2104
  });
2105
2105
  };
2106
2106
 
@@ -2777,8 +2777,8 @@ var NavigationMenuItem = function NavigationMenuItem(_ref) {
2777
2777
  px: "4px",
2778
2778
  height: "26px",
2779
2779
  width: "204px",
2780
- color: colors$1.label.primary,
2781
- bg: isSelected ? colors$1.fill.light.tertiary : 'transparent',
2780
+ color: colors.label.primary,
2781
+ bg: isSelected ? colors.fill.light.tertiary : 'transparent',
2782
2782
  borderRadius: "4px",
2783
2783
  fontSize: "13px",
2784
2784
  textDecoration: "none",