@fluentui-react-native/focus-zone 0.21.14 → 0.22.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/lib/FocusZone.d.ts +5 -2
  3. package/lib/FocusZone.js +28 -30
  4. package/lib/FocusZone.js.map +1 -1
  5. package/lib/FocusZone.types.d.ts +74 -70
  6. package/lib/FocusZone.types.js +1 -1
  7. package/lib/FocusZoneNativeComponent.d.ts +10 -10
  8. package/lib/FocusZoneNativeComponent.d.ts.map +1 -1
  9. package/lib/FocusZoneNativeComponent.js +3 -3
  10. package/lib/FocusZoneNativeComponent.js.map +1 -1
  11. package/lib/__tests__/FocusZone.test.d.ts +1 -1
  12. package/lib/__tests__/FocusZone.test.js +134 -75
  13. package/lib/__tests__/FocusZone.test.js.map +1 -1
  14. package/lib/index.d.ts +13 -2
  15. package/lib/index.js +1 -1
  16. package/lib-commonjs/FocusZone.d.ts +5 -2
  17. package/lib-commonjs/FocusZone.js +91 -64
  18. package/lib-commonjs/FocusZone.js.map +1 -1
  19. package/lib-commonjs/FocusZone.types.d.ts +74 -70
  20. package/lib-commonjs/FocusZone.types.js +3 -3
  21. package/lib-commonjs/FocusZoneNativeComponent.d.ts +10 -10
  22. package/lib-commonjs/FocusZoneNativeComponent.d.ts.map +1 -1
  23. package/lib-commonjs/FocusZoneNativeComponent.js +5 -8
  24. package/lib-commonjs/FocusZoneNativeComponent.js.map +1 -1
  25. package/lib-commonjs/__tests__/FocusZone.test.d.ts +1 -1
  26. package/lib-commonjs/__tests__/FocusZone.test.js +194 -103
  27. package/lib-commonjs/__tests__/FocusZone.test.js.map +1 -1
  28. package/lib-commonjs/index.d.ts +13 -2
  29. package/lib-commonjs/index.js +17 -7
  30. package/lib-commonjs/index.js.map +1 -1
  31. package/package.json +62 -62
  32. package/src/FocusZoneNativeComponent.ts +3 -3
  33. package/src/__tests__/FocusZone.test.tsx +60 -48
@@ -1,119 +1,210 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
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
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- const React = __importStar(require("react"));
27
- const react_native_1 = require("react-native");
28
- const renderer = __importStar(require("react-test-renderer"));
29
- const __1 = require("..");
1
+ 'use strict';
2
+ var __createBinding =
3
+ (this && this.__createBinding) ||
4
+ (Object.create
5
+ ? function (o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ('get' in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = {
10
+ enumerable: true,
11
+ get: function () {
12
+ return m[k];
13
+ },
14
+ };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }
18
+ : function (o, m, k, k2) {
19
+ if (k2 === undefined) k2 = k;
20
+ o[k2] = m[k];
21
+ });
22
+ var __setModuleDefault =
23
+ (this && this.__setModuleDefault) ||
24
+ (Object.create
25
+ ? function (o, v) {
26
+ Object.defineProperty(o, 'default', { enumerable: true, value: v });
27
+ }
28
+ : function (o, v) {
29
+ o['default'] = v;
30
+ });
31
+ var __importStar =
32
+ (this && this.__importStar) ||
33
+ (function () {
34
+ var ownKeys = function (o) {
35
+ ownKeys =
36
+ Object.getOwnPropertyNames ||
37
+ function (o) {
38
+ var ar = [];
39
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
40
+ return ar;
41
+ };
42
+ return ownKeys(o);
43
+ };
44
+ return function (mod) {
45
+ if (mod && mod.__esModule) return mod;
46
+ var result = {};
47
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== 'default') __createBinding(result, mod, k[i]);
48
+ __setModuleDefault(result, mod);
49
+ return result;
50
+ };
51
+ })();
52
+ Object.defineProperty(exports, '__esModule', { value: true });
53
+ const jsx_runtime_1 = require('react/jsx-runtime');
54
+ const react_1 = require('react');
55
+ const react_native_1 = require('react-native');
56
+ const renderer = __importStar(require('react-test-renderer'));
57
+ const __1 = require('..');
30
58
  const onPress = () => {
31
- return;
59
+ return;
32
60
  };
