@fluentui-react-native/focus-trap-zone 0.12.20 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,59 @@
1
1
  # Change Log - @fluentui-react-native/focus-trap-zone
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f72b43a: Fix codegen definitions for native components in repo
8
+ - 0d6e9c1: chore: migrate to `oxfmt`
9
+ - ac6e7af: Ensure packages have a default export that references the typescript entrypoint and clean up build dependency ordering
10
+ - Updated dependencies [0d6e9c1]
11
+ - Updated dependencies [ac6e7af]
12
+ - @uifabricshared/foundation-composable@0.14.1
13
+ - @uifabricshared/foundation-settings@0.16.1
14
+ - @fluentui-react-native/interactive-hooks@0.28.1
15
+ - @fluentui-react-native/adapters@0.14.1
16
+
17
+ ## 0.13.0
18
+
19
+ ### Minor Changes
20
+
21
+ - d7adbdd: # Migration from Beachball to Changesets
22
+
23
+ This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.
24
+
25
+ All 75 affected packages receive a minor version bump to acknowledge the accumulated changes from the beachball era.
26
+
27
+ ## What Changed
28
+
29
+ Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:
30
+
31
+ - ❌ 440+ beachball change files from `change/` directory
32
+ - ❌ `beachball` package dependency
33
+ - ❌ Beachball scripts from `package.json`
34
+ - ❌ `beachball.config.js` configuration file
35
+ - ❌ Beachball publish steps from Azure Pipelines
36
+
37
+ ## New Workflow
38
+
39
+ ✅ **Create changes**: Run `yarn changeset` to document changes
40
+ ✅ **Version bump PRs**: Automatically created by GitHub Actions
41
+ ✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
42
+ ✅ **Validation**: CI validates changesets and blocks major version bumps
43
+
44
+ For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
45
+
46
+ ### Patch Changes
47
+
48
+ - d1d8c26: We were pinning @types/react and react-native-macos via resolutions. This fixes that which uncovered a bunch of type inconsistencies that needed to be addressed.
49
+ - Updated dependencies [d7adbdd]
50
+ - Updated dependencies [d1d8c26]
51
+ - Updated dependencies [d1d8c26]
52
+ - @fluentui-react-native/adapters@0.14.0
53
+ - @fluentui-react-native/interactive-hooks@0.28.0
54
+ - @uifabricshared/foundation-composable@0.14.0
55
+ - @uifabricshared/foundation-settings@0.16.0
56
+
3
57
  <!-- This log was last generated on Tue, 05 Aug 2025 18:50:43 GMT and should not be manually modified. -->
4
58
 
5
59
  <!-- Start content -->
@@ -1287,7 +1341,7 @@ Thu, 16 Dec 2021 19:10:27 GMT
1287
1341
 
1288
1342
  ### Patches
1289
1343
 
1290
- - Rename Jest snapshots to be platform agnostic (sanajmi@microsoft.com)
1344
+ - Rename Jest snapshots to be platform agnostic (sanajmi@microsoft.com)
1291
1345
  - Bump @fluentui-react-native/adapters to v0.8.1
1292
1346
  - Bump @fluentui-react-native/interactive-hooks to v0.11.1
1293
1347
 
@@ -1792,24 +1846,31 @@ Thu, 16 Apr 2020 23:57:38 GMT
1792
1846
  - publish with correct main/module references (jasonmo@microsoft.com)
1793
1847
 
1794
1848
  ## 0.2.11
1849
+
1795
1850
  Thu, 09 Apr 2020 18:39:15 GMT
1796
1851
 
1797
1852
  ### Patches
1798
1853
 
1799
1854
  - merge conflicts (ppatboyd@outlook.com)
1855
+
1800
1856
  ## 0.2.9
1857
+
1801
1858
  Fri, 03 Apr 2020 20:40:51 GMT
1802
1859
 
1803
1860
  ### Patches
1804
1861
 
1805
1862
  - switch the bin name from just-script to fluent-scripts to disambiguate names (jasonmo@microsoft.com)
1863
+
1806
1864
  ## 0.2.7
1865
+
1807
1866
  Mon, 30 Mar 2020 16:27:00 GMT
