x-ui-design 0.5.57 → 0.5.59

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/dist/index.esm.js CHANGED
@@ -2910,11 +2910,11 @@ const InputComponent = ({
2910
2910
  }
2911
2911
  inputRef.current?.setSelectionRange(nextCaret, nextCaret);
2912
2912
  });
2913
+ if (rawInput === mask) {
2914
+ rawInput = '';
2915
+ }
2916
+ setMaskValue(rawInput);
2913
2917
  }
2914
- if (rawInput === mask) {
2915
- rawInput = '';
2916
- }
2917
- setMaskValue(rawInput);
2918
2918
  const eventWithMaskedValue = {
2919
2919
  ...e,
2920
2920
  target: {
@@ -2957,7 +2957,7 @@ const InputComponent = ({
2957
2957
  type: iconRenderVisible ? 'text' : 'password'
2958
2958
  } : {}, {
2959
2959
  disabled: disabled,
2960
- value: maskValue,
2960
+ value: maskValue ?? value,
2961
2961
  onChange: handleChange,
2962
2962
  onKeyDown: handleOnKeyDown,
2963
2963
  className: clsx([prefixCls, className])
@@ -3511,7 +3511,8 @@ const SelectComponent = ({
3511
3511
  return;
3512
3512
  }
3513
3513
  const timeout = setTimeout(() => {
3514
- e.target.value = searchInputRef.current?.innerText || e.target.innerText;
3514
+ setSearchFocused(true);
3515
+ e.target.value = (searchInputRef.current?.innerText || e.target.innerText).replace('\n', '');
3515
3516
  setSearchQuery(e.target.value);
3516
3517
  onSearch?.(e.target.value);
3517
3518
  if (e.key === 'Enter' && searchQuery.trim() !== '') {
@@ -3532,6 +3533,7 @@ const SelectComponent = ({
3532
3533
  }
3533
3534
  onChange?.(updatedSelected);
3534
3535
  setSelected(updatedSelected);
3536
+ setSearchFocused(false);
3535
3537
  }
3536
3538
  }
3537
3539
  clearTimeout(timeout);
@@ -3660,6 +3662,7 @@ const SelectComponent = ({
3660
3662
  style: {
3661
3663
  maxHeight: listHeight,
3662
3664
  overflowY: 'auto',
3665
+ // display: !filteredOptions.length && asTag ? 'none' : 'block',
3663
3666
  maxWidth: selectRef.current ? `${selectRef.current.getBoundingClientRect().width}px` : 'inherit'
3664
3667
  }
3665
3668
  }, asTag && !!searchQuery && /*#__PURE__*/React.createElement(Option, {