@fluentui-react-native/focus-trap-zone 0.11.14 → 0.12.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.
- package/CHANGELOG.json +30 -0
- package/CHANGELOG.md +17 -1
- package/lib/FocusTrapZone.d.ts +5 -0
- package/lib/FocusTrapZone.d.ts.map +1 -1
- package/lib/FocusTrapZone.js +6 -2
- package/lib/FocusTrapZone.js.map +1 -1
- package/lib/FocusTrapZoneNativeComponent.d.ts +37 -0
- package/lib/FocusTrapZoneNativeComponent.d.ts.map +1 -0
- package/lib/FocusTrapZoneNativeComponent.js +8 -0
- package/lib/FocusTrapZoneNativeComponent.js.map +1 -0
- package/lib-commonjs/FocusTrapZone.d.ts +5 -0
- package/lib-commonjs/FocusTrapZone.d.ts.map +1 -1
- package/lib-commonjs/FocusTrapZone.js +10 -3
- package/lib-commonjs/FocusTrapZone.js.map +1 -1
- package/lib-commonjs/FocusTrapZoneNativeComponent.d.ts +37 -0
- package/lib-commonjs/FocusTrapZoneNativeComponent.d.ts.map +1 -0
- package/lib-commonjs/FocusTrapZoneNativeComponent.js +13 -0
- package/lib-commonjs/FocusTrapZoneNativeComponent.js.map +1 -0
- package/package.json +14 -14
- package/src/FocusTrapZone.ts +7 -3
- package/src/FocusTrapZoneNativeComponent.ts +41 -0
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/focus-trap-zone",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Thu, 11 Apr 2024 18:02:34 GMT",
|
|
6
|
+
"version": "0.12.0",
|
|
7
|
+
"tag": "@fluentui-react-native/focus-trap-zone_v0.12.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@fluentui-react-native/focus-trap-zone",
|
|
13
|
+
"commit": "6164473627c321b03d301376c48227f4abd8e947",
|
|
14
|
+
"comment": "Update to RN 0.73"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 29 Mar 2024 18:07:00 GMT",
|
|
21
|
+
"version": "0.11.15",
|
|
22
|
+
"tag": "@fluentui-react-native/focus-trap-zone_v0.11.15",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
27
|
+
"package": "@fluentui-react-native/focus-trap-zone",
|
|
28
|
+
"commit": "a722aa94799f4afee55baa03a5a754b0d4b2fdce",
|
|
29
|
+
"comment": "Use codegenNativeComponent so JS View configs can be generated for all native components"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
4
34
|
{
|
|
5
35
|
"date": "Fri, 15 Mar 2024 16:26:19 GMT",
|
|
6
36
|
"version": "0.11.13",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/focus-trap-zone
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 11 Apr 2024 18:02:34 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.12.0
|
|
8
|
+
|
|
9
|
+
Thu, 11 Apr 2024 18:02:34 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- Update to RN 0.73 (30809111+acoates-ms@users.noreply.github.com)
|
|
14
|
+
|
|
15
|
+
## 0.11.15
|
|
16
|
+
|
|
17
|
+
Fri, 29 Mar 2024 18:07:00 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Use codegenNativeComponent so JS View configs can be generated for all native components (30809111+acoates-ms@users.noreply.github.com)
|
|
22
|
+
|
|
7
23
|
## 0.11.13
|
|
8
24
|
|
|
9
25
|
Fri, 15 Mar 2024 16:26:19 GMT
|
package/lib/FocusTrapZone.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
1
6
|
/// <reference types="react" />
|
|
2
7
|
import type { IFocusTrapZoneProps, IFocusTrapZoneSlotProps } from './FocusTrapZone.types';
|
|
3
8
|
export declare function filterOutComponentRef(propName: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZone.d.ts","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusTrapZone.d.ts","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAOH,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAsB,MAAM,uBAAuB,CAAC;AAG9G,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,eAAO,MAAM,aAAa,8YAUxB,CAAC"}
|
package/lib/FocusTrapZone.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
1
6
|
var __assign = (this && this.__assign) || function () {
|
|
2
7
|
__assign = Object.assign || function(t) {
|
|
3
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,11 +14,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
14
|
};
|
|
10
15
|
return __assign.apply(this, arguments);
|
|
11
16
|
};
|
|
12
|
-
import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
|
|
13
17
|
import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
14
18
|
import { composable } from '@uifabricshared/foundation-composable';
|
|
15
19
|
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
16
|
-
|
|
20
|
+
import RCTFocusTrapZone from './FocusTrapZoneNativeComponent';
|
|
17
21
|
export function filterOutComponentRef(propName) {
|
|
18
22
|
return propName !== 'componentRef';
|
|
19
23
|
}
|
package/lib/FocusTrapZone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAE9D,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,OAAO,QAAQ,KAAK,cAAc,CAAC;AACrC,CAAC;AAED,MAAM,CAAC,IAAM,aAAa,GAAG,UAAU,CAAqB;IAC1D,eAAe,EAAE,UAAC,SAA8B,EAAE,UAA2C;QAC3F,IAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3D,OAAO;YACL,SAAS,EAAE,aAAa,CAA0B,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,wBAAO,SAAS,KAAE,GAAG,EAAE,MAAM,GAAE,EAAE,CAAC;SAClH,CAAC;IACJ,CAAC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE;KACpE;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
export interface NativeProps extends ViewProps {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies whether the FocusTrapZone's focus trapping behavior is disabled. True, if disabled.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies whether the FocusTrapZone takes focus on render. True, if taking focus is disabled.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
disableFirstFocus?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Determines which element receives focus when focus moves into the FocusTrapZone. If false, the first focusable descendant gets focus.
|
|
20
|
+
* If true, the element that was focused when the FocusTrapZone last had a focused descendant is chosen. If it has never had a focused
|
|
21
|
+
* descendant before, then the first focusable descendant gets focus.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
focusPreviouslyFocusedInnerElement?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* By default, when the FocusTrapZone is unmounted or disabled focus returns to the element outside the FocusTrapZone that last had
|
|
27
|
+
* focus. Setting this to true disables this behavior, so the UI behaves as it normally would: If the FocusTrapZone is disabled, focus
|
|
28
|
+
* remains on the control inside the FocusTrapZone. If the FocusTrapZone is unmounted, focus usually moves to the nearest focusable
|
|
29
|
+
* control, but this can vary.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
ignoreExternalFocusing?: boolean;
|
|
33
|
+
forceFocusInsideTrap?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: HostComponent<NativeProps>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=FocusTrapZoneNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneNativeComponent.d.ts","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;;AAED,wBAAqG"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
+
export default codegenNativeComponent('RCTFocusTrapZone');
|
|
8
|
+
//# sourceMappingURL=FocusTrapZoneNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;AAgC7F,eAAe,sBAAsB,CAAc,kBAAkB,CAA+B,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
1
6
|
/// <reference types="react" />
|
|
2
7
|
import type { IFocusTrapZoneProps, IFocusTrapZoneSlotProps } from './FocusTrapZone.types';
|
|
3
8
|
export declare function filterOutComponentRef(propName: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZone.d.ts","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusTrapZone.d.ts","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"AAAA;;;;GAIG;;AAOH,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAsB,MAAM,uBAAuB,CAAC;AAG9G,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE/D;AAED,eAAO,MAAM,aAAa,8YAUxB,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
2
7
|
var __assign = (this && this.__assign) || function () {
|
|
3
8
|
__assign = Object.assign || function(t) {
|
|
4
9
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -10,13 +15,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
15
|
};
|
|
11
16
|
return __assign.apply(this, arguments);
|
|
12
17
|
};
|
|
18
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
+
};
|
|
13
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
22
|
exports.FocusTrapZone = exports.filterOutComponentRef = void 0;
|
|
15
|
-
var component_cache_1 = require("@fluentui-react-native/component-cache");
|
|
16
23
|
var interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
|
|
17
24
|
var foundation_composable_1 = require("@uifabricshared/foundation-composable");
|
|
18
25
|
var foundation_settings_1 = require("@uifabricshared/foundation-settings");
|
|
19
|
-
var
|
|
26
|
+
var FocusTrapZoneNativeComponent_1 = __importDefault(require("./FocusTrapZoneNativeComponent"));
|
|
20
27
|
function filterOutComponentRef(propName) {
|
|
21
28
|
return propName !== 'componentRef';
|
|
22
29
|
}
|
|
@@ -29,7 +36,7 @@ exports.FocusTrapZone = (0, foundation_composable_1.composable)({
|
|
|
29
36
|
};
|
|
30
37
|
},
|
|
31
38
|
slots: {
|
|
32
|
-
root: { slotType:
|
|
39
|
+
root: { slotType: FocusTrapZoneNativeComponent_1.default, filter: filterOutComponentRef },
|
|
33
40
|
},
|
|
34
41
|
});
|
|
35
42
|
//# sourceMappingURL=FocusTrapZone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;AAEH,8EAA+E;AAE/E,+EAAmE;AACnE,2EAAoE;AAGpE,gGAA8D;AAE9D,SAAgB,qBAAqB,CAAC,QAAgB;IACpD,OAAO,QAAQ,KAAK,cAAc,CAAC;AACrC,CAAC;AAFD,sDAEC;AAEY,QAAA,aAAa,GAAG,IAAA,kCAAU,EAAqB;IAC1D,eAAe,EAAE,UAAC,SAA8B,EAAE,UAA2C;QAC3F,IAAM,MAAM,GAAG,IAAA,uCAAmB,EAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3D,OAAO;YACL,SAAS,EAAE,IAAA,mCAAa,EAA0B,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,wBAAO,SAAS,KAAE,GAAG,EAAE,MAAM,GAAE,EAAE,CAAC;SAClH,CAAC;IACJ,CAAC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,sCAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE;KACpE;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
export interface NativeProps extends ViewProps {
|
|
8
|
+
/**
|
|
9
|
+
* Specifies whether the FocusTrapZone's focus trapping behavior is disabled. True, if disabled.
|
|
10
|
+
* @default false
|
|
11
|
+
*/
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies whether the FocusTrapZone takes focus on render. True, if taking focus is disabled.
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
disableFirstFocus?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Determines which element receives focus when focus moves into the FocusTrapZone. If false, the first focusable descendant gets focus.
|
|
20
|
+
* If true, the element that was focused when the FocusTrapZone last had a focused descendant is chosen. If it has never had a focused
|
|
21
|
+
* descendant before, then the first focusable descendant gets focus.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
focusPreviouslyFocusedInnerElement?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* By default, when the FocusTrapZone is unmounted or disabled focus returns to the element outside the FocusTrapZone that last had
|
|
27
|
+
* focus. Setting this to true disables this behavior, so the UI behaves as it normally would: If the FocusTrapZone is disabled, focus
|
|
28
|
+
* remains on the control inside the FocusTrapZone. If the FocusTrapZone is unmounted, focus usually moves to the nearest focusable
|
|
29
|
+
* control, but this can vary.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
ignoreExternalFocusing?: boolean;
|
|
33
|
+
forceFocusInsideTrap?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: HostComponent<NativeProps>;
|
|
36
|
+
export default _default;
|
|
37
|
+
//# sourceMappingURL=FocusTrapZoneNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneNativeComponent.d.ts","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;;OAKG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7C;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;;AAED,wBAAqG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
* @format
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
var codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
12
|
+
exports.default = (0, codegenNativeComponent_1.default)('RCTFocusTrapZone');
|
|
13
|
+
//# sourceMappingURL=FocusTrapZoneNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusTrapZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAIH,mHAA6F;AAgC7F,kBAAe,IAAA,gCAAsB,EAAc,kBAAkB,CAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/focus-trap-zone",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "A cross-platform FocusTrapZone component using the Fluent Design System",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -22,26 +22,26 @@
|
|
|
22
22
|
"directory": "packages/components/FocusTrapZone"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@fluentui-react-native/adapters": "0.
|
|
26
|
-
"@fluentui-react-native/
|
|
27
|
-
"@
|
|
28
|
-
"@uifabricshared/foundation-
|
|
29
|
-
"@uifabricshared/foundation-settings": "0.14.1"
|
|
25
|
+
"@fluentui-react-native/adapters": "0.13.0",
|
|
26
|
+
"@fluentui-react-native/interactive-hooks": "0.27.0",
|
|
27
|
+
"@uifabricshared/foundation-composable": "0.13.0",
|
|
28
|
+
"@uifabricshared/foundation-settings": "0.15.0"
|
|
30
29
|
},
|
|
31
30
|
"devDependencies": {
|
|
32
31
|
"@fluentui-react-native/eslint-config-rules": "0.1.1",
|
|
33
32
|
"@fluentui-react-native/scripts": "0.1.1",
|
|
34
|
-
"@office-iss/react-native-win32": "^0.
|
|
35
|
-
"@react-native/
|
|
33
|
+
"@office-iss/react-native-win32": "^0.73.0",
|
|
34
|
+
"@react-native/babel-preset": "^0.73.0",
|
|
35
|
+
"@react-native/metro-config": "^0.73.0",
|
|
36
36
|
"react": "18.2.0",
|
|
37
|
-
"react-native": "^0.
|
|
37
|
+
"react-native": "^0.73.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@office-iss/react-native-win32": "^0.
|
|
40
|
+
"@office-iss/react-native-win32": "^0.73.0",
|
|
41
41
|
"react": "18.2.0",
|
|
42
|
-
"react-native": "^0.
|
|
43
|
-
"react-native-macos": "^0.
|
|
44
|
-
"react-native-windows": "^0.
|
|
42
|
+
"react-native": "^0.73.0",
|
|
43
|
+
"react-native-macos": "^0.73.0",
|
|
44
|
+
"react-native-windows": "^0.73.0"
|
|
45
45
|
},
|
|
46
46
|
"author": "",
|
|
47
47
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"microsoft/react-native"
|
|
53
53
|
],
|
|
54
54
|
"requirements": [
|
|
55
|
-
"react-native@0.
|
|
55
|
+
"react-native@0.73"
|
|
56
56
|
],
|
|
57
57
|
"capabilities": [
|
|
58
58
|
"core",
|
package/src/FocusTrapZone.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
|
|
2
7
|
import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
3
8
|
import type { IUseStyling } from '@uifabricshared/foundation-composable';
|
|
4
9
|
import { composable } from '@uifabricshared/foundation-composable';
|
|
5
10
|
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
6
11
|
|
|
7
12
|
import type { IFocusTrapZoneProps, IFocusTrapZoneSlotProps, IFocusTrapZoneType } from './FocusTrapZone.types';
|
|
8
|
-
|
|
9
|
-
const RCTFocusTrapZone = ensureNativeComponent('RCTFocusTrapZone');
|
|
13
|
+
import RCTFocusTrapZone from './FocusTrapZoneNativeComponent';
|
|
10
14
|
|
|
11
15
|
export function filterOutComponentRef(propName: string): boolean {
|
|
12
16
|
return propName !== 'componentRef';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
8
|
+
|
|
9
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
10
|
+
|
|
11
|
+
export interface NativeProps extends ViewProps {
|
|
12
|
+
/**
|
|
13
|
+
* Specifies whether the FocusTrapZone's focus trapping behavior is disabled. True, if disabled.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies whether the FocusTrapZone takes focus on render. True, if taking focus is disabled.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
disableFirstFocus?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Determines which element receives focus when focus moves into the FocusTrapZone. If false, the first focusable descendant gets focus.
|
|
24
|
+
* If true, the element that was focused when the FocusTrapZone last had a focused descendant is chosen. If it has never had a focused
|
|
25
|
+
* descendant before, then the first focusable descendant gets focus.
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
focusPreviouslyFocusedInnerElement?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* By default, when the FocusTrapZone is unmounted or disabled focus returns to the element outside the FocusTrapZone that last had
|
|
31
|
+
* focus. Setting this to true disables this behavior, so the UI behaves as it normally would: If the FocusTrapZone is disabled, focus
|
|
32
|
+
* remains on the control inside the FocusTrapZone. If the FocusTrapZone is unmounted, focus usually moves to the nearest focusable
|
|
33
|
+
* control, but this can vary.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
ignoreExternalFocusing?: boolean;
|
|
37
|
+
|
|
38
|
+
forceFocusInsideTrap?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default codegenNativeComponent<NativeProps>('RCTFocusTrapZone') as HostComponent<NativeProps>;
|