@tamagui/focus-scope 1.0.1-beta.167 → 1.0.1-beta.168

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/focus-scope",
3
- "version": "1.0.1-beta.167",
3
+ "version": "1.0.1-beta.168",
4
4
  "sideEffects": true,
5
5
  "source": "src/index.ts",
6
6
  "types": "./types/index.d.ts",
@@ -21,15 +21,15 @@
21
21
  "clean:build": "tamagui-build clean:build"
22
22
  },
23
23
  "dependencies": {
24
- "@tamagui/compose-refs": "^1.0.1-beta.167",
25
- "@tamagui/use-event": "^1.0.1-beta.167"
24
+ "@tamagui/compose-refs": "^1.0.1-beta.168",
25
+ "@tamagui/use-event": "^1.0.1-beta.168"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": "*",
29
29
  "react-dom": "*"
30
30
  },
31
31
  "devDependencies": {
32
- "@tamagui/build": "^1.0.1-beta.167",
32
+ "@tamagui/build": "^1.0.1-beta.168",
33
33
  "react": "*",
34
34
  "react-dom": "*"
35
35
  },
@@ -1,9 +1,30 @@
1
1
  import React from 'react';
2
2
  export interface FocusScopeProps {
3
+ /**
4
+ * When `true`, tabbing from last item will focus first tabbable
5
+ * and shift+tab from first item will focus last tababble.
6
+ * @defaultValue false
7
+ */
3
8
  loop?: boolean;
9
+ /**
10
+ * When `true`, focus cannot escape the focus scope via keyboard,
11
+ * pointer, or a programmatic focus.
12
+ * @defaultValue false
13
+ */
4
14
  trapped?: boolean;
15
+ /**
16
+ * Event handler called when auto-focusing on mount.
17
+ * Can be prevented.
18
+ */
5
19
  onMountAutoFocus?: (event: Event) => void;
20
+ /**
21
+ * Event handler called when auto-focusing on unmount.
22
+ * Can be prevented.
23
+ */
6
24
  onUnmountAutoFocus?: (event: Event) => void;
25
+ /**
26
+ * If unmount is animated, you want to force re-focus at start of animation not after
27
+ */
7
28
  forceUnmount?: boolean;
8
29
  children?: React.ReactNode;
9
30
  }