@fluentui-react-native/callout 0.25.14 → 0.25.16
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 +16 -1
- package/CHANGELOG.md +10 -2
- package/lib/Callout.d.ts +5 -0
- package/lib/Callout.d.ts.map +1 -1
- package/lib/Callout.js +9 -3
- package/lib/Callout.js.map +1 -1
- package/lib/CalloutNativeComponent.d.ts +42 -0
- package/lib/CalloutNativeComponent.d.ts.map +1 -0
- package/lib/CalloutNativeComponent.js +8 -0
- package/lib/CalloutNativeComponent.js.map +1 -0
- package/lib/MacOSCalloutNativeComponent.d.ts +41 -0
- package/lib/MacOSCalloutNativeComponent.d.ts.map +1 -0
- package/lib/MacOSCalloutNativeComponent.js +8 -0
- package/lib/MacOSCalloutNativeComponent.js.map +1 -0
- package/lib-commonjs/Callout.d.ts +5 -0
- package/lib-commonjs/Callout.d.ts.map +1 -1
- package/lib-commonjs/Callout.js +12 -3
- package/lib-commonjs/Callout.js.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.d.ts +42 -0
- package/lib-commonjs/CalloutNativeComponent.d.ts.map +1 -0
- package/lib-commonjs/CalloutNativeComponent.js +13 -0
- package/lib-commonjs/CalloutNativeComponent.js.map +1 -0
- package/lib-commonjs/MacOSCalloutNativeComponent.d.ts +41 -0
- package/lib-commonjs/MacOSCalloutNativeComponent.d.ts.map +1 -0
- package/lib-commonjs/MacOSCalloutNativeComponent.js +13 -0
- package/lib-commonjs/MacOSCalloutNativeComponent.js.map +1 -0
- package/package.json +5 -6
- package/src/Callout.tsx +14 -4
- package/src/CalloutNativeComponent.ts +60 -0
- package/src/MacOSCalloutNativeComponent.ts +55 -0
- package/src/codegenTypes.d.ts +2 -0
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,22 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Fri,
|
|
5
|
+
"date": "Fri, 29 Mar 2024 18:05:02 GMT",
|
|
6
|
+
"version": "0.25.16",
|
|
7
|
+
"tag": "@fluentui-react-native/callout_v0.25.16",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "30809111+acoates-ms@users.noreply.github.com",
|
|
12
|
+
"package": "@fluentui-react-native/callout",
|
|
13
|
+
"commit": "a722aa94799f4afee55baa03a5a754b0d4b2fdce",
|
|
14
|
+
"comment": "Use codegenNativeComponent so JS View configs can be generated for all native components"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 15 Mar 2024 16:26:18 GMT",
|
|
6
21
|
"version": "0.25.14",
|
|
7
22
|
"tag": "@fluentui-react-native/callout_v0.25.14",
|
|
8
23
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/callout
|
|
2
2
|
|
|
3
|
-
This log was last generated on Fri,
|
|
3
|
+
This log was last generated on Fri, 29 Mar 2024 18:05:02 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.25.16
|
|
8
|
+
|
|
9
|
+
Fri, 29 Mar 2024 18:05:02 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Use codegenNativeComponent so JS View configs can be generated for all native components (30809111+acoates-ms@users.noreply.github.com)
|
|
14
|
+
|
|
7
15
|
## 0.25.14
|
|
8
16
|
|
|
9
|
-
Fri, 15 Mar 2024 16:
|
|
17
|
+
Fri, 15 Mar 2024 16:26:18 GMT
|
|
10
18
|
|
|
11
19
|
### Patches
|
|
12
20
|
|
package/lib/Callout.d.ts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
1
6
|
import type { ICalloutProps, ICalloutSlotProps } from './Callout.types';
|
|
2
7
|
export declare const Callout: import("@uifabricshared/foundation-compose").IComposeReturnType<ICalloutProps, ICalloutSlotProps, import("./Callout.types").ICalloutTokens, object, object>;
|
|
3
8
|
export default Callout;
|
package/lib/Callout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,iBAAiB,CAAC;AAYtF,eAAO,MAAM,OAAO,6JAqClB,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/lib/Callout.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++) {
|
|
@@ -22,16 +27,17 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
27
|
};
|
|
23
28
|
import * as React from 'react';
|
|
24
29
|
import { findNodeHandle, Platform } from 'react-native';
|
|
25
|
-
import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
|
|
26
30
|
import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
27
31
|
import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens';
|
|
28
32
|
import { compose } from '@uifabricshared/foundation-compose';
|
|
29
33
|
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
30
34
|
import { settings } from './Callout.settings';
|
|
31
35
|
import { calloutName } from './Callout.types';
|
|
36
|
+
import CalloutNativeComponent from './CalloutNativeComponent';
|
|
37
|
+
import MacOSCalloutNativeComponent from './MacOSCalloutNativeComponent';
|
|
32
38
|
var NativeCalloutView = Platform.select({
|
|
33
|
-
macos:
|
|
34
|
-
default:
|
|
39
|
+
macos: MacOSCalloutNativeComponent,
|
|
40
|
+
default: CalloutNativeComponent, // win32
|
|
35
41
|
});
|
|
36
42
|
export var Callout = compose({
|
|
37
43
|
displayName: calloutName,
|
package/lib/Callout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAEpF,OAAO,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,sBAAsB,MAAM,0BAA0B,CAAC;AAE9D,OAAO,2BAA2B,MAAM,+BAA+B,CAAC;AAExE,IAAM,iBAAiB,GAAG,QAAQ,CAAC,MAAM,CAA6E;IACpH,KAAK,EAAE,2BAA2B;IAClC,OAAO,EAAE,sBAAsB,EAAE,QAAQ;CAC1C,C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H,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
import type { WithDefault, DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
import type { UnsafeMixed } from './codegenTypes';
|
|
9
|
+
type AnchorRect = {
|
|
10
|
+
screenX: Double;
|
|
11
|
+
screenY: Double;
|
|
12
|
+
width: Double;
|
|
13
|
+
height: Double;
|
|
14
|
+
};
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
accessibilityLabel?: string;
|
|
17
|
+
accessibilityOnShowAnnouncement?: string;
|
|
18
|
+
anchorRect?: AnchorRect;
|
|
19
|
+
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'bottonLeftEdge'>;
|
|
20
|
+
dismissBehaviors?: string[];
|
|
21
|
+
doNotTakePointerCapture?: boolean;
|
|
22
|
+
focusable?: boolean;
|
|
23
|
+
isBeakVisible?: boolean;
|
|
24
|
+
maxHeight?: Int32;
|
|
25
|
+
maxWidth?: Int32;
|
|
26
|
+
setInitialFocus?: boolean;
|
|
27
|
+
target?: UnsafeMixed;
|
|
28
|
+
testID?: string;
|
|
29
|
+
onRestoreFocus?: DirectEventHandler<{
|
|
30
|
+
target: Int32;
|
|
31
|
+
containsFocus: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
onDismiss?: DirectEventHandler<{
|
|
34
|
+
target: Int32;
|
|
35
|
+
}>;
|
|
36
|
+
onShow?: DirectEventHandler<{
|
|
37
|
+
target: Int32;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
declare const _default: HostComponent<NativeProps>;
|
|
41
|
+
export default _default;
|
|
42
|
+
//# sourceMappingURL=CalloutNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAGhH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,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,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,WAAW,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,cAAc,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/E,SAAS,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CAChD;;AAED,wBAA+F"}
|
|
@@ -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('RCTCallout');
|
|
8
|
+
//# sourceMappingURL=CalloutNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;AAkD7F,eAAe,sBAAsB,CAAc,YAAY,CAA+B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
type AnchorRect = {
|
|
9
|
+
screenX: Double;
|
|
10
|
+
screenY: Double;
|
|
11
|
+
width: Double;
|
|
12
|
+
height: Double;
|
|
13
|
+
};
|
|
14
|
+
export interface NativeProps extends ViewProps {
|
|
15
|
+
accessibilityLabel?: string;
|
|
16
|
+
accessibilityOnShowAnnouncement?: string;
|
|
17
|
+
anchorRect?: AnchorRect;
|
|
18
|
+
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'topLeftEdge'>;
|
|
19
|
+
dismissBehaviors?: string[];
|
|
20
|
+
doNotTakePointerCapture?: boolean;
|
|
21
|
+
focusable?: boolean;
|
|
22
|
+
isBeakVisible?: boolean;
|
|
23
|
+
maxHeight?: Int32;
|
|
24
|
+
maxWidth?: Int32;
|
|
25
|
+
setInitialFocus?: boolean;
|
|
26
|
+
target?: Int32;
|
|
27
|
+
testID?: string;
|
|
28
|
+
onRestoreFocus?: DirectEventHandler<{
|
|
29
|
+
target: Int32;
|
|
30
|
+
containsFocus: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
onDismiss?: DirectEventHandler<{
|
|
33
|
+
target: Int32;
|
|
34
|
+
}>;
|
|
35
|
+
onShow?: DirectEventHandler<{
|
|
36
|
+
target: Int32;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: HostComponent<NativeProps>;
|
|
40
|
+
export default _default;
|
|
41
|
+
//# sourceMappingURL=MacOSCalloutNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MacOSCalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/MacOSCalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,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C;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CAChD;;AAED,wBAA+F"}
|
|
@@ -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('FRNCallout');
|
|
8
|
+
//# sourceMappingURL=MacOSCalloutNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MacOSCalloutNativeComponent.js","sourceRoot":"","sources":["../src/MacOSCalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;AA6C7F,eAAe,sBAAsB,CAAc,YAAY,CAA+B,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
1
6
|
import type { ICalloutProps, ICalloutSlotProps } from './Callout.types';
|
|
2
7
|
export declare const Callout: import("@uifabricshared/foundation-compose").IComposeReturnType<ICalloutProps, ICalloutSlotProps, import("./Callout.types").ICalloutTokens, object, object>;
|
|
3
8
|
export default Callout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,iBAAiB,CAAC;AAYtF,eAAO,MAAM,OAAO,6JAqClB,CAAC;AAEH,eAAe,OAAO,CAAC"}
|
package/lib-commonjs/Callout.js
CHANGED
|
@@ -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++) {
|
|
@@ -44,20 +49,24 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
44
49
|
}
|
|
45
50
|
return t;
|
|
46
51
|
};
|
|
52
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
53
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
54
|
+
};
|
|
47
55
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
56
|
exports.Callout = void 0;
|
|
49
57
|
var React = __importStar(require("react"));
|
|
50
58
|
var react_native_1 = require("react-native");
|
|
51
|
-
var component_cache_1 = require("@fluentui-react-native/component-cache");
|
|
52
59
|
var interactive_hooks_1 = require("@fluentui-react-native/interactive-hooks");
|
|
53
60
|
var tokens_1 = require("@fluentui-react-native/tokens");
|
|
54
61
|
var foundation_compose_1 = require("@uifabricshared/foundation-compose");
|
|
55
62
|
var foundation_settings_1 = require("@uifabricshared/foundation-settings");
|
|
56
63
|
var Callout_settings_1 = require("./Callout.settings");
|
|
57
64
|
var Callout_types_1 = require("./Callout.types");
|
|
65
|
+
var CalloutNativeComponent_1 = __importDefault(require("./CalloutNativeComponent"));
|
|
66
|
+
var MacOSCalloutNativeComponent_1 = __importDefault(require("./MacOSCalloutNativeComponent"));
|
|
58
67
|
var NativeCalloutView = react_native_1.Platform.select({
|
|
59
|
-
macos:
|
|
60
|
-
default:
|
|
68
|
+
macos: MacOSCalloutNativeComponent_1.default,
|
|
69
|
+
default: CalloutNativeComponent_1.default, // win32
|
|
61
70
|
});
|
|
62
71
|
exports.Callout = (0, foundation_compose_1.compose)({
|
|
63
72
|
displayName: Callout_types_1.calloutName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA+B;AAC/B,6CAAwD;AAGxD,8EAA+E;AAC/E,wDAAoF;AAEpF,yEAA6D;AAC7D,2EAAoE;AAEpE,uDAA8C;AAE9C,iDAA8C;AAE9C,oFAA8D;AAE9D,8FAAwE;AAExE,IAAM,iBAAiB,GAAG,uBAAQ,CAAC,MAAM,CAA6E;IACpH,KAAK,EAAE,qCAA2B;IAClC,OAAO,EAAE,gCAAsB,EAAE,QAAQ;CAC1C,CAAC,CAAC;AAEU,QAAA,OAAO,GAAG,IAAA,4BAAO,EAAe;IAC3C,WAAW,EAAE,2BAAW;IACxB,eAAe,EAAE,UAAC,KAAoB,EAAE,UAA4C;QAC1E,IAAA,YAAY,GAAsB,KAAK,aAA3B,EAAE,MAAM,GAAc,KAAK,OAAnB,EAAK,IAAI,UAAK,KAAK,EAAzC,0BAAiC,CAAF,CAAW;QAChD,IAAM,UAAU,GAAG,IAAA,uCAAmB,EAAC,YAAY,CAAC,CAAC;QAC/C,IAAA,KAAkC,KAAK,CAAC,QAAQ,CAAyB,IAAI,CAAC,EAA7E,YAAY,QAAA,EAAE,eAAe,QAAgD,CAAC;QAErF,KAAK,CAAC,eAAe,CAAC;YACpB,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;gBAC9B,qCAAqC;gBACrC,eAAe,CAAC,MAAM,CAAC,CAAC;aACzB;iBAAM,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE;gBAC1B,0CAA0C;gBAC1C,eAAe,CAAC,IAAA,6BAAc,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;aACjD;iBAAM;gBACL,iEAAiE;gBACjE,eAAe,CAAC,IAAI,CAAC,CAAC;aACvB;QACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;QAEb,IAAM,SAAS,GAAG,IAAA,mCAAa,EAAoB,UAAU,CAAC,KAAK,CAAC,EAAE;YACpE,IAAI,sBACF,GAAG,EAAE,UAAU,IACZ,CAAC,YAAY,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAC1C,IAAI,CACR;SACF,CAAC,CAAC;QAEH,OAAO,EAAE,SAAS,WAAA,EAAE,CAAC;IACvB,CAAC;IACD,QAAQ,EAAE,2BAAQ;IAClB,KAAK,EAAE;QACL,IAAI,EAAE,iBAAiB;KACxB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,8BAAqB,EAAE,qBAAY,CAAC;KAC5C;CACF,CAAC,CAAC;AAEH,kBAAe,eAAO,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
import type { WithDefault, DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
import type { UnsafeMixed } from './codegenTypes';
|
|
9
|
+
type AnchorRect = {
|
|
10
|
+
screenX: Double;
|
|
11
|
+
screenY: Double;
|
|
12
|
+
width: Double;
|
|
13
|
+
height: Double;
|
|
14
|
+
};
|
|
15
|
+
export interface NativeProps extends ViewProps {
|
|
16
|
+
accessibilityLabel?: string;
|
|
17
|
+
accessibilityOnShowAnnouncement?: string;
|
|
18
|
+
anchorRect?: AnchorRect;
|
|
19
|
+
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'bottonLeftEdge'>;
|
|
20
|
+
dismissBehaviors?: string[];
|
|
21
|
+
doNotTakePointerCapture?: boolean;
|
|
22
|
+
focusable?: boolean;
|
|
23
|
+
isBeakVisible?: boolean;
|
|
24
|
+
maxHeight?: Int32;
|
|
25
|
+
maxWidth?: Int32;
|
|
26
|
+
setInitialFocus?: boolean;
|
|
27
|
+
target?: UnsafeMixed;
|
|
28
|
+
testID?: string;
|
|
29
|
+
onRestoreFocus?: DirectEventHandler<{
|
|
30
|
+
target: Int32;
|
|
31
|
+
containsFocus: boolean;
|
|
32
|
+
}>;
|
|
33
|
+
onDismiss?: DirectEventHandler<{
|
|
34
|
+
target: Int32;
|
|
35
|
+
}>;
|
|
36
|
+
onShow?: DirectEventHandler<{
|
|
37
|
+
target: Int32;
|
|
38
|
+
}>;
|
|
39
|
+
}
|
|
40
|
+
declare const _default: HostComponent<NativeProps>;
|
|
41
|
+
export default _default;
|
|
42
|
+
//# sourceMappingURL=CalloutNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAGhH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,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
|
+
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)('RCTCallout');
|
|
13
|
+
//# sourceMappingURL=CalloutNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,mHAA6F;AAkD7F,kBAAe,IAAA,gCAAsB,EAAc,YAAY,CAA+B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
7
|
+
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
|
+
type AnchorRect = {
|
|
9
|
+
screenX: Double;
|
|
10
|
+
screenY: Double;
|
|
11
|
+
width: Double;
|
|
12
|
+
height: Double;
|
|
13
|
+
};
|
|
14
|
+
export interface NativeProps extends ViewProps {
|
|
15
|
+
accessibilityLabel?: string;
|
|
16
|
+
accessibilityOnShowAnnouncement?: string;
|
|
17
|
+
anchorRect?: AnchorRect;
|
|
18
|
+
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'topLeftEdge'>;
|
|
19
|
+
dismissBehaviors?: string[];
|
|
20
|
+
doNotTakePointerCapture?: boolean;
|
|
21
|
+
focusable?: boolean;
|
|
22
|
+
isBeakVisible?: boolean;
|
|
23
|
+
maxHeight?: Int32;
|
|
24
|
+
maxWidth?: Int32;
|
|
25
|
+
setInitialFocus?: boolean;
|
|
26
|
+
target?: Int32;
|
|
27
|
+
testID?: string;
|
|
28
|
+
onRestoreFocus?: DirectEventHandler<{
|
|
29
|
+
target: Int32;
|
|
30
|
+
containsFocus: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
onDismiss?: DirectEventHandler<{
|
|
33
|
+
target: Int32;
|
|
34
|
+
}>;
|
|
35
|
+
onShow?: DirectEventHandler<{
|
|
36
|
+
target: Int32;
|
|
37
|
+
}>;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: HostComponent<NativeProps>;
|
|
40
|
+
export default _default;
|
|
41
|
+
//# sourceMappingURL=MacOSCalloutNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MacOSCalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/MacOSCalloutNativeComponent.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAGhH,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,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,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,cAAc,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAC;QAAC,aAAa,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/E,SAAS,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,CAAC,CAAC;CAChD;;AAED,wBAA+F"}
|
|
@@ -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)('FRNCallout');
|
|
13
|
+
//# sourceMappingURL=MacOSCalloutNativeComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MacOSCalloutNativeComponent.js","sourceRoot":"","sources":["../src/MacOSCalloutNativeComponent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAKH,mHAA6F;AA6C7F,kBAAe,IAAA,gCAAsB,EAAc,YAAY,CAA+B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.16",
|
|
4
4
|
"description": "A cross-platform Callout component using the Fluent Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -25,12 +25,11 @@
|
|
|
25
25
|
"directory": "packages/components/Callout"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@fluentui-react-native/adapters": "0.12.
|
|
29
|
-
"@fluentui-react-native/
|
|
30
|
-
"@fluentui-react-native/
|
|
31
|
-
"@fluentui-react-native/tokens": "0.22.8",
|
|
28
|
+
"@fluentui-react-native/adapters": "0.12.3",
|
|
29
|
+
"@fluentui-react-native/interactive-hooks": "0.26.4",
|
|
30
|
+
"@fluentui-react-native/tokens": "0.22.9",
|
|
32
31
|
"@uifabricshared/foundation-composable": "0.12.5",
|
|
33
|
-
"@uifabricshared/foundation-compose": "1.14.
|
|
32
|
+
"@uifabricshared/foundation-compose": "1.14.25",
|
|
34
33
|
"@uifabricshared/foundation-settings": "0.14.1"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
package/src/Callout.tsx
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
* @format
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
import * as React from 'react';
|
|
2
8
|
import { findNodeHandle, Platform } from 'react-native';
|
|
9
|
+
import type { HostComponent } from 'react-native';
|
|
3
10
|
|
|
4
|
-
import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
|
|
5
11
|
import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
|
|
6
12
|
import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens';
|
|
7
13
|
import type { IUseComposeStyling } from '@uifabricshared/foundation-compose';
|
|
@@ -11,10 +17,14 @@ import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
|
11
17
|
import { settings } from './Callout.settings';
|
|
12
18
|
import type { ICalloutProps, ICalloutSlotProps, ICalloutType } from './Callout.types';
|
|
13
19
|
import { calloutName } from './Callout.types';
|
|
20
|
+
import type { NativeProps as CalloutNativeProps } from './CalloutNativeComponent';
|
|
21
|
+
import CalloutNativeComponent from './CalloutNativeComponent';
|
|
22
|
+
import type { NativeProps as MacOSCalloutNativeProps } from './MacOSCalloutNativeComponent';
|
|
23
|
+
import MacOSCalloutNativeComponent from './MacOSCalloutNativeComponent';
|
|
14
24
|
|
|
15
|
-
const NativeCalloutView = Platform.select({
|
|
16
|
-
macos:
|
|
17
|
-
default:
|
|
25
|
+
const NativeCalloutView = Platform.select<HostComponent<MacOSCalloutNativeProps> | HostComponent<CalloutNativeProps>>({
|
|
26
|
+
macos: MacOSCalloutNativeComponent,
|
|
27
|
+
default: CalloutNativeComponent, // win32
|
|
18
28
|
});
|
|
19
29
|
|
|
20
30
|
export const Callout = compose<ICalloutType>({
|
|
@@ -0,0 +1,60 @@
|
|
|
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 type { WithDefault, DirectEventHandler, Double, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
10
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
11
|
+
|
|
12
|
+
import type { UnsafeMixed } from './codegenTypes';
|
|
13
|
+
// Should be:
|
|
14
|
+
// import type {UnsafeMixed} from 'react-native/Libraries/Types/CodegenTypes';
|
|
15
|
+
|
|
16
|
+
type AnchorRect = {
|
|
17
|
+
screenX: Double;
|
|
18
|
+
screenY: Double;
|
|
19
|
+
width: Double;
|
|
20
|
+
height: Double;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export interface NativeProps extends ViewProps {
|
|
24
|
+
accessibilityLabel?: string;
|
|
25
|
+
accessibilityOnShowAnnouncement?: string;
|
|
26
|
+
anchorRect?: AnchorRect;
|
|
27
|
+
directionalHint?: WithDefault<
|
|
28
|
+
| 'leftTopEdge'
|
|
29
|
+
| 'leftCenter'
|
|
30
|
+
| 'leftBottomEdge'
|
|
31
|
+
| 'topLeftEdge'
|
|
32
|
+
| 'topAutoEdge'
|
|
33
|
+
| 'topCenter'
|
|
34
|
+
| 'topRightEdge'
|
|
35
|
+
| 'rightTopEdge'
|
|
36
|
+
| 'rightCenter'
|
|
37
|
+
| 'rightBottomEdge'
|
|
38
|
+
| 'bottonLeftEdge'
|
|
39
|
+
| 'bottomAutoEdge'
|
|
40
|
+
| 'bottomCenter'
|
|
41
|
+
| 'bottomRightEdge',
|
|
42
|
+
'bottonLeftEdge'
|
|
43
|
+
>;
|
|
44
|
+
dismissBehaviors?: string[];
|
|
45
|
+
doNotTakePointerCapture?: boolean;
|
|
46
|
+
focusable?: boolean;
|
|
47
|
+
isBeakVisible?: boolean;
|
|
48
|
+
maxHeight?: Int32;
|
|
49
|
+
maxWidth?: Int32;
|
|
50
|
+
setInitialFocus?: boolean;
|
|
51
|
+
target?: UnsafeMixed;
|
|
52
|
+
// 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
|
|
53
|
+
testID?: string;
|
|
54
|
+
|
|
55
|
+
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
56
|
+
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
57
|
+
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default codegenNativeComponent<NativeProps>('RCTCallout') as HostComponent<NativeProps>;
|
|
@@ -0,0 +1,55 @@
|
|
|
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 type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
10
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
11
|
+
|
|
12
|
+
type AnchorRect = {
|
|
13
|
+
screenX: Double;
|
|
14
|
+
screenY: Double;
|
|
15
|
+
width: Double;
|
|
16
|
+
height: Double;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export interface NativeProps extends ViewProps {
|
|
20
|
+
accessibilityLabel?: string;
|
|
21
|
+
accessibilityOnShowAnnouncement?: string;
|
|
22
|
+
anchorRect?: AnchorRect;
|
|
23
|
+
directionalHint?: WithDefault<
|
|
24
|
+
| 'leftTopEdge'
|
|
25
|
+
| 'leftCenter'
|
|
26
|
+
| 'leftBottomEdge'
|
|
27
|
+
| 'topLeftEdge'
|
|
28
|
+
| 'topAutoEdge'
|
|
29
|
+
| 'topCenter'
|
|
30
|
+
| 'topRightEdge'
|
|
31
|
+
| 'rightTopEdge'
|
|
32
|
+
| 'rightCenter'
|
|
33
|
+
| 'rightBottomEdge'
|
|
34
|
+
| 'bottonLeftEdge'
|
|
35
|
+
| 'bottomAutoEdge'
|
|
36
|
+
| 'bottomCenter'
|
|
37
|
+
| 'bottomRightEdge',
|
|
38
|
+
'topLeftEdge'
|
|
39
|
+
>;
|
|
40
|
+
dismissBehaviors?: string[];
|
|
41
|
+
doNotTakePointerCapture?: boolean;
|
|
42
|
+
focusable?: boolean;
|
|
43
|
+
isBeakVisible?: boolean;
|
|
44
|
+
maxHeight?: Int32;
|
|
45
|
+
maxWidth?: Int32;
|
|
46
|
+
setInitialFocus?: boolean;
|
|
47
|
+
target?: Int32;
|
|
48
|
+
testID?: string;
|
|
49
|
+
|
|
50
|
+
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
51
|
+
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
52
|
+
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default codegenNativeComponent<NativeProps>('FRNCallout') as HostComponent<NativeProps>;
|