@xqmsg/ui-core 0.24.5 → 0.24.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.
@@ -9,6 +9,7 @@ export interface StackedPilledInputProps extends InputFieldProps {
9
9
  separators?: string[];
10
10
  variant?: string;
11
11
  label?: string;
12
+ truncatePillLength?: number;
12
13
  }
13
14
  /**
14
15
  * A functional React component utilized to render the `StackedPilledInput` component.
@@ -3,6 +3,7 @@ export interface TokenProps {
3
3
  label: any;
4
4
  onDelete: any;
5
5
  isMobile?: boolean;
6
+ truncateLength?: number;
6
7
  }
7
8
  declare const Token: React.FC<TokenProps>;
8
9
  export default Token;
@@ -25,9 +25,10 @@ export interface InputProps<T extends FieldValues = FieldValues> extends Validat
25
25
  variant?: string;
26
26
  separators?: string[];
27
27
  loadingOptions?: boolean;
28
+ truncatePillLength?: number;
28
29
  }
29
30
  /**
30
31
  * A functional React component utilized to render the `Input` component. Utilizes a switch statement
31
32
  * to render the correct input based on the `inputType`.
32
33
  */
33
- export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, variant, onChange, setValue, setError, clearErrors, separators, loadingOptions, }: InputProps<T>): React.JSX.Element;
34
+ export declare function Input<T extends FieldValues>({ inputType, label, ariaLabel, className, placeholder, name, helperText, options, tooltipText, isInvalid, errorText, isRequired, maxLength, defaultValue, fullOptions, control, disabled, rightElement, leftElement, variant, onChange, setValue, setError, clearErrors, separators, loadingOptions, truncatePillLength, }: InputProps<T>): React.JSX.Element;
@@ -1279,7 +1279,9 @@ var Token = function Token(_ref) {
1279
1279
  var label = _ref.label,
1280
1280
  onDelete = _ref.onDelete,
1281
1281
  _ref$isMobile = _ref.isMobile,
1282
- isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
1282
+ isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
1283
+ _ref$truncateLength = _ref.truncateLength,
1284
+ truncateLength = _ref$truncateLength === void 0 ? 15 : _ref$truncateLength;
1283
1285
  return /*#__PURE__*/React__default.createElement(react.Flex, {
1284
1286
  key: label,
1285
1287
  borderRadius: 'full',
@@ -1298,7 +1300,7 @@ var Token = function Token(_ref) {
1298
1300
  fontSize: isMobile ? '17px' : '13px',
1299
1301
  pr: "4px"
1300
1302
  }, lodash.truncate(label.trim(), {
1301
- length: 15,
1303
+ length: truncateLength,
1302
1304
  omission: '...'
1303
1305
  })), /*#__PURE__*/React__default.createElement(Close, {
1304
1306
  boxSize: isMobile ? '17px' : '11px',
@@ -1363,7 +1365,8 @@ var StackedMultiSelect = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1363
1365
  }
1364
1366
  }, [boundingClientRect]);
1365
1367
  useOnClickOutside(dropdownRef, function () {
1366
- return setIsFocussed(false);
1368
+ setSearchValue('');
1369
+ setIsFocussed(false);
1367
1370
  });
1368
1371
  // gets latest watched form value (common delimited) from RHF state and creates a list
1369
1372
  React.useEffect(function () {
@@ -1611,7 +1614,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1611
1614
  _ref2$separators = _ref2.separators,
1612
1615
  separators = _ref2$separators === void 0 ? ['Enter', ' ', ',', ';', 'Tab'] : _ref2$separators,
1613
1616
  variant = _ref2.variant,
1614
- label = _ref2.label;
1617
+ label = _ref2.label,
1618
+ truncatePillLength = _ref2.truncatePillLength;
1615
1619
  var watchedValue = reactHookForm.useWatch({
1616
1620
  control: control,
1617
1621
  name: name
@@ -1800,7 +1804,7 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1800
1804
  }
1801
1805
  },
1802
1806
  ref: scrollRef,
1803
- zIndex: 100,
1807
+ zIndex: 99,
1804
1808
  onKeyDown: onHandleKeyDown
1805
1809
  }, lastestFormValueToArray.length ? lastestFormValueToArray.map(function (label, index) {
1806
1810
  return /*#__PURE__*/React__default.createElement(react.Box, {
@@ -1820,7 +1824,8 @@ var StackedPilledInput = /*#__PURE__*/React__default.forwardRef(function (_ref2,
1820
1824
  e.preventDefault();
1821
1825
  onRemoveTag(index);
1822
1826
  },
1823
- isMobile: isMobile
1827
+ isMobile: isMobile,
1828
+ truncateLength: truncatePillLength
1824
1829
  }));
1825
1830
  }) : null, !lastestFormValueToArray.length && !isFocussed ? /*#__PURE__*/React__default.createElement(react.Text, {
1826
1831
  color: colors.label.secondary.light,
@@ -1939,7 +1944,8 @@ function Input(_ref) {
1939
1944
  clearErrors = _ref.clearErrors,
1940
1945
  separators = _ref.separators,
1941
1946
  _ref$loadingOptions = _ref.loadingOptions,
1942
- loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions;
1947
+ loadingOptions = _ref$loadingOptions === void 0 ? false : _ref$loadingOptions,
1948
+ truncatePillLength = _ref.truncatePillLength;
1943
1949
  function selectedInputField(onChange, onBlur, ref, value) {
1944
1950
  switch (inputType) {
1945
1951
  case 'text':
@@ -2068,7 +2074,8 @@ function Input(_ref) {
2068
2074
  maxLength: maxLength,
2069
2075
  variant: variant,
2070
2076
  label: label,
2071
- separators: separators
2077
+ separators: separators,
2078
+ truncatePillLength: truncatePillLength
2072
2079
  });
2073
2080
  case 'switch':
2074
2081
  return /*#__PURE__*/React__default.createElement(StackedSwitch, {