@fluentui-react-native/callout 0.28.6 → 0.29.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.cache/tsconfig.tsbuildinfo +1 -1
  2. package/CHANGELOG.md +62 -0
  3. package/FRNCallout.podspec +1 -1
  4. package/NuGet.config +10 -0
  5. package/SPEC.md +46 -0
  6. package/lib/Callout.d.ts +2 -5
  7. package/lib/Callout.d.ts.map +1 -1
  8. package/lib/Callout.js +57 -58
  9. package/lib/Callout.js.map +1 -1
  10. package/lib/Callout.types.d.ts +51 -152
  11. package/lib/Callout.types.d.ts.map +1 -1
  12. package/lib/Callout.types.js.map +1 -1
  13. package/lib/CalloutNativeComponent.d.ts +7 -3
  14. package/lib/CalloutNativeComponent.d.ts.map +1 -1
  15. package/lib/CalloutNativeComponent.js +3 -1
  16. package/lib/CalloutNativeComponent.js.map +1 -1
  17. package/lib/__tests__/Callout.test.js +94 -10
  18. package/lib/__tests__/Callout.test.js.map +1 -1
  19. package/lib/__tests__/Callout.types.test.d.ts +2 -0
  20. package/lib/__tests__/Callout.types.test.d.ts.map +1 -0
  21. package/lib/__tests__/Callout.types.test.js +21 -0
  22. package/lib/__tests__/Callout.types.test.js.map +1 -0
  23. package/lib/index.d.ts +1 -2
  24. package/lib/index.d.ts.map +1 -1
  25. package/macos/CalloutManager.swift +1 -1
  26. package/macos/CalloutView.swift +49 -17
  27. package/macos/FRNCalloutManager.m +11 -11
  28. package/macos/RCTCalloutComponentView.h +12 -0
  29. package/macos/RCTCalloutComponentView.mm +209 -0
  30. package/package.json +26 -10
  31. package/react-native.config.cjs +15 -0
  32. package/src/Callout.stories.tsx +276 -0
  33. package/src/Callout.tsx +98 -64
  34. package/src/Callout.types.ts +50 -172
  35. package/src/CalloutNativeComponent.ts +10 -5
  36. package/src/__tests__/Callout.test.tsx +152 -8
  37. package/src/__tests__/Callout.types.test.ts +30 -0
  38. package/src/__tests__/__snapshots__/Callout.test.tsx.snap +8 -10
  39. package/src/index.ts +4 -4
  40. package/tsconfig.json +2 -13
  41. package/windows/Callout/Callout.cpp +420 -0
  42. package/windows/Callout/Callout.def +3 -0
  43. package/windows/Callout/Callout.h +25 -0
  44. package/windows/Callout/Callout.vcxproj +152 -0
  45. package/windows/Callout/ReactPackageProvider.cpp +25 -0
  46. package/windows/Callout/ReactPackageProvider.h +25 -0
  47. package/windows/Callout/ReactPackageProvider.idl +12 -0
  48. package/windows/Callout/codegen/.clang-format +2 -0
  49. package/windows/Callout/codegen/react/components/FRNCalloutSpec/Callout.g.h +375 -0
  50. package/windows/Callout/packages.lock.json +151 -0
  51. package/windows/Callout/pch.cpp +1 -0
  52. package/windows/Callout/pch.h +28 -0
  53. package/windows/ExperimentalFeatures.props +33 -0
  54. package/windows/NuGet.Config +13 -0
  55. package/lib/Callout.settings.d.ts +0 -4
  56. package/lib/Callout.settings.d.ts.map +0 -1
  57. package/lib/Callout.settings.js +0 -16
  58. package/lib/Callout.settings.js.map +0 -1
  59. package/lib/Callout.settings.macos.d.ts +0 -4
  60. package/lib/Callout.settings.macos.d.ts.map +0 -1
  61. package/lib/Callout.settings.macos.js +0 -19
  62. package/lib/Callout.settings.macos.js.map +0 -1
  63. package/lib/CalloutNativeComponent.macos.d.ts +0 -45
  64. package/lib/CalloutNativeComponent.macos.d.ts.map +0 -1
  65. package/lib/CalloutNativeComponent.macos.js +0 -7
  66. package/lib/CalloutNativeComponent.macos.js.map +0 -1
  67. package/src/Callout.settings.macos.ts +0 -22
  68. package/src/Callout.settings.ts +0 -19
  69. package/src/CalloutNativeComponent.macos.ts +0 -69
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Change Log - @fluentui-react-native/callout
2
2
 