1808
1867
 
1809
1868
  ### Patches
1810
1869
 
1811
1870
  - Update main attribute to specify TypeScript index file. (kinhln@microsoft.com)
1871
+
1812
1872
  ## 0.2.0
1873
+
1813
1874
  Mon, 16 Mar 2020 23:03:24 GMT
1814
1875
 
1815
1876
  ### Minor changes
@@ -1 +1 @@
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,MAAM,aAAa,GAAG,UAAU,CAAqB;IAC1D,eAAe,EAAE,CAAC,SAA8B,EAAE,UAA2C,EAAE,EAAE;QAC/F,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3D,OAAO;YACL,SAAS,EAAE,aAAa,CAA0B,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,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"}
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,EAAW;IAC/D,OAAO,QAAQ,KAAK,cAAc,CAAC;AAAA,CACpC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAqB;IAC1D,eAAe,EAAE,CAAC,SAA8B,EAAE,UAA2C,EAAE,EAAE,CAAC;QAChG,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;QAC3D,OAAO;YACL,SAAS,EAAE,aAAa,CAA0B,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC;SAClH,CAAC;IAAA,CACH;IACD,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE;KACpE;CACF,CAAC,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- * @format
5
- */
6
1
  import type { HostComponent, ViewProps } from 'react-native';
