@lobehub/ui 1.168.7 → 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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const RightClickIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
- export default RightClickIcon;
2
+ declare const Icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default Icon;
@@ -1,9 +1,10 @@
1
1
  import { createLucideIcon } from 'lucide-react';
2
- var RightClickIcon = createLucideIcon('right-click', [['path', {
2
+ import { KeyMap } from "../type";
3
+ var Icon = createLucideIcon(KeyMap.LeftClick, [['path', {
3
4
  d: 'M19 10a7 7 0 10-14 0v4a7 7 0 1014 0v-4zM2 9.333C2 6.36 3.491 3.71 5.814 2',
4
5
  key: '1'
5
6
  }], ['path', {
6
7
  d: 'M12 4v7H6',
7
8
  key: '2'
8
9
  }]]);
9
- export default RightClickIcon;
10
+ export default Icon;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default Icon;
@@ -0,0 +1,7 @@
1
+ import { createLucideIcon } from 'lucide-react';
2
+ import { KeyMap } from "../type";
3
+ var Icon = createLucideIcon(KeyMap.LeftDoubleClick, [['path', {
4
+ d: 'M19 10v4a7 7 0 11-14 0v-3m0 0v-1a7 7 0 017-7v8H5zM2 9.333C2 6.36 3.491 3.71 5.814 2M20.5 2h1.25c.69 0 1.25.56 1.25 1.25v0c0 .69-.56 1.25-1.25 1.25v0c-.69 0-1.25.56-1.25 1.25V7H23M15 4l3 3M18 4l-3 3',
5
+ key: '1'
6
+ }]]);
7
+ export default Icon;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const RightClickIcon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
- export default RightClickIcon;
2
+ declare const Icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default Icon;
@@ -1,9 +1,10 @@
1
1
  import { createLucideIcon } from 'lucide-react';
2
- var RightClickIcon = createLucideIcon('right-click', [['path', {
2
+ import { KeyMap } from "../type";
3
+ var Icon = createLucideIcon(KeyMap.RightClick, [['path', {
3
4
  d: 'M19 10a7 7 0 10-14 0v4a7 7 0 1014 0v-4zM22 9.333C22 6.36 20.509 3.71 18.186 2',
4
5
  key: '1'
5
6
  }], ['path', {
6
7
  d: 'M12 4v7h6',
7
8
  key: '2'
8
9
  }]]);
9
- export default RightClickIcon;
10
+ export default Icon;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const Icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
3
+ export default Icon;
@@ -0,0 +1,10 @@
1
+ import { createLucideIcon } from 'lucide-react';
2
+ import { KeyMap } from "../type";
3
+ var Icon = createLucideIcon(KeyMap.RightDoubleClick, [['path', {
4
+ d: 'M12 3a7 7 0 017 7v4a7 7 0 11-14 0v-4',
5
+ key: '1'
6
+ }], ['path', {
7
+ d: 'M12 3v8h6.5M22 9.333C22 6.36 20.509 3.71 18.186 2M6.5 2h1.25C8.44 2 9 2.56 9 3.25v0c0 .69-.56 1.25-1.25 1.25v0c-.69 0-1.25.56-1.25 1.25V7H9M1 4l3 3M4 4L1 7',
8
+ key: '2'
9
+ }]]);
10
+ export default Icon;
@@ -20,7 +20,9 @@ import { memo, useEffect, useMemo, useState } from 'react';
20
20
  import { Flexbox } from 'react-layout-kit';
21
21
  import Icon from "../Icon";
22
22
  import LeftClickIcon from "./components/LeftClickIcon";
23
+ import LeftDoubleClickIcon from "./components/LeftDoubleClickIcon";
23
24
  import RightClickIcon from "./components/RightClickIcon";
25
+ import RightDoubleClickIcon from "./components/RightDoubleClickIcon";
24
26
  import { useStyles } from "./style";
25
27
  import { KeyMap } from "./type";
26
28
  import { checkIsAppleDevice, splitKeysByPlus, startCase } from "./utils";
@@ -40,7 +42,7 @@ var mappingKey = function mappingKey(isAppleDevice) {
40
42
  }) : 'Enter'), KeyMap.LeftClick, /*#__PURE__*/_jsx(Icon, {
41
43
  icon: LeftClickIcon,
42
44
  size: {
43
- fontSize: '1.15em',
45
+ fontSize: '1.2em',
44
46
  strokeWidth: 1.75
45
47
  }
46
48
  })), KeyMap.Left, /*#__PURE__*/_jsx(Icon, {
@@ -52,15 +54,27 @@ var mappingKey = function mappingKey(isAppleDevice) {
52
54
  })), KeyMap.MiddleClick, /*#__PURE__*/_jsx(Icon, {
53
55
  icon: MouseIcon,
54
56
  size: {
55
- fontSize: '1.15em',
57
+ fontSize: '1.2em',
56
58
  strokeWidth: 1.75
57
59
  }
58
60
  })), KeyMap.Mod, isAppleDevice ? /*#__PURE__*/_jsx(Icon, {
59
61
  icon: Command
60
- }) : 'Ctrl'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, KeyMap.RightClick, /*#__PURE__*/_jsx(Icon, {
62
+ }) : 'Ctrl'), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, KeyMap.RightClick, /*#__PURE__*/_jsx(Icon, {
61
63
  icon: RightClickIcon,
62
64
  size: {
63
- fontSize: '1.15em',
65
+ fontSize: '1.2em',
66
+ strokeWidth: 1.75
67
+ }
68
+ })), KeyMap.RightDoubleClick, /*#__PURE__*/_jsx(Icon, {
69
+ icon: RightDoubleClickIcon,
70
+ size: {
71
+ fontSize: '1.2em',
72
+ strokeWidth: 1.75
73
+ }
74
+ })), KeyMap.LeftDoubleClick, /*#__PURE__*/_jsx(Icon, {
75
+ icon: LeftDoubleClickIcon,
76
+ size: {
77
+ fontSize: '1.2em',
64
78
  strokeWidth: 1.75
65
79
  }
66
80
  })), KeyMap.Right, /*#__PURE__*/_jsx(Icon, {
@@ -6,11 +6,13 @@ export declare const enum KeyMap {
6
6
  Enter = "enter",
7
7
  Left = "left",
8
8
  LeftClick = "left-click",
9
+ LeftDoubleClick = "left-double-click",
9
10
  Meta = "meta",
10
11
  MiddleClick = "middle-click",
11
12
  Mod = "mod",
12
13
  Right = "right",
13
14
  RightClick = "right-click",
15
+ RightDoubleClick = "right-double-click",
14
16
  Shift = "shift",
15
17
  Space = "space",
16
18
  Tab = "tab",
package/es/Hotkey/type.js CHANGED
@@ -6,11 +6,13 @@ export var KeyMap = {
6
6
  Enter: "enter",
7
7
  Left: "left",
8
8
  LeftClick: "left-click",
9
+ LeftDoubleClick: "left-double-click",
9
10
  Meta: "meta",
10
11
  MiddleClick: "middle-click",
11
12
  Mod: "mod",
12
13
  Right: "right",
13
14
  RightClick: "right-click",
15
+ RightDoubleClick: "right-double-click",
14
16
  Shift: "shift",
15
17
  Space: "space",
16
18
  Tab: "tab",
@@ -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.7",
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",