3
+ ## 0.29.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 6259f5d: Fix macOS placement directions and anchor Windows Callouts to the requested target edge.
8
+ - Updated dependencies [24be698]
9
+ - @fluentui-react-native/framework-base@0.7.0
10
+
11
+ ## 0.29.3
12
+
13
+ ### Patch Changes
14
+
15
+ - 34bdf23: Version updates for security
16
+
17
+ ## 0.29.2
18
+
19
+ ### Patch Changes
20
+
21
+ - 853f1fd: Moved the location of callout, with links to new location
22
+ - 5bc9e81: Fix the macOS Fabric build for Callout.
23
+
24
+ `codegenConfig.includesGeneratedCode` is read by React Native core's codegen executor rather than by
25
+ `react-native-windows`, so it told React Native that Callout ships generated code for every platform. Callout only ships
26
+ generated code for Windows, so Apple codegen stopped emitting
27
+ `react/renderer/components/FRNCalloutSpec/*`. `RCTCalloutComponentView.mm` then failed to compile, `libFRNCallout.a` was
28
+ never produced, and consuming apps failed at the link step with `library 'FRNCallout' not found`.
29
+
30
+ Removed the flag and updated the macOS component view for the `RCTCallout` to `Callout` component rename: the generated
31
+ types are now `CalloutProps`, `CalloutEventEmitter`, `CalloutState`, `CalloutDirectionalHint`,
32
+ `RCTCalloutViewProtocol`, and `RCTCalloutHandleCommand`. The view no longer redeclares the component name, shadow node,
33
+ or component descriptor by hand and imports them from the generated headers instead, which also removes a duplicate
34
+ `CalloutComponentName` definition.
35
+
36
+ - 5bc9e81: Normalize component controlled and uncontrolled state patterns and utilities
37
+ - cbd319c: Bump package to publish via ESRP (no changes)
38
+ - Updated dependencies [5bc9e81]
39
+ - Updated dependencies [5bc9e81]
40
+ - Updated dependencies [cbd319c]
41
+ - @fluentui-react-native/framework-base@0.6.1
42
+
43
+ ## 0.29.1
44
+
45
+ ### Patch Changes
46
+
47
+ - 2cb34bb: Use generated Windows Fabric bindings for Callout while preserving the native popup implementation.
48
+ - 3405262: Very initial framework for RNW fabric callout implementation
49
+
50
+ ## 0.29.0
51
+
52
+ ### Minor Changes
53
+
54
+ - 0f2b987: Reauthor Callout as an unstyled native primitive with modern props and command handle types
55
+
56
+ ### Patch Changes
57
+
58
+ - a99b3a8: Add macOS and Windows Fabric component views and interactive Callout stories
59
+ - 0f2b987: Use the RCTCallout native component name on macOS and share its native component definition across platforms
60
+ - Updated dependencies [778d82b]
61
+ - Updated dependencies [3abc13a]
62
+ - Updated dependencies [778d82b]
63
+ - @fluentui-react-native/framework-base@0.6.0
64
+
3
65
  ## 0.28.6
4
66
 
5
67
  ### Patch Changes
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.swift_version = "5"
17
17
 
18
18
  s.osx.deployment_target = "10.15"
19
- s.osx.source_files = "macos/*.{swift,h,m}"
19
+ s.osx.source_files = "macos/*.{swift,h,m,mm}"
20
20
 
21
21
  s.dependency 'React'
22
22
 
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
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
4
- * @format
2
+ * Renders the native Callout without applying theme or appearance defaults.
5
3
  */