7
2
  export interface NativeProps extends ViewProps {
8
3
  /**
@@ -1 +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"}
1
+ {"version":3,"file":"FocusTrapZoneNativeComponent.d.ts","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,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"}
@@ -1 +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
+ {"version":3,"file":"FocusTrapZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;AAiC7F,eAAe,sBAAsB,CAAc,kBAAkB,CAA+B,CAAC"}
@@ -1,15 +1,20 @@
1
- import * as React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { act } from 'react';
2
3
  import * as renderer from 'react-test-renderer';
3
4
  import { FocusTrapZone } from '..';
4
5
  it('FocusTrapZone default props', () => {
5
- const tree = renderer.create(React.createElement(FocusTrapZone, null)).toJSON();
6
- expect(tree).toMatchSnapshot();
6
+ let component;
7
+ act(() => {
8
+ component = renderer.create(_jsx(FocusTrapZone, {}));
9
+ });
10
+ expect(component.toJSON()).toMatchSnapshot();
7
11
  });
8
12
  it('FocusTrapZone all props props', () => {
9
13
  const ref = { current: null };
10
- const tree = renderer
11
- .create(React.createElement(FocusTrapZone, { componentRef: ref, disableFirstFocus: true, disabled: true, ignoreExternalFocusing: true, focusPreviouslyFocusedInnerElement: true }))
12
- .toJSON();
13
- expect(tree).toMatchSnapshot();
14
+ let component;
15
+ act(() => {
16
+ component = renderer.create(_jsx(FocusTrapZone, { componentRef: ref, disableFirstFocus: true, disabled: true, ignoreExternalFocusing: true, focusPreviouslyFocusedInnerElement: true }));
17
+ });
18
+ expect(component.toJSON()).toMatchSnapshot();
14
19
  });
15
20
  //# sourceMappingURL=FocusTrapZone.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrapZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusTrapZone.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACrC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,aAAa,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACzD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;IACvC,MAAM,GAAG,GAAgC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,MAAM,IAAI,GAAG,QAAQ;SAClB,MAAM,CAAC,oBAAC,aAAa,IAAC,YAAY,EAAE,GAAG,EAAE,iBAAiB,QAAC,QAAQ,QAAC,sBAAsB,QAAC,kCAAkC,SAAG,CAAC;SACjI,MAAM,EAAE,CAAC;IACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"FocusTrapZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusTrapZone.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAG5B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAEnC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC;IACtC,IAAI,SAAqC,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,CAAC;QACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAC,aAAa,KAAG,CAAC,CAAC;IAAA,CAChD,CAAC,CAAC;IACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;AAAA,CAC/C,CAAC,CAAC;AAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC;IACxC,MAAM,GAAG,GAAgC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,IAAI,SAAqC,CAAC;IAC1C,GAAG,CAAC,GAAG,EAAE,CAAC;QACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CACzB,KAAC,aAAa,IAAC,YAAY,EAAE,GAAG,EAAE,iBAAiB,QAAC,QAAQ,QAAC,sBAAsB,QAAC,kCAAkC,SAAG,CAC1H,CAAC;IAAA,CACH,CAAC,CAAC;IACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;AAAA,CAC/C,CAAC,CAAC"}
@@ -8,7 +8,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.FocusTrapZone = exports.filterOutComponentRef = void 0;
11
+ exports.FocusTrapZone = void 0;
12
+ exports.filterOutComponentRef = filterOutComponentRef;
12
13
  const interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
13
14
  const foundation_composable_1 = require("@uifabricshared/foundation-composable");
14
15
  const foundation_settings_1 = require("@uifabricshared/foundation-settings");
@@ -16,7 +17,6 @@ const FocusTrapZoneNativeComponent_1 = __importDefault(require("./FocusTrapZoneN
16
17
  function filterOutComponentRef(propName) {
17
18
  return propName !== 'componentRef';
18
19
  }
19
- exports.filterOutComponentRef = filterOutComponentRef;
20
20
  exports.FocusTrapZone = (0, foundation_composable_1.composable)({
21
21
  usePrepareProps: (userProps, useStyling) => {
22
22
  const ftzRef = (0, interactive_hooks_1.useViewCommandFocus)(userProps.componentRef);
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAEH,gFAA+E;AAE/E,iFAAmE;AACnE,6EAAoE;AAGpE,kGAA8D;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,CAAC,SAA8B,EAAE,UAA2C,EAAE,EAAE;QAC/F,MAAM,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,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,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"}
1
+ {"version":3,"file":"FocusTrapZone.js","sourceRoot":"","sources":["../src/FocusTrapZone.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;AAEH,gFAA+E;AAE/E,iFAAmE;AACnE,6EAAoE;AAGpE,kGAA8D;AAE9D,+BAAsC,QAAgB,EAAW;IAC/D,OAAO,QAAQ,KAAK,cAAc,CAAC;AAAA,CACpC;AAEY,QAAA,aAAa,GAAG,IAAA,kCAAU,EAAqB;IAC1D,eAAe,EAAE,CAAC,SAA8B,EAAE,UAA2C,EAAE,EAAE,CAAC;QAChG,MAAM,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,EAAE,EAAE,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC;SAClH,CAAC;IAAA,CACH;IACD,KAAK,EAAE;QACL,IAAI,EAAE,EAAE,QAAQ,EAAE,sCAAgB,EAAE,MAAM,EAAE,qBAAqB,EAAE;KACpE;CACF,CAAC,CAAC"}
@@ -1,8 +1,3 @@
1
- /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- * @format
5
- */
6
1
  import type { HostComponent, ViewProps } from 'react-native';
7
2
  export interface NativeProps extends ViewProps {
8
3
  /**
@@ -1 +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"}
1
+ {"version":3,"file":"FocusTrapZoneNativeComponent.d.ts","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,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"}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
2
6
  /**
3
7
  * Copyright (c) Microsoft Corporation.
4
8
  * Licensed under the MIT License.
5
9
  * @format
6
10
  */
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
11
  const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
12
12
  exports.default = (0, codegenNativeComponent_1.default)('RCTFocusTrapZone');
13
13
  //# sourceMappingURL=FocusTrapZoneNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrapZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAIH,qHAA6F;AAgC7F,kBAAe,IAAA,gCAAsB,EAAc,kBAAkB,CAA+B,CAAC"}
1
+ {"version":3,"file":"FocusTrapZoneNativeComponent.js","sourceRoot":"","sources":["../src/FocusTrapZoneNativeComponent.ts"],"names":[],"mappings":";;;;;AAAA;;;;GAIG;AACH,qHAA6F;kBAiC9E,IAAA,gCAAsB,EAAc,kBAAkB,CAA+B"}
@@ -15,26 +15,41 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
- const React = __importStar(require("react"));
36
+ const jsx_runtime_1 = require("react/jsx-runtime");
37
+ const react_1 = require("react");
27
38
  const renderer = __importStar(require("react-test-renderer"));
28
39
  const __1 = require("..");
29
40
  it('FocusTrapZone default props', () => {
30
- const tree = renderer.create(React.createElement(__1.FocusTrapZone, null)).toJSON();
31
- expect(tree).toMatchSnapshot();
41
+ let component;
42
+ (0, react_1.act)(() => {
43
+ component = renderer.create(jsx_runtime_1.jsx(__1.FocusTrapZone, {}));
44
+ });
45
+ expect(component.toJSON()).toMatchSnapshot();
32
46
  });
33
47
  it('FocusTrapZone all props props', () => {
34
48
  const ref = { current: null };
35
- const tree = renderer
36
- .create(React.createElement(__1.FocusTrapZone, { componentRef: ref, disableFirstFocus: true, disabled: true, ignoreExternalFocusing: true, focusPreviouslyFocusedInnerElement: true }))
37
- .toJSON();
38
- expect(tree).toMatchSnapshot();
49
+ let component;
50
+ (0, react_1.act)(() => {
51
+ component = renderer.create(jsx_runtime_1.jsx(__1.FocusTrapZone, { componentRef: ref, disableFirstFocus: true, disabled: true, ignoreExternalFocusing: true, focusPreviouslyFocusedInnerElement: true }));
52
+ });
53
+ expect(component.toJSON()).toMatchSnapshot();
39
54
  });
40
55
  //# sourceMappingURL=FocusTrapZone.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusTrapZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusTrapZone.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAG/B,8DAAgD;AAEhD,0BAAmC;AAEnC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;IACrC,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,iBAAa,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACzD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;IACvC,MAAM,GAAG,GAAgC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,MAAM,IAAI,GAAG,QAAQ;SAClB,MAAM,CAAC,oBAAC,iBAAa,IAAC,YAAY,EAAE,GAAG,EAAE,iBAAiB,QAAC,QAAQ,QAAC,sBAAsB,QAAC,kCAAkC,SAAG,CAAC;SACjI,MAAM,EAAE,CAAC;IACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"FocusTrapZone.test.js","sourceRoot":"","sources":["../../src/__tests__/FocusTrapZone.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,iCAA4B;AAG5B,MAAY,QAAQ,gDAA4B;AAEhD,0BAAmC;AAEnC,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC;IACtC,IAAI,SAAqC,CAAC;IAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;QACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,kBAAC,iBAAa,KAAG,CAAC,CAAC;IAAA,CAChD,CAAC,CAAC;IACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;AAAA,CAC/C,CAAC,CAAC;AAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC;IACxC,MAAM,GAAG,GAAgC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,IAAI,SAAqC,CAAC;IAC1C,IAAA,WAAG,EAAC,GAAG,EAAE,CAAC;QACR,SAAS,GAAG,QAAQ,CAAC,MAAM,CACzB,kBAAC,iBAAa,IAAC,YAAY,EAAE,GAAG,EAAE,iBAAiB,QAAC,QAAQ,QAAC,sBAAsB,QAAC,kCAAkC,SAAG,CAC1H,CAAC;IAAA,CACH,CAAC,CAAC;IACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;AAAA,CAC/C,CAAC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.filterOutComponentRef = exports.FocusTrapZone = void 0;
4
- var FocusTrapZone_1 = require("./FocusTrapZone");
4
+ const FocusTrapZone_1 = require("./FocusTrapZone");
5
5
  Object.defineProperty(exports, "FocusTrapZone", { enumerable: true, get: function () { return FocusTrapZone_1.FocusTrapZone; } });
6
6
  Object.defineProperty(exports, "filterOutComponentRef", { enumerable: true, get: function () { return FocusTrapZone_1.filterOutComponentRef; } });
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,iDAAuE;AAA9D,8GAAA,aAAa,OAAA;AAAE,sHAAA,qBAAqB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,mDAAuE;AAA9D,8GAAA,aAAa,OAAA;AAAE,sHAAA,qBAAqB,OAAA"}
package/package.json CHANGED
@@ -1,80 +1,89 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/focus-trap-zone",
3
- "version": "0.12.20",
3
+ "version": "0.13.1",
4
4
  "description": "A cross-platform FocusTrapZone component using the Fluent Design System",
5
+ "license": "MIT",
6
+ "author": "",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/microsoft/fluentui-react-native.git",
10
+ "directory": "packages/components/FocusTrapZone"
11
+ },
5
12
  "main": "lib-commonjs/index.js",
6
13
  "module": "lib/index.js",
7
- "react-native": "src/index.ts",
14
+ "types": "lib/index.d.ts",
8
15
  "exports": {
9
16
  ".": {
17
+ "types": "./lib/index.d.ts",
10
18
  "import": "./lib/index.js",
11
19
  "require": "./lib-commonjs/index.js",
12
- "types": "./lib/index.d.ts"
20
+ "default": "./src/index.ts"
13
21
  }
14
22
  },
15
- "typings": "lib/index.d.ts",
16
23
  "scripts": {
17
24
  "build": "fluentui-scripts build",
18
- "depcheck": "fluentui-scripts depcheck",
19
- "just": "fluentui-scripts",
25
+ "build-cjs": "tsgo --outDir lib-commonjs",
26
+ "build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
20
27
  "clean": "fluentui-scripts clean",
28
+ "depcheck": "fluentui-scripts depcheck",
21
29
  "lint": "fluentui-scripts eslint",
30
+ "lint-package": "fluentui-scripts lint-package",
31
+ "format": "fluentui-scripts format",
22
32
  "test": "fluentui-scripts jest",
23
- "update-snapshots": "fluentui-scripts jest -u",
24
- "prettier": "fluentui-scripts prettier",
25
- "prettier-fix": "fluentui-scripts prettier --fix true"
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "https://github.com/microsoft/fluentui-react-native.git",
30
- "directory": "packages/components/FocusTrapZone"
33
+ "update-snapshots": "fluentui-scripts jest -u"
31
34
  },
32
35
  "dependencies": {
33
- "@fluentui-react-native/adapters": "0.13.5",
34
- "@fluentui-react-native/interactive-hooks": "0.27.19",
35
- "@uifabricshared/foundation-composable": "0.13.11",
36
- "@uifabricshared/foundation-settings": "0.15.11"
36
+ "@fluentui-react-native/adapters": "0.14.1",
37
+ "@fluentui-react-native/interactive-hooks": "0.28.1",
38
+ "@uifabricshared/foundation-composable": "0.14.1",
39
+ "@uifabricshared/foundation-settings": "0.16.1"
37
40
  },
38
41
  "devDependencies": {
39
42
  "@babel/core": "^7.20.0",
40
43
  "@fluentui-react-native/babel-config": "0.1.1",
41
- "@fluentui-react-native/eslint-config-rules": "0.1.1",
42
- "@fluentui-react-native/jest-config": "0.1.1",
43
- "@fluentui-react-native/scripts": "0.1.1",
44
+ "@fluentui-react-native/eslint-config-rules": "0.1.2",
45
+ "@fluentui-react-native/jest-config": "0.1.0",
46
+ "@fluentui-react-native/kit-config": "0.1.2",
47
+ "@fluentui-react-native/scripts": "0.1.0",
44
48
  "@office-iss/react-native-win32": "^0.74.0",
45
- "@react-native/babel-preset": "^0.74.0",
46
- "@react-native/metro-config": "^0.74.0",
47
- "@types/react": "~18.2.0",
48
- "@types/react-test-renderer": "^18.2.0",
49
- "react": "18.2.0",
50
- "react-native": "^0.74.0",
51
- "react-native-macos": "^0.74.0",
52
- "react-native-windows": "^0.74.0",
53
- "react-test-renderer": "18.2.0"
49
+ "@react-native-community/cli": "^20.0.0",
50
+ "@react-native-community/cli-platform-android": "^20.0.0",
51
+ "@react-native-community/cli-platform-ios": "^20.0.0",
52
+ "@react-native/babel-preset": "^0.81.0",
53
+ "@react-native/metro-config": "^0.81.0",
54
+ "@types/react": "~19.1.0",
55
+ "@types/react-test-renderer": "^19.1.0",
56
+ "react": "19.1.0",
57
+ "react-native": "^0.81.0",
58
+ "react-native-macos": "^0.81.0",
59
+ "react-native-windows": "^0.81.0",
60
+ "react-test-renderer": "19.1.0"
54
61
  },
55
62
  "peerDependencies": {
56
63
  "@office-iss/react-native-win32": "^0.74.0",
57
- "react": "18.2.0",
58
- "react-native": "^0.73.0 || ^0.74.0",
59
- "react-native-macos": "^0.73.0 || ^0.74.0",
60
- "react-native-windows": "^0.73.0 || ^0.74.0"
64
+ "@types/react": "~18.2.0 || ~19.0.0 || ~19.1.0",
65
+ "react": "18.2.0 || 19.0.0 || 19.1.0",
66
+ "react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
67
+ "react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
68
+ "react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
69
+ },
70
+ "peerDependenciesMeta": {
71
+ "@office-iss/react-native-win32": {
72
+ "optional": true
73
+ },
74
+ "@types/react": {
75
+ "optional": true
76
+ },
77
+ "react-native-macos": {
78
+ "optional": true
79
+ },
80
+ "react-native-windows": {
81
+ "optional": true
82
+ }
61
83
  },
62
- "author": "",
63
- "license": "MIT",
64
84
  "rnx-kit": {
65
85
  "kitType": "library",
66
86
  "alignDeps": {
67
- "presets": [
68
- "microsoft/react-native"
69
- ],
70
- "requirements": {
71
- "development": [
72
- "react-native@0.74"
73
- ],
74
- "production": [
75
- "react-native@0.73 || 0.74"
76
- ]
77
- },
78
87
  "capabilities": [
79
88
  "babel-preset-react-native",
80
89
  "core",
@@ -83,19 +92,11 @@
83
92
  "core-macos",
84
93
  "core-windows",
85
94
  "react",
86
- "react-test-renderer"
95
+ "react-test-renderer",
96
+ "tools-core",
97
+ "tools-jest"
87
98
  ]
88
- }
89
- },
90
- "peerDependenciesMeta": {
91
- "@office-iss/react-native-win32": {
92
- "optional": true
93
- },
94
- "react-native-macos": {
95
- "optional": true
96
99
  },
97
- "react-native-windows": {
98
- "optional": true
99
- }
100
+ "extends": "@fluentui-react-native/kit-config"
100
101
  }
101
- }
102
+ }
@@ -3,10 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  * @format
5
5
  */
