@acrool/react-picker 0.0.5-alpha.0 → 0.0.6-alpha.0

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.
@@ -5484,9 +5484,9 @@ function Hf(t) {
5484
5484
  }
5485
5485
  var Yf = Hf();
5486
5486
  const Xs = ({
5487
- onKeydown: t
5488
- }) => (ut(() => (document.addEventListener("keydown", t), () => {
5489
- document.removeEventListener("keydown", t);
5487
+ onKeyUp: t
5488
+ }) => (ut(() => (document.addEventListener("keyup", t), () => {
5489
+ document.removeEventListener("keyup", t);
5490
5490
  }), []), null), qs = ({
5491
5491
  onMousedown: t
5492
5492
  }) => (ut(() => (document.addEventListener("mousedown", t), () => {
@@ -5597,7 +5597,7 @@ function fh(t, e) {
5597
5597
  onChange: f
5598
5598
  },
5599
5599
  children: /* @__PURE__ */ O.jsxs("div", { className: dn.root, children: [
5600
- /* @__PURE__ */ O.jsx("div", { ref: p, className: dn.mainEl, onKeyDown: C, children: /* @__PURE__ */ O.jsx(
5600
+ /* @__PURE__ */ O.jsx("div", { ref: p, className: dn.mainEl, onKeyUp: C, children: /* @__PURE__ */ O.jsx(
5601
5601
  n,
5602
5602
  {
5603
5603
  ...s,
@@ -5622,8 +5622,8 @@ function fh(t, e) {
5622
5622
  r && /* @__PURE__ */ O.jsx(Xf, { onPickerHide: v }),
5623
5623
  r && /* @__PURE__ */ O.jsx(qs, { onMousedown: y }),
5624
5624
  l && /* @__PURE__ */ O.jsx(qs, { onMousedown: x }),
5625
- l && /* @__PURE__ */ O.jsx(Xs, { onKeydown: b }),
5626
- l && /* @__PURE__ */ O.jsx(Xs, { onKeydown: P })
5625
+ l && /* @__PURE__ */ O.jsx(Xs, { onKeyUp: b }),
5626
+ l && /* @__PURE__ */ O.jsx(Xs, { onKeyUp: P })
5627
5627
  ] })
5628
5628
  }
5629
5629
  );
@@ -1,10 +1,10 @@
1
1
  interface HotkeyListenerProps {
2
- onKeydown: (e: KeyboardEvent) => void;
2
+ onKeyUp: (e: KeyboardEvent) => void;
3
3
  }
4
4
  /**
5
5
  * 透過 mount unmount 註冊 keydown 事件
6
6
  * @param onKeydown
7
7
  * @constructor
8
8
  */
9
- declare const HotkeyListener: ({ onKeydown }: HotkeyListenerProps) => null;
9
+ declare const HotkeyListener: ({ onKeyUp }: HotkeyListenerProps) => null;
10
10
  export default HotkeyListener;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.5-alpha.0",
3
+ "version": "0.0.6-alpha.0",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",