@lobehub/ui 1.168.8 → 1.168.9

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.
@@ -35,7 +35,7 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
35
35
  placeholder = _ref.placeholder,
36
36
  enableShortKey = _ref.enableShortKey,
37
37
  _ref$shortKey = _ref.shortKey,
38
- shortKey = _ref$shortKey === void 0 ? 'f' : _ref$shortKey,
38
+ shortKey = _ref$shortKey === void 0 ? 'mod+k' : _ref$shortKey,
39
39
  onSearch = _ref.onSearch,
40
40
  loading = _ref.loading,
41
41
  style = _ref.style,
@@ -68,8 +68,8 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
68
68
  styles = _useStyles.styles,
69
69
  cx = _useStyles.cx;
70
70
  var inputReference = useRef(null);
71
- var hotKey = ['mod', shortKey.toLowerCase()].join('+');
72
- useHotkeys(hotKey, function () {
71
+ var hotkey = shortKey.includes('+') ? shortKey : "mod+".concat(shortKey);
72
+ useHotkeys(hotkey, function () {
73
73
  var _inputReference$curre;
74
74
  if (!enableShortKey) return;
75
75
  (_inputReference$curre = inputReference.current) === null || _inputReference$curre === void 0 || _inputReference$curre.focus();
@@ -124,7 +124,7 @@ var SearchBar = /*#__PURE__*/memo(function (_ref) {
124
124
  }, rest)), enableShortKey && showTag && !inputValue && /*#__PURE__*/_jsx(Hotkey, {
125
125
  className: cx(styles.tag, shortKeyClassName),
126
126
  compact: true,
127
- keys: hotKey,
127
+ keys: hotkey,
128
128
  style: shortKeyStyle
129
129
  })]
130
130
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "1.168.8",
3
+ "version": "1.168.9",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",