33
61
  describe('FocusZone No Props', () => {
34
- it('No children', () => {
35
- const tree = renderer.create(React.createElement(__1.FocusZone, null)).toJSON();
36
- expect(tree).toMatchSnapshot();
62
+ it('No children', () => {
63
+ let component;
64
+ (0, react_1.act)(() => {
65
+ component = renderer.create(jsx_runtime_1.jsx(__1.FocusZone, {}));
37
66
  });
38
- it('One child', () => {
39
- const tree = renderer
40
- .create(React.createElement(__1.FocusZone, null,
41
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
42
- .toJSON();
43
- expect(tree).toMatchSnapshot();
67
+ expect(component.toJSON()).toMatchSnapshot();
68
+ });
69
+ it('One child', () => {
70
+ let component;
71
+ (0, react_1.act)(() => {
72
+ component = renderer.create(
73
+ jsx_runtime_1.jsx(__1.FocusZone, { children: jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }) }),
74
+ );
44
75
  });
45
- it('Two children', () => {
46
- const tree = renderer
47
- .create(React.createElement(__1.FocusZone, null,
48
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
49
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
50
- .toJSON();
51
- expect(tree).toMatchSnapshot();
76
+ expect(component.toJSON()).toMatchSnapshot();
77
+ });
78
+ it('Two children', () => {
79
+ let component;
80
+ (0, react_1.act)(() => {
81
+ component = renderer.create(
82
+ jsx_runtime_1.jsxs(__1.FocusZone, {
83
+ children: [
84
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
85
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
86
+ ],
87
+ }),
88
+ );
52
89
  });
53
- it('Three children', () => {
54
- const tree = renderer
55
- .create(React.createElement(__1.FocusZone, null,
56
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
57
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
58
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
59
- .toJSON();
60
- expect(tree).toMatchSnapshot();
90
+ expect(component.toJSON()).toMatchSnapshot();
91
+ });
92
+ it('Three children', () => {
93
+ let component;
94
+ (0, react_1.act)(() => {
95
+ component = renderer.create(
96
+ jsx_runtime_1.jsxs(__1.FocusZone, {
97
+ children: [
98
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
99
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
100
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
101
+ ],
102
+ }),
103
+ );
61
104
  });
105
+ expect(component.toJSON()).toMatchSnapshot();
106
+ });
62
107
  });
63
108
  describe('FocusZone With Props', () => {
64
- it('defaultTabbableElement Prop', () => {
65
- const tree = renderer
66
- .create(React.createElement(__1.FocusZone, { defaultTabbableElement: null },
67
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
68
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
69
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
70
- .toJSON();
71
- expect(tree).toMatchSnapshot();
109
+ it('defaultTabbableElement Prop', () => {
110
+ let component;
111
+ (0, react_1.act)(() => {
112
+ component = renderer.create(
113
+ jsx_runtime_1.jsxs(__1.FocusZone, {
114
+ defaultTabbableElement: null,
115
+ children: [
116
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
117
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
118
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
119
+ ],
120
+ }),
121
+ );
72
122
  });
73
- it('focusZoneDirection Prop', () => {
74
- const tree = renderer
75
- .create(React.createElement(__1.FocusZone, { focusZoneDirection: "bidirectional" },
76
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
77
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
78
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
79
- .toJSON();
80
- expect(tree).toMatchSnapshot();
123
+ expect(component.toJSON()).toMatchSnapshot();
124
+ });
125
+ it('focusZoneDirection Prop', () => {
126
+ let component;
127
+ (0, react_1.act)(() => {
128
+ component = renderer.create(
129
+ jsx_runtime_1.jsxs(__1.FocusZone, {
130
+ focusZoneDirection: 'bidirectional',
131
+ children: [
132
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
133
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
134
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
135
+ ],
136
+ }),
137
+ );
81
138
  });
82
- it('disabled Prop', () => {
83
- const tree = renderer
84
- .create(React.createElement(__1.FocusZone, { disabled: true },
85
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
86
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
87
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
88
- .toJSON();
89
- expect(tree).toMatchSnapshot();
139
+ expect(component.toJSON()).toMatchSnapshot();
140
+ });
141
+ it('disabled Prop', () => {
142
+ let component;
143
+ (0, react_1.act)(() => {
144
+ component = renderer.create(
145
+ jsx_runtime_1.jsxs(__1.FocusZone, {
146
+ disabled: true,
147
+ children: [
148
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
149
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
150
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
151
+ ],
152
+ }),
153
+ );
90
154
  });
91
- it('isCircularNavigation Prop', () => {
92
- const tree = renderer
93
- .create(React.createElement(__1.FocusZone, { isCircularNavigation: true },
94
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
95
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
96
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
97
- .toJSON();
98
- expect(tree).toMatchSnapshot();
155
+ expect(component.toJSON()).toMatchSnapshot();
156
+ });
157
+ it('isCircularNavigation Prop', () => {
158
+ let component;
159
+ (0, react_1.act)(() => {
160
+ component = renderer.create(
161
+ jsx_runtime_1.jsxs(__1.FocusZone, {
162
+ isCircularNavigation: true,
163
+ children: [
164
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
165
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
166
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
167
+ ],
168
+ }),
169
+ );
99
170
  });
100
- it('use2DNavigation Prop', () => {
101
- const tree = renderer
102
- .create(React.createElement(__1.FocusZone, { use2DNavigation: true },
103
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
104
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
105
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
106
- .toJSON();
107
- expect(tree).toMatchSnapshot();
171
+ expect(component.toJSON()).toMatchSnapshot();
172
+ });
173
+ it('use2DNavigation Prop', () => {
174
+ let component;
175
+ (0, react_1.act)(() => {
176
+ component = renderer.create(
177
+ jsx_runtime_1.jsxs(__1.FocusZone, {
178
+ use2DNavigation: true,
179
+ children: [
180
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
181
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
182
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
183
+ ],
184
+ }),
185
+ );
108
186
  });
109
- it('All Props', () => {
110
- const tree = renderer
111
- .create(React.createElement(__1.FocusZone, { disabled: false, use2DNavigation: true, defaultTabbableElement: null, isCircularNavigation: false, focusZoneDirection: "vertical" },
112
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
113
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress }),
114
- React.createElement(react_native_1.Button, { title: "button", onPress: onPress })))
115
- .toJSON();
116
- expect(tree).toMatchSnapshot();
187
+ expect(component.toJSON()).toMatchSnapshot();
188
+ });
189
+ it('All Props', () => {
190
+ let component;
191
+ (0, react_1.act)(() => {
192
+ component = renderer.create(
193
+ jsx_runtime_1.jsxs(__1.FocusZone, {
194
+ disabled: false,
195
+ use2DNavigation: true,
196
+ defaultTabbableElement: null,
197
+ isCircularNavigation: false,
198
+ focusZoneDirection: 'vertical',
199
+ children: [
200
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
201
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
202
+ jsx_runtime_1.jsx(react_native_1.Button, { title: 'button', onPress: onPress }),
203
+ ],
204
+ }),
205
+ );
117
206
  });
207
+ expect(component.toJSON()).toMatchSnapshot();
208
+ });
118
209
  });
119
- //# sourceMappingURL=FocusZone.test.js.map
210
+ //# sourceMappingURL=FocusZone.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FocusZone.test.js","sourceR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AE7B,kBAAC,qBAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,EAC3C,kBAAC,qBAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI,EAC3C,kBAAC,qBAAM,IAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,GAAI;oBACjC,CACb,CAAC;QAAA,CACH,CAAC,CAAC;QACH,MAAM,CAAC,SAAU,CAAC,MAAM,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;IAAA,CAC/C,CAAC,CAAC;AAAA,CACJ,CAAC,CAAC"}
@@ -1,4 +1,15 @@
1
1
  export { focusZoneName } from './FocusZone.types';
2
- export type { FocusZoneDirection, FocusZoneProps, FocusZoneRenderData, FocusZoneSlotProps, FocusZoneState, FocusZoneTabNavigation, FocusZoneTokens, FocusZoneType, NativeProps, NavigateAtEnd, } from './FocusZone.types';
2
+ export type {
3
+ FocusZoneDirection,
4
+ FocusZoneProps,
5
+ FocusZoneRenderData,
6
+ FocusZoneSlotProps,
7
+ FocusZoneState,
8
+ FocusZoneTabNavigation,
9
+ FocusZoneTokens,
10
+ FocusZoneType,
11
+ NativeProps,
12
+ NavigateAtEnd,
13
+ } from './FocusZone.types';
3
14
  export { FocusZone } from './FocusZone';
4
- //# sourceMappingURL=index.d.ts.map
15
+ //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.FocusZone = exports.focusZoneName = void 0;
4
- var FocusZone_types_1 = require("./FocusZone.types");
5
- Object.defineProperty(exports, "focusZoneName", { enumerable: true, get: function () { return FocusZone_types_1.focusZoneName; } });
6
- var FocusZone_1 = require("./FocusZone");
7
- Object.defineProperty(exports, "FocusZone", { enumerable: true, get: function () { return FocusZone_1.FocusZone; } });
8
- //# sourceMappingURL=index.js.map
4
+ const FocusZone_types_1 = require('./FocusZone.types');
5
+ Object.defineProperty(exports, 'focusZoneName', {
6
+ enumerable: true,
7
+ get: function () {
8
+ return FocusZone_types_1.focusZoneName;
9
+ },
10
+ });
11
+ const FocusZone_1 = require('./FocusZone');
12
+ Object.defineProperty(exports, 'FocusZone', {
13
+ enumerable: true,
14
+ get: function () {
15
+ return FocusZone_1.FocusZone;
16
+ },
17
+ });
18
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAatB,yCAAwC;AAA/B,sGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAAzC,gHAAA,aAAa,OAAA;AAatB,2CAAwC;AAA/B,sGAAA,SAAS,OAAA"}
package/package.json CHANGED
@@ -1,81 +1,89 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/focus-zone",
3
- "version": "0.21.14",
3
+ "version": "0.22.0",
4
4
  "description": "A cross-platform FocusZone component using the Fluent Design System",
5
- "main": "lib-commonjs/index.js",
6
- "module": "lib/index.js",
7
- "react-native": "src/index.ts",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/microsoft/fluentui-react-native.git",
8
+ "directory": "packages/components/FocusZone"
9
+ },
10
+ "license": "MIT",
11
+ "author": "",
8
12
  "exports": {
9
13
  ".": {
14
+ "types": "./lib/index.d.ts",
10
15
  "import": "./lib/index.js",
11
- "require": "./lib-commonjs/index.js",
12
- "types": "./lib/index.d.ts"
16
+ "require": "./lib-commonjs/index.js"
13
17
  }
14
18
  },
15
- "typings": "lib/index.d.ts",
19
+ "main": "lib-commonjs/index.js",
20
+ "module": "lib/index.js",
21
+ "types": "lib/index.d.ts",
16
22
  "scripts": {
17
23
  "build": "fluentui-scripts build",
18
- "depcheck": "fluentui-scripts depcheck",
19
- "just": "fluentui-scripts",
24
+ "build-cjs": "tsgo --outDir lib-commonjs",
25
+ "build-esm": "tsgo --outDir lib --module esnext --moduleResolution bundler",
20
26
  "clean": "fluentui-scripts clean",
27
+ "depcheck": "fluentui-scripts depcheck",
21
28
  "lint": "fluentui-scripts eslint",
22
- "test": "fluentui-scripts jest",
23
- "update-snapshots": "fluentui-scripts jest -u",
29
+ "lint-package": "fluentui-scripts lint-package",
24
30
  "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/FocusZone"
31
+ "test": "fluentui-scripts jest",
32
+ "update-snapshots": "fluentui-scripts jest -u"
31
33
  },
32
34
  "dependencies": {
33
- "@fluentui-react-native/adapters": "0.13.5",
34
- "@fluentui-react-native/interactive-hooks": "0.27.18",
35
- "@uifabricshared/foundation-composable": "0.13.11",
36
- "@uifabricshared/foundation-settings": "0.15.11"
35
+ "@fluentui-react-native/adapters": "0.14.0",
36
+ "@fluentui-react-native/interactive-hooks": "0.28.0",
37
+ "@uifabricshared/foundation-composable": "0.14.0",
38
+ "@uifabricshared/foundation-settings": "0.16.0"
37
39
  },
38
40
  "devDependencies": {
39
41
  "@babel/core": "^7.20.0",
40
42
  "@fluentui-react-native/babel-config": "0.1.1",
41
43
  "@fluentui-react-native/eslint-config-rules": "0.1.1",
42
44
  "@fluentui-react-native/jest-config": "0.1.1",
43
- "@fluentui-react-native/scripts": "0.1.1",
45
+ "@fluentui-react-native/kit-config": "0.1.2",
46
+ "@fluentui-react-native/scripts": "0.1.2",
44
47
  "@office-iss/react-native-win32": "^0.74.0",
45
- "@react-native/babel-preset": "^0.74.0",
46
- "@react-native/metro-babel-transformer": "^0.74.0",
47
- "@react-native/metro-config": "^0.74.0",
48
- "@types/react": "~18.2.0",
49
- "@types/react-test-renderer": "^18.2.0",
50
- "react": "18.2.0",
51
- "react-native": "^0.74.0",
52
- "react-native-macos": "^0.74.0",
53
- "react-native-windows": "^0.74.0",
54
- "react-test-renderer": "18.2.0"
48
+ "@react-native-community/cli": "^20.0.0",
49
+ "@react-native-community/cli-platform-android": "^20.0.0",
50
+ "@react-native-community/cli-platform-ios": "^20.0.0",
51
+ "@react-native/babel-preset": "^0.81.0",
52
+ "@react-native/metro-babel-transformer": "^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"
55
61
  },
56
62
  "peerDependencies": {
57
63
  "@office-iss/react-native-win32": "^0.74.0",
58
- "react": "18.2.0",
59
- "react-native": "^0.73.0 || ^0.74.0",
60
- "react-native-macos": "^0.73.0 || ^0.74.0",
61
- "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
+ }
62
83
  },
63
- "author": "",
64
- "license": "MIT",
65
84
  "rnx-kit": {
66
85
  "kitType": "library",
67
86
  "alignDeps": {
68
- "presets": [
69
- "microsoft/react-native"
70
- ],
71
- "requirements": {
72
- "development": [
73
- "react-native@0.74"
74
- ],
75
- "production": [
76
- "react-native@0.73 || 0.74"
77
- ]
78
- },
79
87
  "capabilities": [
80
88
  "babel-preset-react-native",
81
89
  "core",
@@ -85,19 +93,11 @@
85
93
  "core-windows",
86
94
  "metro-react-native-babel-transformer",
87
95
  "react",
88
- "react-test-renderer"
96
+ "react-test-renderer",
97
+ "tools-core",
98
+ "tools-jest"
89
99
  ]
90
- }
91
- },
92
- "peerDependenciesMeta": {
93
- "@office-iss/react-native-win32": {
94
- "optional": true
95
100
  },
96
- "react-native-macos": {
97
- "optional": true
98
- },
99
- "react-native-windows": {
100
- "optional": true
101
- }
101
+ "extends": "@fluentui-react-native/kit-config"
102
102
  }
103
- }
103
+ }
@@ -4,10 +4,10 @@
4
4
  * @format
5
5
  */
6
6
 
7
- import type { HostComponent, ViewProps } from 'react-native';
7
+ import type { ViewProps } from 'react-native';
8
8
 
9
9
  import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
10
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
10
+ import { requireNativeComponent } from 'react-native';
11
11
 
12
12
  import type { UnsafeMixed } from './codegenTypes';
13
13
  // Should be:
@@ -23,4 +23,4 @@ export interface NativeProps extends ViewProps {
23
23
  isTabNavigation?: boolean;
24
24
  }
25
25
 
26
- export default codegenNativeComponent<NativeProps>('RCTFocusZone') as HostComponent<NativeProps>;
26
+ export default requireNativeComponent<NativeProps>('RCTFocusZone');