@fluentui-react-native/callout 0.28.5 → 0.29.2
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/.cache/tsconfig.tsbuildinfo +1 -1
- package/CHANGELOG.md +65 -0
- package/FRNCallout.podspec +1 -1
- package/NuGet.config +10 -0
- package/SPEC.md +46 -0
- package/lib/Callout.d.ts +2 -5
- package/lib/Callout.d.ts.map +1 -1
- package/lib/Callout.js +57 -58
- package/lib/Callout.js.map +1 -1
- package/lib/Callout.types.d.ts +51 -152
- package/lib/Callout.types.d.ts.map +1 -1
- package/lib/Callout.types.js.map +1 -1
- package/lib/CalloutNativeComponent.d.ts +7 -3
- package/lib/CalloutNativeComponent.d.ts.map +1 -1
- package/lib/CalloutNativeComponent.js +3 -1
- package/lib/CalloutNativeComponent.js.map +1 -1
- package/lib/__tests__/Callout.test.js +94 -10
- package/lib/__tests__/Callout.test.js.map +1 -1
- package/lib/__tests__/Callout.types.test.d.ts +2 -0
- package/lib/__tests__/Callout.types.test.d.ts.map +1 -0
- package/lib/__tests__/Callout.types.test.js +21 -0
- package/lib/__tests__/Callout.types.test.js.map +1 -0
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/macos/CalloutManager.swift +1 -1
- package/macos/CalloutView.swift +49 -17
- package/macos/FRNCalloutManager.m +1 -2
- package/macos/RCTCalloutComponentView.h +12 -0
- package/macos/RCTCalloutComponentView.mm +208 -0
- package/package.json +27 -12
- package/react-native.config.cjs +15 -0
- package/src/Callout.stories.tsx +271 -0
- package/src/Callout.tsx +98 -64
- package/src/Callout.types.ts +50 -172
- package/src/CalloutNativeComponent.ts +10 -5
- package/src/__tests__/Callout.test.tsx +152 -8
- package/src/__tests__/Callout.types.test.ts +30 -0
- package/src/__tests__/__snapshots__/Callout.test.tsx.snap +8 -10
- package/src/index.ts +4 -4
- package/tsconfig.json +2 -13
- package/windows/Callout/Callout.cpp +398 -0
- package/windows/Callout/Callout.def +3 -0
- package/windows/Callout/Callout.h +25 -0
- package/windows/Callout/Callout.vcxproj +152 -0
- package/windows/Callout/ReactPackageProvider.cpp +25 -0
- package/windows/Callout/ReactPackageProvider.h +25 -0
- package/windows/Callout/ReactPackageProvider.idl +12 -0
- package/windows/Callout/codegen/.clang-format +2 -0
- package/windows/Callout/codegen/react/components/FRNCalloutSpec/Callout.g.h +375 -0
- package/windows/Callout/packages.lock.json +151 -0
- package/windows/Callout/pch.cpp +1 -0
- package/windows/Callout/pch.h +28 -0
- package/windows/ExperimentalFeatures.props +33 -0
- package/windows/NuGet.Config +13 -0
- package/lib/Callout.settings.d.ts +0 -4
- package/lib/Callout.settings.d.ts.map +0 -1
- package/lib/Callout.settings.js +0 -16
- package/lib/Callout.settings.js.map +0 -1
- package/lib/Callout.settings.macos.d.ts +0 -4
- package/lib/Callout.settings.macos.d.ts.map +0 -1
- package/lib/Callout.settings.macos.js +0 -19
- package/lib/Callout.settings.macos.js.map +0 -1
- package/lib/CalloutNativeComponent.macos.d.ts +0 -45
- package/lib/CalloutNativeComponent.macos.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.macos.js +0 -7
- package/lib/CalloutNativeComponent.macos.js.map +0 -1
- package/src/Callout.settings.macos.ts +0 -22
- package/src/Callout.settings.ts +0 -19
- package/src/CalloutNativeComponent.macos.ts +0 -69
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/callout
|
|
2
2
|
|
|
3
|
+
## 0.29.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 853f1fd: Moved the location of callout, with links to new location
|
|
8
|
+
- 5bc9e81: Fix the macOS Fabric build for Callout.
|
|
9
|
+
|
|
10
|
+
`codegenConfig.includesGeneratedCode` is read by React Native core's codegen executor rather than by
|
|
11
|
+
`react-native-windows`, so it told React Native that Callout ships generated code for every platform. Callout only ships
|
|
12
|
+
generated code for Windows, so Apple codegen stopped emitting
|
|
13
|
+
`react/renderer/components/FRNCalloutSpec/*`. `RCTCalloutComponentView.mm` then failed to compile, `libFRNCallout.a` was
|
|
14
|
+
never produced, and consuming apps failed at the link step with `library 'FRNCallout' not found`.
|
|
15
|
+
|
|
16
|
+
Removed the flag and updated the macOS component view for the `RCTCallout` to `Callout` component rename: the generated
|
|
17
|
+
types are now `CalloutProps`, `CalloutEventEmitter`, `CalloutState`, `CalloutDirectionalHint`,
|
|
18
|
+
`RCTCalloutViewProtocol`, and `RCTCalloutHandleCommand`. The view no longer redeclares the component name, shadow node,
|
|
19
|
+
or component descriptor by hand and imports them from the generated headers instead, which also removes a duplicate
|
|
20
|
+
`CalloutComponentName` definition.
|
|
21
|
+
|
|
22
|
+
- 5bc9e81: Normalize component controlled and uncontrolled state patterns and utilities
|
|
23
|
+
- cbd319c: Bump package to publish via ESRP (no changes)
|
|
24
|
+
- Updated dependencies [5bc9e81]
|
|
25
|
+
- Updated dependencies [5bc9e81]
|
|
26
|
+
- Updated dependencies [cbd319c]
|
|
27
|
+
- @fluentui-react-native/framework-base@0.6.1
|
|
28
|
+
|
|
29
|
+
## 0.29.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 2cb34bb: Use generated Windows Fabric bindings for Callout while preserving the native popup implementation.
|
|
34
|
+
- 3405262: Very initial framework for RNW fabric callout implementation
|
|
35
|
+
|
|
36
|
+
## 0.29.0
|
|
37
|
+
|
|
38
|
+
### Minor Changes
|
|
39
|
+
|
|
40
|
+
- 0f2b987: Reauthor Callout as an unstyled native primitive with modern props and command handle types
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- a99b3a8: Add macOS and Windows Fabric component views and interactive Callout stories
|
|
45
|
+
- 0f2b987: Use the RCTCallout native component name on macOS and share its native component definition across platforms
|
|
46
|
+
- Updated dependencies [778d82b]
|
|
47
|
+
- Updated dependencies [3abc13a]
|
|
48
|
+
- Updated dependencies [778d82b]
|
|
49
|
+
- @fluentui-react-native/framework-base@0.6.0
|
|
50
|
+
|
|
51
|
+
## 0.28.6
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- 801d8b1: Switch to the released typescript 7
|
|
56
|
+
- 5b5afea: Remove depcheck script, allow jest to run tests with platform module suffixes
|
|
57
|
+
- Updated dependencies [801d8b1]
|
|
58
|
+
- Updated dependencies [e2a4065]
|
|
59
|
+
- Updated dependencies [5b5afea]
|
|
60
|
+
- Updated dependencies [d2690c9]
|
|
61
|
+
- Updated dependencies [9d2bb3e]
|
|
62
|
+
- @uifabricshared/foundation-composable@0.15.0
|
|
63
|
+
- @uifabricshared/foundation-settings@0.16.6
|
|
64
|
+
- @uifabricshared/foundation-compose@1.16.6
|
|
65
|
+
- @fluentui-react-native/adapters@0.15.0
|
|
66
|
+
- @fluentui-react-native/tokens@0.24.6
|
|
67
|
+
|
|
3
68
|
## 0.28.5
|
|
4
69
|
|
|
5
70
|
### Patch Changes
|
package/FRNCallout.podspec
CHANGED
package/NuGet.config
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<configuration>
|
|
3
|
+
<packageSources>
|
|
4
|
+
<clear />
|
|
5
|
+
<add key="react-native" value="https://pkgs.dev.azure.com/ms/react-native/_packaging/react-native-public/nuget/v3/index.json" />
|
|
6
|
+
</packageSources>
|
|
7
|
+
<disabledPackageSources>
|
|
8
|
+
<clear />
|
|
9
|
+
</disabledPackageSources>
|
|
10
|
+
</configuration>
|
package/SPEC.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Callout
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Callout is an unstyled native primitive that presents children in transient UI
|
|
6
|
+
positioned relative to a target ref, registered native anchor, or anchor
|
|
7
|
+
rectangle. It remains a standalone package because it owns native code and
|
|
8
|
+
CocoaPods integration.
|
|
9
|
+
|
|
10
|
+
## Contract
|
|
11
|
+
|
|
12
|
+
- `CalloutProps` extends React Native `ViewProps` with target resolution,
|
|
13
|
+
dismissal callbacks, and `componentRef`.
|
|
14
|
+
- `target` accepts a React component ref or registered native anchor string.
|
|
15
|
+
When omitted, native positioning may use `anchorRect`.
|
|
16
|
+
- `componentRef` exposes `focusWindow()` and `blurWindow()`.
|
|
17
|
+
- Caller-supplied background, border, and dimension values are translated to
|
|
18
|
+
native view style. User `style` is applied last.
|
|
19
|
+
- The primitive applies no theme tokens or visible appearance defaults.
|
|
20
|
+
`position: 'absolute'` keeps popup content out of the parent page layout.
|
|
21
|
+
Transparent colors and zero-width/radius values satisfy the macOS native
|
|
22
|
+
layer contract when callers omit border and background props.
|
|
23
|
+
- Children, accessibility props, test props, native events, and supported
|
|
24
|
+
Callout behavior props are forwarded to `RCTCallout`.
|
|
25
|
+
|
|
26
|
+
## Platform behavior
|
|
27
|
+
|
|
28
|
+
- macOS presents children in a native popup window and supports window focus
|
|
29
|
+
commands through both Paper and Fabric component registrations.
|
|
30
|
+
- Windows uses the platform's built-in Paper `RCTCallout` and supplies a
|
|
31
|
+
package-owned Fabric registration for React Native Windows 0.81 and newer.
|
|
32
|
+
- Win32 supplies the platform `RCTCallout` implementation and supports native
|
|
33
|
+
dismissal, pointer capture, beak, and focus-restoration behavior.
|
|
34
|
+
- Unsupported native behavior remains platform-defined rather than being
|
|
35
|
+
simulated in JavaScript.
|
|
36
|
+
|
|
37
|
+
## Compatibility
|
|
38
|
+
|
|
39
|
+
`ICalloutProps`, `ICalloutTokens`, and `CalloutNativeCommands` remain as
|
|
40
|
+
deprecated aliases for the modern public types.
|
|
41
|
+
|
|
42
|
+
## Demonstration
|
|
43
|
+
|
|
44
|
+
Interactive scenarios live in
|
|
45
|
+
`apps/tester-core/src/TestComponents/Callout/CalloutTest.tsx`, with end-to-end
|
|
46
|
+
coverage under `apps/E2E/src/Callout`.
|
package/lib/Callout.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* @format
|
|
2
|
+
* Renders the native Callout without applying theme or appearance defaults.
|
|
5
3
|
*/
|
|
6
|
-
|
|
7
|
-
export declare const Callout: import("@uifabricshared/foundation-compose").IComposeReturnType<ICalloutProps, ICalloutSlotProps, import("./Callout.types").ICalloutTokens, object, object>;
|
|
4
|
+
export declare const Callout: any;
|
|
8
5
|
export default Callout;
|
|
9
6
|
//# sourceMappingURL=Callout.d.ts.map
|
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":"AAkBA;;GAEG;AACH,eAAO,MAAM,OAAO,KAqFlB,CAAC;eAIY,OAAO"}
|
package/lib/Callout.js
CHANGED
|
@@ -1,65 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* @format
|
|
5
|
-
*/
|
|
1
|
+
import { jsx as _jsx } from "@fluentui-react-native/framework-base/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @fluentui-react-native/framework-base */
|
|
6
3
|
import * as React from 'react';
|
|
7
|
-
import { findNodeHandle } from 'react-native';
|
|
8
|
-
import {
|
|
9
|
-
import { compose } from '@uifabricshared/foundation-compose';
|
|
10
|
-
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
|
11
|
-
import { settings } from './Callout.settings';
|
|
4
|
+
import { findNodeHandle, StyleSheet } from 'react-native';
|
|
5
|
+
import { directComponent, mergeProps, phasedComponent } from '@fluentui-react-native/framework-base';
|
|
12
6
|
import { calloutName } from './Callout.types';
|
|
13
|
-
import NativeCalloutView from './CalloutNativeComponent';
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const nativeComponentRef = React.useRef(null);
|
|
32
|
-
const [nativeTarget, setNativeTarget] = React.useState(null);
|
|
33
|
-
React.useLayoutEffect(() => {
|
|
34
|
-
if (typeof target === 'string') {
|
|
35
|
-
// Pass string type `target` directly
|
|
36
|
-
setNativeTarget(target);
|
|
37
|
-
}
|
|
38
|
-
else if (target?.current) {
|
|
39
|
-
// Pass the tagID for a valid ref `target`
|
|
40
|
-
setNativeTarget(findNodeHandle(target.current));
|
|
7
|
+
import NativeCalloutView, { Commands } from './CalloutNativeComponent';
|
|
8
|
+
const colorTransparent = '#00000000';
|
|
9
|
+
const styles = StyleSheet.create({
|
|
10
|
+
root: {
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Renders the native Callout without applying theme or appearance defaults.
|
|
16
|
+
*/
|
|
17
|
+
export const Callout = phasedComponent((props) => {
|
|
18
|
+
const { componentRef, target } = props;
|
|
19
|
+
const nativeComponentRef = React.useRef(null);
|
|
20
|
+
const [nativeTarget, setNativeTarget] = React.useState(undefined);
|
|
21
|
+
React.useImperativeHandle(componentRef, () => ({
|
|
22
|
+
blurWindow() {
|
|
23
|
+
if (nativeComponentRef.current !== null) {
|
|
24
|
+
Commands.blurWindow(nativeComponentRef.current);
|
|
41
25
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
},
|
|
27
|
+
focusWindow() {
|
|
28
|
+
if (nativeComponentRef.current !== null) {
|
|
29
|
+
Commands.focusWindow(nativeComponentRef.current);
|
|
45
30
|
}
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
31
|
+
},
|
|
32
|
+
}), []);
|
|
33
|
+
React.useLayoutEffect(() => {
|
|
34
|
+
if (typeof target === 'string') {
|
|
35
|
+
setNativeTarget(target);
|
|
36
|
+
}
|
|
37
|
+
else if (target?.current) {
|
|
38
|
+
setNativeTarget(findNodeHandle(target.current) ?? undefined);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
setNativeTarget(undefined);
|
|
42
|
+
}
|
|
43
|
+
}, [target]);
|
|
44
|
+
return directComponent((renderProps) => {
|
|
45
|
+
const { anchorRect, backgroundColor, beakWidth, borderColor, borderRadius, borderWidth, componentRef: _componentRef, directionalHint, dismissBehaviors, gapSpace, maxHeight, maxWidth, minPadding, minWidth, style, target: _target, ...nativeProps } = mergeProps(props, renderProps);
|
|
46
|
+
/**
|
|
47
|
+
* Build the style for the callout based on the props. For `borderColor`, `borderWidth`, `backgroundColor`, and
|
|
48
|
+
* `borderRadius` defaults values are required otherwise crashes in CalloutView.swift:updateLayer() will occur.
|
|
49
|
+
*/
|
|
50
|
+
const calloutStyle = {
|
|
51
|
+
backgroundColor: backgroundColor ?? colorTransparent,
|
|
52
|
+
borderColor: borderColor ?? colorTransparent,
|
|
53
|
+
borderWidth: borderWidth ?? 0,
|
|
54
|
+
borderRadius: borderRadius ?? 0,
|
|
55
|
+
...(maxHeight != null && { maxHeight }),
|
|
56
|
+
...(maxWidth != null && { maxWidth }),
|
|
57
|
+
...(minWidth != null && { minWidth }),
|
|
58
|
+
};
|
|
59
|
+
return (_jsx(NativeCalloutView, { ...nativeProps, anchorRect: anchorRect, beakWidth: beakWidth, directionalHint: directionalHint, dismissBehaviors: dismissBehaviors, gapSpace: gapSpace, maxHeight: typeof maxHeight === 'number' ? maxHeight : undefined, maxWidth: typeof maxWidth === 'number' ? maxWidth : undefined, minPadding: minPadding, minWidth: typeof minWidth === 'number' ? minWidth : undefined, ref: nativeComponentRef, style: [styles.root, calloutStyle, style], ...(nativeTarget !== undefined && { target: nativeTarget }) }));
|
|
60
|
+
});
|
|
63
61
|
});
|
|
62
|
+
Callout.displayName = calloutName;
|
|
64
63
|
export default Callout;
|
|
65
64
|
//# sourceMappingURL=Callout.js.map
|
package/lib/Callout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Callout.js","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAGrG,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,iBAAiB,EAAE,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEvE,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAErC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,IAAI,EAAE;QACJ,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAe,CAAC,KAAK,EAAE,EAAE;IAC7D,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACvC,MAAM,kBAAkB,GAAG,KAAK,CAAC,MAAM,CAAoD,IAAI,CAAC,CAAC;IACjG,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAA8B,SAAS,CAAC,CAAC;IA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adapters';
|
|
4
|
-
import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
|
|
5
|
-
import type { IRenderData } from '@uifabricshared/foundation-composable';
|
|
6
|
-
import type { CalloutNativeCommands } from './CalloutNativeComponent';
|
|
2
|
+
import type { AnimatableNumericValue, ColorValue, KeyboardMetrics, ViewProps } from 'react-native';
|
|
7
3
|
export declare const calloutName = "Callout";
|
|
8
|
-
|
|
9
|
-
* Properties and Tokens for FluentUI React Native Callout
|
|
10
|
-
*/
|
|
11
|
-
export type DirectionalHint = 'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottomLeftEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge';
|
|
4
|
+
export type DirectionalHint = 'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottomLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge';
|
|
12
5
|
export type DismissBehaviors = 'preventDismissOnKeyDown' | 'preventDismissOnClickOutside';
|
|
13
6
|
export interface RestoreFocusEvent {
|
|
14
7
|
nativeEvent: {
|
|
15
|
-
/**
|
|
16
|
-
* containsFocus is true if the Callout had focus while being dismissed.
|
|
17
|
-
*/
|
|
8
|
+
/** True when the Callout contained focus while it was dismissed. */
|
|
18
9
|
containsFocus: boolean;
|
|
19
10
|
};
|
|
20
11
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export interface
|
|
26
|
-
/**
|
|
27
|
-
* AnchorRect arbitrary anchor rectangle; coordinate system is in DIPs, relative
|
|
28
|
-
* to the React surface origin.
|
|
29
|
-
*/
|
|
12
|
+
/**
|
|
13
|
+
* Optional native appearance and positioning values. Callout applies only values
|
|
14
|
+
* supplied by the caller and does not resolve theme defaults.
|
|
15
|
+
*/
|
|
16
|
+
export interface CalloutTokens {
|
|
17
|
+
/** Anchor rectangle in DIPs relative to the React surface origin. */
|
|
30
18
|
anchorRect?: KeyboardMetrics;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
/** Native Callout background color. */
|
|
20
|
+
backgroundColor?: ColorValue;
|
|
21
|
+
/** Width of the beak that points toward the anchor. */
|
|
34
22
|
beakWidth?: number;
|
|
35
|
-
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
/** Native Callout border color. */
|
|
24
|
+
borderColor?: ColorValue;
|
|
25
|
+
/** Native Callout corner radius. */
|
|
26
|
+
borderRadius?: AnimatableNumericValue | string;
|
|
27
|
+
/** Native Callout border width. */
|
|
28
|
+
borderWidth?: number;
|
|
29
|
+
/** Preferred placement relative to the anchor. */
|
|
39
30
|
directionalHint?: DirectionalHint;
|
|
40
|
-
/**
|
|
41
|
-
* Defines variations on how the callout dismissal may be controlled. the async eventing
|
|
42
|
-
* of React-Native makes passing some aspects of dismissal control over to JS difficult.
|
|
43
|
-
* Moreover, the native platform or host may have competing priorities with regards to transient UI
|
|
44
|
-
* that generate bi-directional lifetime management between JS (which mounts and unmounts the
|
|
45
|
-
* component) and native (which may tear down the transient UI without JS input).
|
|
46
|
-
*
|
|
47
|
-
* This property provides control over the latter issue, enabling relevant native platform
|
|
48
|
-
* interactions with transient UI to be managed from JS.
|
|
49
|
-
*
|
|
50
|
-
* These behaviors should generally be orthogonal, and therefore combinable.
|
|
51
|
-
*/
|
|
31
|
+
/** Native dismissal behaviors that may be combined. */
|
|
52
32
|
dismissBehaviors?: DismissBehaviors[];
|
|
53
|
-
/**
|
|
54
|
-
* Defines the size of the gap between the anchor and the Callout. Not used if
|
|
55
|
-
* no anchor information is provided.
|
|
56
|
-
*/
|
|
33
|
+
/** Gap between the anchor and Callout. */
|
|
57
34
|
gapSpace?: number;
|
|
58
|
-
/**
|
|
59
|
-
* Defines a maximum height for the Callout.
|
|
60
|
-
*/
|
|
35
|
+
/** Maximum Callout height. */
|
|
61
36
|
maxHeight?: number | `${number}%`;
|
|
62
|
-
/**
|
|
63
|
-
* Defines a maximum width for the Callout.
|
|
64
|
-
*/
|
|
37
|
+
/** Maximum Callout width. */
|
|
65
38
|
maxWidth?: number | `${number}%`;
|
|
66
|
-
/**
|
|
67
|
-
* Defines a minimum width for the Callout.
|
|
68
|
-
*/
|
|
69
|
-
minWidth?: number | `${number}%`;
|
|
70
|
-
/**
|
|
71
|
-
* Defines the minimum padding between the Callout and the display edges.
|
|
72
|
-
*/
|
|
39
|
+
/** Minimum padding from display edges. */
|
|
73
40
|
minPadding?: number;
|
|
41
|
+
/** Minimum Callout width. */
|
|
42
|
+
minWidth?: number | `${number}%`;
|
|
74
43
|
}
|
|
75
|
-
export interface
|
|
44
|
+
export interface CalloutHandle {
|
|
45
|
+
/** Makes the native Callout window resign key status. */
|
|
46
|
+
blurWindow: () => void;
|
|
47
|
+
/** Makes the native Callout window key. */
|
|
48
|
+
focusWindow: () => void;
|
|
49
|
+
}
|
|
50
|
+
export interface CalloutProps extends ViewProps, CalloutTokens {
|
|
76
51
|
/**
|
|
77
|
-
* A string
|
|
52
|
+
* A string announced when the Callout is shown.
|
|
78
53
|
* @platform win32
|
|
79
54
|
*/
|
|
80
55
|
accessibilityOnShowAnnouncement?: string;
|
|
56
|
+
/** Ref used to invoke native Callout window commands. */
|
|
57
|
+
componentRef?: React.Ref<CalloutHandle>;
|
|
81
58
|
/**
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
componentRef?: React.RefObject<CalloutNativeCommands>;
|
|
85
|
-
/**
|
|
86
|
-
* Defines event redirection behaviors for pointer events relative to the Callout control.
|
|
87
|
-
*
|
|
88
|
-
* Pointer events (i.e. mouse, pen, touch) often have the effect of initiating and dismissing Callout controls.
|
|
89
|
-
* Typically the instigating events are click events, but when using a mouse may also include pointer enter
|
|
90
|
-
* and leave events i.e. hover. Once opened, many Callout scenarios desire modal-like interactions, where
|
|
91
|
-
* the user must interact with or relative to the Callout before interacting with other controls again. A common
|
|
92
|
-
* example is context menus, where pointer events away from the menu may dismiss the context menu. Such an interaction
|
|
93
|
-
* can initiate unintended actions such as invoking a button or otherwise pointer-responsive surface. The modal-like
|
|
94
|
-
* behavior is the most common case of Callout usage, and having "safe" areas to press-dismiss the Callout without
|
|
95
|
-
* invoking additional actions is useful.
|
|
96
|
-
*
|
|
97
|
-
* This modal-like behavior, where true modal behavior would specifically require interacting with the modal component until
|
|
98
|
-
* it is dismissed, has implications for canonical event routing in React-Native. Canonically all pointer events are passed in
|
|
99
|
-
* a Capture phase from the root element to the target element, then bubbled back from the target element to the root element.
|
|
100
|
-
* This structure allows many interaction patterns to be implemented that may include stopping event routing in each phase.
|
|
101
|
-
* This event routing can disrupt the modal-like behavior desired by a Callout control, which in native frameworks may take
|
|
102
|
-
* advantage of a "take event capture" feature -- making the Callout the first handler of the pointer event. The event may optionally
|
|
103
|
-
* be forwarded afterwards to the canonical event routing pattern for further handling (and often is not forwarded).
|
|
104
|
-
*
|
|
105
|
-
* One impact of "taking event capture" is the implicit behavior for mouse events on the parent surface of the Callout -- if
|
|
106
|
-
* event capture is taken by the Callout, paired events may fire such as a mouse leave event. This makes sense if we think about
|
|
107
|
-
* the event behavior after the Callout has taken capture; mouse enter and mouse leave events would only propagate to the parent surface
|
|
108
|
-
* if the Callout event handling decided to forward said events (often not). As paired events, however, there should not be a
|
|
109
|
-
* mouse enter event without a corresponding mouse leave event (or vice versa). Since mouse enter and mouse leave events would not
|
|
110
|
-
* naturally fire on the parent surface when the Callout has pointer capture, the parent surface should receive a mouse leave event when
|
|
111
|
-
* the Callout takes capture.
|
|
112
|
-
*
|
|
113
|
-
* Coming back to the start of this comment, some Callout scenarios may be initiated by mouse enter/leave events. A common example is
|
|
114
|
-
* tooltips, which are supported on lower-level React-Native components, but such behavior is not exclusive to tooltips.
|
|
115
|
-
* The Callout control is generally used for more advanced scenarios, as mentioned before often desiring modal-like behavior and accordingly
|
|
116
|
-
* the default behavior of the Callout control is to take pointer capture. Accounting for the paired mouse enter/leave events in the paragraph
|
|
117
|
-
* above, it is difficult to have a mouse enter/leave-invoked Callout that takes pointer capture -- without significant workarounds,
|
|
118
|
-
* the Callout would open and close cyclically from repeated mouse enter/leave events. There are other scenarios where taking pointer capture
|
|
119
|
-
* is not desirable, such as a semi-persistent Callout; to support these scenarios the doNotTakePointerCapture property is offered to
|
|
120
|
-
* specify if the Callout should not take pointer capture when it opens.
|
|
121
|
-
*
|
|
122
|
-
* While pointer capture is generally managed in native frameworks via imperative APIs, managing pointer capture is offered as a property that
|
|
123
|
-
* only affects the Callout's on-show behavior when it would typically take pointer capture. This design implies that changing this property after
|
|
124
|
-
* the Callout has been shown has no effect -- similar to the Callout's onShow callback. Doing so simplifies Callout usage for developers,
|
|
125
|
-
* not needing to mind native platform pointer capture that may be complex particularly when React-Native is integrated into a larger app.
|
|
126
|
-
* Pointer capture may be lost (and regained) but is otherwise abstracted away from the developer. More advanced control of pointer capture
|
|
127
|
-
* would need to be provided by a native module independent of any particular control.
|
|
128
|
-
*
|
|
129
|
-
* When the Callout is closed, pointer capture is released by the Callout and further handled by the native platform -- generally returning
|
|
130
|
-
* pointer capture to the parent surface.
|
|
59
|
+
* Prevents the native Callout from taking pointer capture when shown.
|
|
131
60
|
* @platform win32
|
|
132
61
|
*/
|
|
133
62
|
doNotTakePointerCapture?: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Adds a beak to the Callout, pointing to the anchor target.
|
|
136
|
-
* Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
|
|
137
|
-
* border width prop will not be honored.
|
|
138
|
-
* @platform win32
|
|
139
|
-
*/
|
|
63
|
+
/** Displays a beak that points toward the anchor. */
|
|
140
64
|
isBeakVisible?: boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Callback invoked when the callout has been dismissed.
|
|
143
|
-
*/
|
|
65
|
+
/** Invoked after native dismissal. */
|
|
144
66
|
onDismiss?: () => void;
|
|
145
67
|
/**
|
|
146
|
-
*
|
|
147
|
-
* result in focus being moved to the appropriate focusable target.
|
|
148
|
-
*
|
|
149
|
-
* The callee should carefully consider their scenarios to avoid dropping focus, or inappropriately
|
|
150
|
-
* moving focus from another component. Focus is not guaranteed to have entered the React-Native surface at all, and
|
|
151
|
-
* this callback is most appropriate for components strictly controlling focus.
|
|
152
|
-
*
|
|
153
|
-
* restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
|
|
68
|
+
* Invoked during dismissal when the caller owns focus restoration.
|
|
154
69
|
* @platform win32
|
|
155
70
|
*/
|
|
156
|
-
onRestoreFocus?: (
|
|
157
|
-
/**
|
|
158
|
-
* Callback invoked when the callout has been shown.
|
|
159
|
-
*/
|
|
71
|
+
onRestoreFocus?: (event: RestoreFocusEvent) => void;
|
|
72
|
+
/** Invoked after the Callout is shown. */
|
|
160
73
|
onShow?: () => void;
|
|
161
|
-
/**
|
|
162
|
-
* Determines whether the Callout sets focus when displayed.
|
|
163
|
-
* On macOS: this determines whether the Callout becomes the key window.
|
|
164
|
-
* On win32: If true then the callout will attempt to focus the first focusable element that it contains.
|
|
165
|
-
* If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
|
|
166
|
-
* to either set focus or have focusable items.
|
|
167
|
-
*/
|
|
74
|
+
/** Requests initial focus when the Callout is shown. */
|
|
168
75
|
setInitialFocus?: boolean;
|
|
169
|
-
/**
|
|
170
|
-
|
|
171
|
-
* A ref is the typical usage; certain components may proffer a string as an anchor target, such as
|
|
172
|
-
* anchoring to a point inside the component.
|
|
173
|
-
*/
|
|
174
|
-
target?: React.RefObject<React.Component> | string;
|
|
175
|
-
}
|
|
176
|
-
export type ICalloutSlotProps = {
|
|
177
|
-
root: ICalloutProps;
|
|
178
|
-
};
|
|
179
|
-
export type ICalloutRenderData = IRenderData<ICalloutSlotProps>;
|
|
180
|
-
export interface ICalloutType {
|
|
181
|
-
props: ICalloutProps;
|
|
182
|
-
slotProps: ICalloutSlotProps;
|
|
183
|
-
tokens: ICalloutTokens;
|
|
76
|
+
/** Ref or registered native anchor identifier used for relative positioning. */
|
|
77
|
+
target?: React.RefObject<React.Component | null> | string;
|
|
184
78
|
}
|
|
185
|
-
|
|
79
|
+
/** @deprecated Use CalloutProps. */
|
|
80
|
+
export type ICalloutProps = CalloutProps;
|
|
81
|
+
/** @deprecated Use CalloutTokens. */
|
|
82
|
+
export type ICalloutTokens = CalloutTokens;
|
|
83
|
+
/** @deprecated Use CalloutHandle. */
|
|
84
|
+
export type CalloutNativeCommands = CalloutHandle;
|
|
186
85
|
//# sourceMappingURL=Callout.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEnG,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC,MAAM,MAAM,eAAe,GACvB,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,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,GAAG,8BAA8B,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE;QACX,oEAAoE;Q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AqD;IACrD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACpD,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,wDAAwD;IACxD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gFAAgF;IAChF,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,MAAM,CAAC;CAC3D;AAED,oCAAoC;AACpC,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,qCAAqC;AACrC,MAAM,MAAM,cAAc,GAAG,aAAa,CAAC;AAC3C,qCAAqC;AACrC,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC"}
|
package/lib/Callout.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -13,12 +13,16 @@ export interface NativeProps extends ViewProps {
|
|
|
13
13
|
accessibilityLabel?: string;
|
|
14
14
|
accessibilityOnShowAnnouncement?: string;
|
|
15
15
|
anchorRect?: AnchorRect;
|
|
16
|
+
beakWidth?: Int32;
|
|
16
17
|
dismissBehaviors?: string[];
|
|
17
18
|
doNotTakePointerCapture?: boolean;
|
|
18
19
|
focusable?: boolean;
|
|
20
|
+
gapSpace?: Int32;
|
|
19
21
|
isBeakVisible?: boolean;
|
|
20
22
|
maxHeight?: Int32;
|
|
21
23
|
maxWidth?: Int32;
|
|
24
|
+
minPadding?: Int32;
|
|
25
|
+
minWidth?: Int32;
|
|
22
26
|
setInitialFocus?: boolean;
|
|
23
27
|
testID?: string;
|
|
24
28
|
onRestoreFocus?: DirectEventHandler<{
|
|
@@ -31,15 +35,15 @@ export interface NativeProps extends ViewProps {
|
|
|
31
35
|
onShow?: DirectEventHandler<{
|
|
32
36
|
target: Int32;
|
|
33
37
|
}>;
|
|
34
|
-
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottomLeftEdge' | '
|
|
38
|
+
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottomLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'bottomLeftEdge'>;
|
|
35
39
|
target?: UnsafeMixed;
|
|
36
40
|
}
|
|
37
41
|
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
38
|
-
|
|
42
|
+
interface NativeCalloutCommands {
|
|
39
43
|
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
40
44
|
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
41
45
|
}
|
|
42
|
-
export declare const Commands:
|
|
46
|
+
export declare const Commands: NativeCalloutCommands;
|
|
43
47
|
declare const _default: CalloutComponentType;
|
|
44
48
|
export default _default;
|
|
45
49
|
//# sourceMappingURL=CalloutNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,WA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AAA;KAAE,CAAC,CAAC;IAE/C,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;AAE9D,UAAU,qBAAqB;IAC7B,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;AAED,eAAO,MAAM,QAAQ,EAAE,qBAErB,CAAC;wBAIG,oBAAoB"}
|
|
@@ -3,5 +3,7 @@ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNati
|
|
|
3
3
|
export const Commands = codegenNativeCommands({
|
|
4
4
|
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
5
5
|
});
|
|
6
|
-
export default codegenNativeComponent('
|
|
6
|
+
export default codegenNativeComponent('Callout', {
|
|
7
|
+
paperComponentName: 'RCTCallout',
|
|
8
|
+
});
|
|
7
9
|
//# sourceMappingURL=CalloutNativeComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wDAAwD,CAAC;AAC3F,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wDAAwD,CAAC;AAC3F,OAAO,sBAAsB,MAAM,yDAAyD,CAAC;AAkE7F,MAAM,CAAC,MAAM,QAAQ,GAA0B,qBAAqB,CAAwB;IAC1F,iBAAiB,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;CACjD,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAc,SAAS,EAAE;IAC5D,kBAAkB,EAAE,YAAY;CACjC,CAAyB,CAAC"}
|