@aortl/admin-react 0.18.5 → 0.19.1

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,4 @@
1
+ import { Ref } from 'react';
1
2
  import { HotkeyHandler } from './hotkey-registry';
2
3
  export interface HotkeyOptions {
3
4
  /** When false, the binding is not registered. Defaults to true. */
@@ -16,4 +17,13 @@ export interface HotkeyInfo {
16
17
  * no-op, so the hook is safe to call unconditionally.
17
18
  */
18
19
  export declare function useHotkey(keys: string | readonly string[] | null | undefined, handler: HotkeyHandler, options?: HotkeyOptions): HotkeyInfo;
20
+ /**
21
+ * `useHotkey` bound to a rendered element: the chord dispatches a native
22
+ * `.click()`, so `onClick` fires, `type="submit"` submits, an anchor
23
+ * navigates. Returns `setRef` to pass as the element's ref; it latches the
24
+ * element and forwards `ref`.
25
+ */
26
+ export declare function useHotkeyClick<E extends HTMLElement>(keys: string | readonly string[] | null | undefined, ref: Ref<E> | undefined, options?: HotkeyOptions): HotkeyInfo & {
27
+ setRef: (node: E | null) => void;
28
+ };
19
29
  //# sourceMappingURL=useHotkey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useHotkey.d.ts","sourceRoot":"","sources":["../src/useHotkey.ts"],"names":[],"mappings":"AAEA,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnF,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,wGAAwG;IACxG,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EACnD,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,aAAa,GACtB,UAAU,CA6BZ"}
1
+ {"version":3,"file":"useHotkey.d.ts","sourceRoot":"","sources":["../src/useHotkey.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAA8B,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnF,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,wGAAwG;IACxG,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EACnD,OAAO,EAAE,aAAa,EACtB,OAAO,CAAC,EAAE,aAAa,GACtB,UAAU,CA6BZ;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAClD,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,EACnD,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,EACvB,OAAO,CAAC,EAAE,aAAa,GACtB,UAAU,GAAG;IAAE,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAA;CAAE,CAanD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aortl/admin-react",
3
- "version": "0.18.5",
3
+ "version": "0.19.1",
4
4
  "description": "React component library for the admin design system. Pairs with @aortl/admin-css.",
5
5
  "keywords": [
6
6
  "components",
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "@base-ui/react": "1.4.1",
45
45
  "clsx": "2.1.1",
46
- "@aortl/admin-css": "0.18.5"
46
+ "@aortl/admin-css": "0.19.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@testing-library/dom": "10.4.1",