6
- import type { ICalloutProps, ICalloutSlotProps } from './Callout.types';
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
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,iBAAiB,CAAC;AAMtF,eAAO,MAAM,OAAO,6JAqDlB,CAAC;eAEY,OAAO"}
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
- * Copyright (c) Microsoft Corporation.
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 { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens';
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
- import { Commands } from './CalloutNativeComponent';
15
- export const Callout = compose({
16
- displayName: calloutName,
17
- usePrepareProps: (props, useStyling) => {
18
- const { componentRef, target, ...rest } = props;
19
- React.useImperativeHandle(componentRef, () => ({
20
- blurWindow() {
21
- if (componentRef.current != null) {
22
- Commands.blurWindow(nativeComponentRef.current);
23
- }
24
- },
25
- focusWindow() {
26
- if (componentRef.current != null) {
27
- Commands.focusWindow(nativeComponentRef.current);
28
- }
29
- },
30
- }), [componentRef]);
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
- else {
43
- // Clear `target` so we may fall back on `anchorRect` if provided
44
- setNativeTarget(null);
26
+ },
27
+ focusWindow() {
28
+ if (nativeComponentRef.current !== null) {
29
+ Commands.focusWindow(nativeComponentRef.current);
45
30
  }
46
- }, [target]);
47
- const slotProps = mergeSettings(useStyling(props), {
48
- root: {
49
- ref: nativeComponentRef,
50
- ...(nativeTarget && { target: nativeTarget }),
51
- ...rest,
52
- },
53
- });
54
- return { slotProps };
55
- },
56
- settings: settings,
57
- slots: {
58
- root: NativeCalloutView,
59
- },
60
- styles: {
61
- root: [backgroundColorTokens, borderTokens],
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
@@ -1 +1 @@
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,MAAM,cAAc,CAAC;AAE9C,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,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAe;IAC3C,WAAW,EAAE,WAAW;IACxB,eAAe,EAAE,CAAC,KAAoB,EAAE,UAA4C,EAAE,EAAE;QACtF,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAChD,KAAK,CAAC,mBAAmB,CACvB,YAAY,EACZ,GAAG,EAAE,CAAC,CAAC;YACL,UAAU;gBACR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AG,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC;SACtC,CAAC;QAEF,OAAO,CACL,KAAC,iBAAiB,OACZ,WAAW,EACf,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,eAAe,EAChC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAChE,QAAQ,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC7D,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC7D,GAAG,EAAE,kBAAkB,EACvB,KAAK,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,CAAC,KACrC,CAAC,YAAY,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAC5D,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,WAAW,GAAG,WAAW,CAAC;AAElC,eAAe,OAAO,CAAC"}
@@ -1,186 +1,85 @@
1
1
  import type * as React from 'react';
2
- import type { KeyboardMetrics, ViewStyle } from 'react-native';
3
- import type { IViewProps } from '@fluentui-react-native/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
- interface OmittedBorderTokens {
22
- borderStyle?: ViewStyle['borderStyle'];
23
- }
24
- type CalloutBorderTokens = Omit<IBorderTokens, keyof OmittedBorderTokens>;
25
- export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTokens {
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
- * Width of the beak on the Callout indicating its anchor.
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
- * Defines the suggested drop direction and alignment for the Callout to use, relative
37
- * to the anchor information.
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 ICalloutProps extends IViewProps, ICalloutTokens {
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 that should be announced when the callout is shown.
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
- * A RefObject to access the IFocusable interface. Use this to access the public methods and properties of the component.
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
- * Callback invoked during callout dismissal; if set, focus will not be restored by the callout and onRestoreFocus must
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?: (restoreFocusEvent: RestoreFocusEvent) => void;
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
- * Target node the callout uses for relative positioning; the anchor of the callout.
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
- export {};
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
-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AC;AAC3C,qCAAqC;AACrC,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAC"}
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' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'bottonLeftEdge'>;
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
- export interface CalloutNativeCommands {
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: CalloutNativeCommands;
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,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAE7H,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB,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;IAG1B,MAAM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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('RCTCallout');
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;AA+D7F,MAAM,CAAC,MAAM,QAAQ,GAA0B,qBAAqB,CAAwB;IAC1F,iBAAiB,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;CACjD,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAc,YAAY,CAAyB,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"}