@fluentui-react-native/callout 0.28.0 → 0.28.3
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 +39 -0
- package/lib/Callout.d.ts +2 -8
- package/lib/Callout.js +48 -50
- package/lib/Callout.settings.d.ts +1 -1
- package/lib/Callout.settings.js +12 -12
- package/lib/Callout.settings.macos.d.ts +1 -1
- package/lib/Callout.settings.macos.js +15 -15
- package/lib/Callout.types.d.ts +163 -210
- package/lib/Callout.types.d.ts.map +1 -1
- package/lib/Callout.types.js +1 -1
- package/lib/CalloutNativeComponent.d.ts +42 -2
- package/lib/CalloutNativeComponent.d.ts.map +1 -1
- package/lib/CalloutNativeComponent.js +2 -2
- package/lib/CalloutNativeComponent.js.map +1 -1
- package/lib/CalloutNativeComponent.macos.d.ts +42 -2
- package/lib/CalloutNativeComponent.macos.d.ts.map +1 -1
- package/lib/CalloutNativeComponent.macos.js +4 -6
- package/lib/CalloutNativeComponent.macos.js.map +1 -1
- package/lib/__tests__/Callout.test.d.ts +1 -1
- package/lib/__tests__/Callout.test.js +7 -7
- package/lib/index.d.ts +3 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib-commonjs/Callout.d.ts +2 -8
- package/lib-commonjs/Callout.js +91 -112
- package/lib-commonjs/Callout.settings.d.ts +1 -1
- package/lib-commonjs/Callout.settings.js +15 -15
- package/lib-commonjs/Callout.settings.macos.d.ts +1 -1
- package/lib-commonjs/Callout.settings.macos.js +18 -18
- package/lib-commonjs/Callout.types.d.ts +163 -210
- package/lib-commonjs/Callout.types.d.ts.map +1 -1
- package/lib-commonjs/Callout.types.js +3 -3
- package/lib-commonjs/CalloutNativeComponent.d.ts +42 -2
- package/lib-commonjs/CalloutNativeComponent.d.ts.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.js +9 -11
- package/lib-commonjs/CalloutNativeComponent.js.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.macos.d.ts +42 -2
- package/lib-commonjs/CalloutNativeComponent.macos.d.ts.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.macos.js +10 -14
- package/lib-commonjs/CalloutNativeComponent.macos.js.map +1 -1
- package/lib-commonjs/__tests__/Callout.test.d.ts +1 -1
- package/lib-commonjs/__tests__/Callout.test.js +41 -58
- package/lib-commonjs/index.d.ts +3 -12
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +7 -17
- package/macos/FRNCalloutManager.m +2 -1
- package/package.json +26 -25
- package/src/Callout.types.ts +4 -36
- package/src/CalloutNativeComponent.macos.ts +62 -5
- package/src/CalloutNativeComponent.ts +60 -1
- package/src/index.ts +1 -1
- package/eslint.config.js +0 -3
- package/lib/CalloutNativeComponent.types.d.ts +0 -30
- package/lib/CalloutNativeComponent.types.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.types.js +0 -2
- package/lib/CalloutNativeComponent.types.js.map +0 -1
- package/lib/CalloutNativeComponent.types.macos.d.ts +0 -29
- package/lib/CalloutNativeComponent.types.macos.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.types.macos.js +0 -2
- package/lib/CalloutNativeComponent.types.macos.js.map +0 -1
- package/lib/CalloutNativeComponent.win32.d.ts +0 -5
- package/lib/CalloutNativeComponent.win32.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.win32.js +0 -8
- package/lib/CalloutNativeComponent.win32.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.d.ts +0 -30
- package/lib-commonjs/CalloutNativeComponent.types.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.js +0 -3
- package/lib-commonjs/CalloutNativeComponent.types.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.macos.d.ts +0 -29
- package/lib-commonjs/CalloutNativeComponent.types.macos.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.macos.js +0 -3
- package/lib-commonjs/CalloutNativeComponent.types.macos.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.win32.d.ts +0 -5
- package/lib-commonjs/CalloutNativeComponent.win32.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.win32.js +0 -16
- package/lib-commonjs/CalloutNativeComponent.win32.js.map +0 -1
- package/src/CalloutNativeComponent.types.macos.ts +0 -31
- package/src/CalloutNativeComponent.types.ts +0 -31
- package/src/CalloutNativeComponent.win32.ts +0 -11
- package/src/codegenTypes.d.ts +0 -2
|
@@ -1,64 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
var __createBinding =
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
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;
|
|
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 () {
|
|
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;
|
|
41
24
|
};
|
|
42
|
-
|
|
25
|
+
return ownKeys(o);
|
|
43
26
|
};
|
|
44
27
|
return function (mod) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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;
|
|
50
33
|
};
|
|
51
|
-
|
|
52
|
-
Object.defineProperty(exports,
|
|
53
|
-
const jsx_runtime_1 = require(
|
|
54
|
-
const react_1 = require(
|
|
55
|
-
const renderer = __importStar(require(
|
|
56
|
-
const __1 = require(
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
37
|
+
const react_1 = require("react");
|
|
38
|
+
const renderer = __importStar(require("react-test-renderer"));
|
|
39
|
+
const __1 = require("..");
|
|
57
40
|
it('Callout default props', () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
let component;
|
|
42
|
+
(0, react_1.act)(() => {
|
|
43
|
+
component = renderer.create(jsx_runtime_1.jsx(__1.Callout, {}));
|
|
44
|
+
});
|
|
45
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
63
46
|
});
|
|
64
|
-
//# sourceMappingURL=Callout.test.js.map
|
|
47
|
+
//# sourceMappingURL=Callout.test.js.map
|
package/lib-commonjs/index.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
export { calloutName } from './Callout.types';
|
|
2
|
-
export type {
|
|
3
|
-
|
|
4
|
-
DismissBehaviors,
|
|
5
|
-
ICalloutProps,
|
|
6
|
-
ICalloutRenderData,
|
|
7
|
-
ICalloutSlotProps,
|
|
8
|
-
ICalloutTokens,
|
|
9
|
-
ICalloutType,
|
|
10
|
-
RestoreFocusEvent,
|
|
11
|
-
} from './Callout.types';
|
|
12
|
-
export type { CalloutNativeCommands } from './CalloutNativeComponent.types';
|
|
2
|
+
export type { DirectionalHint, DismissBehaviors, ICalloutProps, ICalloutRenderData, ICalloutSlotProps, ICalloutTokens, ICalloutType, RestoreFocusEvent, } from './Callout.types';
|
|
3
|
+
export type { CalloutNativeCommands } from './CalloutNativeComponent';
|
|
13
4
|
export { Callout } from './Callout';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Callout = exports.calloutName = void 0;
|
|
4
|
-
const Callout_types_1 = require(
|
|
5
|
-
Object.defineProperty(exports,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
});
|
|
11
|
-
const Callout_1 = require('./Callout');
|
|
12
|
-
Object.defineProperty(exports, 'Callout', {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return Callout_1.Callout;
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
4
|
+
const Callout_types_1 = require("./Callout.types");
|
|
5
|
+
Object.defineProperty(exports, "calloutName", { enumerable: true, get: function () { return Callout_types_1.calloutName; } });
|
|
6
|
+
const Callout_1 = require("./Callout");
|
|
7
|
+
Object.defineProperty(exports, "Callout", { enumerable: true, get: function () { return Callout_1.Callout; } });
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -28,7 +28,8 @@ RCT_ENUM_CONVERTER(NSRectEdge, (@{
|
|
|
28
28
|
@"rightTopEdge": @(NSRectEdgeMaxX),
|
|
29
29
|
@"rightCenter": @(NSRectEdgeMaxX),
|
|
30
30
|
@"rightBottomEdge": @(NSRectEdgeMaxX),
|
|
31
|
-
@"
|
|
31
|
+
@"bottomLeftEdge": @(NSRectEdgeMinY),
|
|
32
|
+
@"bottonLeftEdge": @(NSRectEdgeMinY), // Add both the correct and incorrect spellings during the transition period
|
|
32
33
|
@"bottomAutoEdge": @(NSRectEdgeMinY),
|
|
33
34
|
@"bottomCenter": @(NSRectEdgeMinY),
|
|
34
35
|
@"bottomRightEdge": @(NSRectEdgeMinY),
|
package/package.json
CHANGED
|
@@ -1,70 +1,71 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "A cross-platform Callout component using the Fluent Design System",
|
|
5
5
|
"homepage": "https://github.com/microsoft/fluentui-react-native",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "",
|
|
6
8
|
"repository": {
|
|
7
9
|
"type": "git",
|
|
8
10
|
"url": "https://github.com/microsoft/fluentui-react-native.git",
|
|
9
11
|
"directory": "packages/components/Callout"
|
|
10
12
|
},
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
+
"main": "lib-commonjs/index.js",
|
|
14
|
+
"module": "lib/index.js",
|
|
15
|
+
"types": "lib/index.d.ts",
|
|
13
16
|
"exports": {
|
|
14
17
|
".": {
|
|
15
18
|
"types": "./lib/index.d.ts",
|
|
16
19
|
"import": "./lib/index.js",
|
|
17
|
-
"require": "./lib-commonjs/index.js"
|
|
20
|
+
"require": "./lib-commonjs/index.js",
|
|
21
|
+
"default": "./src/index.ts"
|
|
18
22
|
}
|
|
19
23
|
},
|
|
20
|
-
"main": "lib-commonjs/index.js",
|
|
21
|
-
"module": "lib/index.js",
|
|
22
|
-
"types": "lib/index.d.ts",
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "fluentui-scripts build",
|
|
25
26
|
"build-cjs": "tsgo --outDir lib-commonjs",
|
|
26
|
-
"build-
|
|
27
|
+
"build-core": "tsgo --outDir lib --module esnext --moduleResolution bundler",
|
|
27
28
|
"clean": "fluentui-scripts clean",
|
|
28
29
|
"depcheck": "fluentui-scripts depcheck",
|
|
29
|
-
"
|
|
30
|
+
"format": "fluentui-scripts format",
|
|
31
|
+
"lint": "fluentui-scripts lint",
|
|
30
32
|
"lint-package": "fluentui-scripts lint-package",
|
|
31
|
-
"prettier": "fluentui-scripts prettier",
|
|
32
33
|
"test": "fluentui-scripts jest",
|
|
33
34
|
"update-snapshots": "fluentui-scripts jest -u"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@fluentui-react-native/adapters": "0.14.
|
|
37
|
-
"@fluentui-react-native/tokens": "0.24.
|
|
38
|
-
"@uifabricshared/foundation-composable": "0.14.
|
|
39
|
-
"@uifabricshared/foundation-compose": "1.16.
|
|
40
|
-
"@uifabricshared/foundation-settings": "0.16.
|
|
37
|
+
"@fluentui-react-native/adapters": "0.14.3",
|
|
38
|
+
"@fluentui-react-native/tokens": "0.24.3",
|
|
39
|
+
"@uifabricshared/foundation-composable": "0.14.3",
|
|
40
|
+
"@uifabricshared/foundation-compose": "1.16.3",
|
|
41
|
+
"@uifabricshared/foundation-settings": "0.16.3"
|
|
41
42
|
},
|
|
42
43
|
"devDependencies": {
|
|
43
44
|
"@babel/core": "^7.20.0",
|
|
44
45
|
"@fluentui-react-native/babel-config": "0.1.1",
|
|
45
|
-
"@fluentui-react-native/
|
|
46
|
-
"@fluentui-react-native/jest-config": "0.1.1",
|
|
46
|
+
"@fluentui-react-native/jest-config": "0.1.0",
|
|
47
47
|
"@fluentui-react-native/kit-config": "0.1.2",
|
|
48
|
-
"@fluentui-react-native/
|
|
48
|
+
"@fluentui-react-native/lint-config-rules": "0.1.3",
|
|
49
|
+
"@fluentui-react-native/scripts": "0.1.0",
|
|
49
50
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
50
51
|
"@react-native-community/cli": "^20.0.0",
|
|
51
52
|
"@react-native-community/cli-platform-android": "^20.0.0",
|
|
52
53
|
"@react-native-community/cli-platform-ios": "^20.0.0",
|
|
53
54
|
"@react-native/babel-preset": "^0.81.0",
|
|
54
55
|
"@react-native/metro-config": "^0.81.0",
|
|
55
|
-
"@types/react": "~19.1.
|
|
56
|
+
"@types/react": "~19.1.4",
|
|
56
57
|
"@types/react-test-renderer": "^19.1.0",
|
|
57
|
-
"react": "19.1.
|
|
58
|
-
"react-native": "^0.81.
|
|
58
|
+
"react": "19.1.4",
|
|
59
|
+
"react-native": "^0.81.6",
|
|
59
60
|
"react-native-macos": "^0.81.0",
|
|
60
61
|
"react-native-windows": "^0.81.0",
|
|
61
|
-
"react-test-renderer": "19.1.
|
|
62
|
+
"react-test-renderer": "19.1.4"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
65
|
"@office-iss/react-native-win32": "^0.74.0",
|
|
65
|
-
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.
|
|
66
|
-
"react": "18.2.0 || 19.0.0 || 19.1.
|
|
67
|
-
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.
|
|
66
|
+
"@types/react": "~18.2.0 || ~19.0.0 || ~19.1.4",
|
|
67
|
+
"react": "18.2.0 || 19.0.0 || 19.1.4",
|
|
68
|
+
"react-native": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.6",
|
|
68
69
|
"react-native-macos": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0",
|
|
69
70
|
"react-native-windows": "^0.73.0 || ^0.74.0 || ^0.78.0 || ^0.81.0"
|
|
70
71
|
},
|
package/src/Callout.types.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type { KeyboardMetrics, ViewStyle
|
|
2
|
+
import type { KeyboardMetrics, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import type { IViewProps } from '@fluentui-react-native/adapters';
|
|
5
5
|
import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
|
|
6
6
|
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
7
7
|
|
|
8
|
-
import type { CalloutNativeCommands } from './CalloutNativeComponent
|
|
8
|
+
import type { CalloutNativeCommands } from './CalloutNativeComponent';
|
|
9
9
|
export const calloutName = 'Callout';
|
|
10
10
|
|
|
11
|
-
import type { DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
12
|
* Properties and Tokens for FluentUI React Native Callout
|
|
15
13
|
*/
|
|
@@ -25,7 +23,8 @@ export type DirectionalHint =
|
|
|
25
23
|
| 'rightTopEdge'
|
|
26
24
|
| 'rightCenter'
|
|
27
25
|
| 'rightBottomEdge'
|
|
28
|
-
| '
|
|
26
|
+
| 'bottomLeftEdge'
|
|
27
|
+
| 'bottonLeftEdge' // Typo in the original code, should be 'bottomLeftEdge'
|
|
29
28
|
| 'bottomAutoEdge'
|
|
30
29
|
| 'bottomCenter'
|
|
31
30
|
| 'bottomRightEdge';
|
|
@@ -227,34 +226,3 @@ export interface ICalloutType {
|
|
|
227
226
|
slotProps: ICalloutSlotProps;
|
|
228
227
|
tokens: ICalloutTokens;
|
|
229
228
|
}
|
|
230
|
-
|
|
231
|
-
type AnchorRect = {
|
|
232
|
-
screenX: Double;
|
|
233
|
-
screenY: Double;
|
|
234
|
-
width: Double;
|
|
235
|
-
height: Double;
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Shared native props specific to Callout native component
|
|
240
|
-
*/
|
|
241
|
-
export interface NativePropsBase extends ViewProps {
|
|
242
|
-
accessibilityLabel?: string;
|
|
243
|
-
accessibilityOnShowAnnouncement?: string;
|
|
244
|
-
anchorRect?: AnchorRect;
|
|
245
|
-
|
|
246
|
-
dismissBehaviors?: string[];
|
|
247
|
-
doNotTakePointerCapture?: boolean;
|
|
248
|
-
focusable?: boolean;
|
|
249
|
-
isBeakVisible?: boolean;
|
|
250
|
-
maxHeight?: Int32;
|
|
251
|
-
maxWidth?: Int32;
|
|
252
|
-
setInitialFocus?: boolean;
|
|
253
|
-
|
|
254
|
-
// targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward
|
|
255
|
-
testID?: string;
|
|
256
|
-
|
|
257
|
-
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
258
|
-
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
259
|
-
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
260
|
-
}
|
|
@@ -1,12 +1,69 @@
|
|
|
1
1
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
|
-
import
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
5
|
+
import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
interface AnchorRect {
|
|
8
|
+
screenX: Double;
|
|
9
|
+
screenY: Double;
|
|
10
|
+
width: Double;
|
|
11
|
+
height: Double;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Shared native props specific to Callout native component
|
|
16
|
+
*/
|
|
17
|
+
export interface NativeProps extends ViewProps {
|
|
18
|
+
accessibilityLabel?: string;
|
|
19
|
+
accessibilityOnShowAnnouncement?: string;
|
|
20
|
+
anchorRect?: AnchorRect;
|
|
21
|
+
|
|
22
|
+
dismissBehaviors?: string[];
|
|
23
|
+
doNotTakePointerCapture?: boolean;
|
|
24
|
+
focusable?: boolean;
|
|
25
|
+
isBeakVisible?: boolean;
|
|
26
|
+
maxHeight?: Int32;
|
|
27
|
+
maxWidth?: Int32;
|
|
28
|
+
setInitialFocus?: boolean;
|
|
29
|
+
|
|
30
|
+
// targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward
|
|
31
|
+
testID?: string;
|
|
32
|
+
|
|
33
|
+
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
34
|
+
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
35
|
+
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
36
|
+
|
|
37
|
+
directionalHint?: WithDefault<
|
|
38
|
+
| 'leftTopEdge'
|
|
39
|
+
| 'leftCenter'
|
|
40
|
+
| 'leftBottomEdge'
|
|
41
|
+
| 'topLeftEdge'
|
|
42
|
+
| 'topAutoEdge'
|
|
43
|
+
| 'topCenter'
|
|
44
|
+
| 'topRightEdge'
|
|
45
|
+
| 'rightTopEdge'
|
|
46
|
+
| 'rightCenter'
|
|
47
|
+
| 'rightBottomEdge'
|
|
48
|
+
| 'bottomLeftEdge'
|
|
49
|
+
| 'bottonLeftEdge' // Typo in the original code, should be 'bottomLeftEdge'
|
|
50
|
+
| 'bottomAutoEdge'
|
|
51
|
+
| 'bottomCenter'
|
|
52
|
+
| 'bottomRightEdge',
|
|
53
|
+
'topleftEdge'
|
|
54
|
+
>;
|
|
55
|
+
target?: UnsafeMixed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
59
|
+
|
|
60
|
+
export interface CalloutNativeCommands {
|
|
61
|
+
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
62
|
+
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
63
|
+
}
|
|
5
64
|
|
|
6
65
|
export const Commands: CalloutNativeCommands = codegenNativeCommands<CalloutNativeCommands>({
|
|
7
66
|
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
8
67
|
});
|
|
9
68
|
|
|
10
|
-
|
|
11
|
-
// macOS uses FRNCallout (registered by FRNCalloutManager), not RCTCallout
|
|
12
|
-
export default requireNativeComponent<NativeProps>('FRNCallout') as CalloutComponentType;
|
|
69
|
+
export default codegenNativeComponent<NativeProps>('FRNCallout') as CalloutComponentType;
|
|
@@ -1,7 +1,66 @@
|
|
|
1
1
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
|
|
4
|
-
import type {
|
|
4
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
5
|
+
import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
interface AnchorRect {
|
|
8
|
+
screenX: Double;
|
|
9
|
+
screenY: Double;
|
|
10
|
+
width: Double;
|
|
11
|
+
height: Double;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Shared native props specific to Callout native component
|
|
16
|
+
*/
|
|
17
|
+
export interface NativeProps extends ViewProps {
|
|
18
|
+
accessibilityLabel?: string;
|
|
19
|
+
accessibilityOnShowAnnouncement?: string;
|
|
20
|
+
anchorRect?: AnchorRect;
|
|
21
|
+
|
|
22
|
+
dismissBehaviors?: string[];
|
|
23
|
+
doNotTakePointerCapture?: boolean;
|
|
24
|
+
focusable?: boolean;
|
|
25
|
+
isBeakVisible?: boolean;
|
|
26
|
+
maxHeight?: Int32;
|
|
27
|
+
maxWidth?: Int32;
|
|
28
|
+
setInitialFocus?: boolean;
|
|
29
|
+
|
|
30
|
+
// targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward
|
|
31
|
+
testID?: string;
|
|
32
|
+
|
|
33
|
+
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
34
|
+
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
35
|
+
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
36
|
+
|
|
37
|
+
directionalHint?: WithDefault<
|
|
38
|
+
| 'leftTopEdge'
|
|
39
|
+
| 'leftCenter'
|
|
40
|
+
| 'leftBottomEdge'
|
|
41
|
+
| 'topLeftEdge'
|
|
42
|
+
| 'topAutoEdge'
|
|
43
|
+
| 'topCenter'
|
|
44
|
+
| 'topRightEdge'
|
|
45
|
+
| 'rightTopEdge'
|
|
46
|
+
| 'rightCenter'
|
|
47
|
+
| 'rightBottomEdge'
|
|
48
|
+
| 'bottomLeftEdge'
|
|
49
|
+
| 'bottonLeftEdge' // Typo in the original code, should be 'bottomLeftEdge'
|
|
50
|
+
| 'bottomAutoEdge'
|
|
51
|
+
| 'bottomCenter'
|
|
52
|
+
| 'bottomRightEdge',
|
|
53
|
+
'bottonLeftEdge'
|
|
54
|
+
>;
|
|
55
|
+
target?: UnsafeMixed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
59
|
+
|
|
60
|
+
export interface CalloutNativeCommands {
|
|
61
|
+
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
62
|
+
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
63
|
+
}
|
|
5
64
|
|
|
6
65
|
export const Commands: CalloutNativeCommands = codegenNativeCommands<CalloutNativeCommands>({
|
|
7
66
|
supportedCommands: ['blurWindow', 'focusWindow'],
|
package/src/index.ts
CHANGED
|
@@ -9,5 +9,5 @@ export type {
|
|
|
9
9
|
ICalloutType,
|
|
10
10
|
RestoreFocusEvent,
|
|
11
11
|
} from './Callout.types';
|
|
12
|
-
export type { CalloutNativeCommands } from './CalloutNativeComponent
|
|
12
|
+
export type { CalloutNativeCommands } from './CalloutNativeComponent';
|
|
13
13
|
export { Callout } from './Callout';
|
package/eslint.config.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { HostComponent } from 'react-native';
|
|
2
|
-
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
import type { UnsafeMixed } from './codegenTypes';
|
|
4
|
-
import type { NativePropsBase } from './Callout.types';
|
|
5
|
-
export interface NativeProps extends NativePropsBase {
|
|
6
|
-
directionalHint?: WithDefault<
|
|
7
|
-
| 'leftTopEdge'
|
|
8
|
-
| 'leftCenter'
|
|
9
|
-
| 'leftBottomEdge'
|
|
10
|
-
| 'topLeftEdge'
|
|
11
|
-
| 'topAutoEdge'
|
|
12
|
-
| 'topCenter'
|
|
13
|
-
| 'topRightEdge'
|
|
14
|
-
| 'rightTopEdge'
|
|
15
|
-
| 'rightCenter'
|
|
16
|
-
| 'rightBottomEdge'
|
|
17
|
-
| 'bottonLeftEdge'
|
|
18
|
-
| 'bottomAutoEdge'
|
|
19
|
-
| 'bottomCenter'
|
|
20
|
-
| 'bottomRightEdge',
|
|
21
|
-
'bottonLeftEdge'
|
|
22
|
-
>;
|
|
23
|
-
target?: UnsafeMixed;
|
|
24
|
-
}
|
|
25
|
-
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
26
|
-
export type CalloutNativeCommands = {
|
|
27
|
-
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
28
|
-
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=CalloutNativeComponent.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,WAAW,CACzB,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,WAAW,GACX,cAAc,GACd,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,EACnB,gBAAgB,CACjB,CAAC;IACF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;IACvE,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { HostComponent } from 'react-native';
|
|
2
|
-
import type { WithDefault, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
import type { NativePropsBase } from './Callout.types';
|
|
4
|
-
export interface NativeProps extends NativePropsBase {
|
|
5
|
-
directionalHint?: WithDefault<
|
|
6
|
-
| 'leftTopEdge'
|
|
7
|
-
| 'leftCenter'
|
|
8
|
-
| 'leftBottomEdge'
|
|
9
|
-
| 'topLeftEdge'
|
|
10
|
-
| 'topAutoEdge'
|
|
11
|
-
| 'topCenter'
|
|
12
|
-
| 'topRightEdge'
|
|
13
|
-
| 'rightTopEdge'
|
|
14
|
-
| 'rightCenter'
|
|
15
|
-
| 'rightBottomEdge'
|
|
16
|
-
| 'bottonLeftEdge'
|
|
17
|
-
| 'bottomAutoEdge'
|
|
18
|
-
| 'bottomCenter'
|
|
19
|
-
| 'bottomRightEdge',
|
|
20
|
-
'topLeftEdge'
|
|
21
|
-
>;
|
|
22
|
-
target?: Int32;
|
|
23
|
-
}
|
|
24
|
-
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
25
|
-
export type CalloutNativeCommands = {
|
|
26
|
-
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
27
|
-
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=CalloutNativeComponent.types.macos.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.macos.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.macos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,WAAW,CACzB,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,WAAW,GACX,cAAc,GACd,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,EACnB,aAAa,CACd,CAAC;IACF,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAGD,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;IACvE,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.macos.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.macos.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { CalloutComponentType, CalloutNativeCommands } from './CalloutNativeComponent.types';
|
|
2
|
-
export declare const Commands: CalloutNativeCommands;
|
|
3
|
-
declare const _default: CalloutComponentType;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=CalloutNativeComponent.win32.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.win32.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.win32.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE/G,eAAO,MAAM,QAAQ,EAAE,qBAErB,CAAC;;AAGH,wBAAyF"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
|
-
import { requireNativeComponent } from 'react-native';
|
|
3
|
-
export const Commands = codegenNativeCommands({
|
|
4
|
-
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
5
|
-
});
|
|
6
|
-
// no fabric for Win32, just use requireNativeComponent
|
|
7
|
-
export default requireNativeComponent('RCTCallout');
|
|
8
|
-
//# sourceMappingURL=CalloutNativeComponent.win32.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.win32.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.win32.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wDAAwD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAItD,MAAM,CAAC,MAAM,QAAQ,GAA0B,qBAAqB,CAAwB;IAC1F,iBAAiB,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;CACjD,CAAC,CAAC;AAEH,uDAAuD;AACvD,eAAe,sBAAsB,CAAc,YAAY,CAAyB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { HostComponent } from 'react-native';
|
|
2
|
-
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
import type { UnsafeMixed } from './codegenTypes';
|
|
4
|
-
import type { NativePropsBase } from './Callout.types';
|
|
5
|
-
export interface NativeProps extends NativePropsBase {
|
|
6
|
-
directionalHint?: WithDefault<
|
|
7
|
-
| 'leftTopEdge'
|
|
8
|
-
| 'leftCenter'
|
|
9
|
-
| 'leftBottomEdge'
|
|
10
|
-
| 'topLeftEdge'
|
|
11
|
-
| 'topAutoEdge'
|
|
12
|
-
| 'topCenter'
|
|
13
|
-
| 'topRightEdge'
|
|
14
|
-
| 'rightTopEdge'
|
|
15
|
-
| 'rightCenter'
|
|
16
|
-
| 'rightBottomEdge'
|
|
17
|
-
| 'bottonLeftEdge'
|
|
18
|
-
| 'bottomAutoEdge'
|
|
19
|
-
| 'bottomCenter'
|
|
20
|
-
| 'bottomRightEdge',
|
|
21
|
-
'bottonLeftEdge'
|
|
22
|
-
>;
|
|
23
|
-
target?: UnsafeMixed;
|
|
24
|
-
}
|
|
25
|
-
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
26
|
-
export type CalloutNativeCommands = {
|
|
27
|
-
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
28
|
-
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=CalloutNativeComponent.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD,eAAe,CAAC,EAAE,WAAW,CACzB,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,WAAW,GACX,cAAc,GACd,cAAc,GACd,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,EACnB,gBAAgB,CACjB,CAAC;IACF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAC9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;IACvE,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.types.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.types.ts"],"names":[],"mappings":""}
|