6
-
7
- import type { HostComponent, ViewProps } from 'react-native';
8
-
9
6
  import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
7
+ import type { HostComponent, ViewProps } from 'react-native';
10
8
 
11
9
  export interface NativeProps extends ViewProps {
12
10
  /**
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { act } from 'react';
2
3
 
3
4
  import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
4
5
  import * as renderer from 'react-test-renderer';
@@ -6,14 +7,20 @@ import * as renderer from 'react-test-renderer';
6
7
  import { FocusTrapZone } from '..';
7
8
 
8
9
  it('FocusTrapZone default props', () => {
9
- const tree = renderer.create(<FocusTrapZone />).toJSON();
10
- expect(tree).toMatchSnapshot();
10
+ let component: renderer.ReactTestRenderer;
11
+ act(() => {
12
+ component = renderer.create(<FocusTrapZone />);
13
+ });
14
+ expect(component!.toJSON()).toMatchSnapshot();
11
15
  });
12
16
 
13
17
  it('FocusTrapZone all props props', () => {
14
18
  const ref: React.RefObject<IFocusable> = { current: null };
15
- const tree = renderer
16
- .create(<FocusTrapZone componentRef={ref} disableFirstFocus disabled ignoreExternalFocusing focusPreviouslyFocusedInnerElement />)
17
- .toJSON();
18
- expect(tree).toMatchSnapshot();
19
+ let component: renderer.ReactTestRenderer;
20
+ act(() => {
21
+ component = renderer.create(
22
+ <FocusTrapZone componentRef={ref} disableFirstFocus disabled ignoreExternalFocusing focusPreviouslyFocusedInnerElement />,
23
+ );
24
+ });
25
+ expect(component!.toJSON()).toMatchSnapshot();
19
26
  });