@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
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
-
import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
interface AnchorRect {
|
|
4
|
-
screenX: Double;
|
|
5
|
-
screenY: Double;
|
|
6
|
-
width: Double;
|
|
7
|
-
height: Double;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Shared native props specific to Callout native component
|
|
11
|
-
*/
|
|
12
|
-
export interface NativeProps extends ViewProps {
|
|
13
|
-
accessibilityLabel?: string;
|
|
14
|
-
accessibilityOnShowAnnouncement?: string;
|
|
15
|
-
anchorRect?: AnchorRect;
|
|
16
|
-
dismissBehaviors?: string[];
|
|
17
|
-
doNotTakePointerCapture?: boolean;
|
|
18
|
-
focusable?: boolean;
|
|
19
|
-
isBeakVisible?: boolean;
|
|
20
|
-
maxHeight?: Int32;
|
|
21
|
-
maxWidth?: Int32;
|
|
22
|
-
setInitialFocus?: boolean;
|
|
23
|
-
testID?: string;
|
|
24
|
-
onRestoreFocus?: DirectEventHandler<{
|
|
25
|
-
target: Int32;
|
|
26
|
-
containsFocus: boolean;
|
|
27
|
-
}>;
|
|
28
|
-
onDismiss?: DirectEventHandler<{
|
|
29
|
-
target: Int32;
|
|
30
|
-
}>;
|
|
31
|
-
onShow?: DirectEventHandler<{
|
|
32
|
-
target: Int32;
|
|
33
|
-
}>;
|
|
34
|
-
directionalHint?: WithDefault<'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottomLeftEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge', 'topleftEdge'>;
|
|
35
|
-
target?: UnsafeMixed;
|
|
36
|
-
}
|
|
37
|
-
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
38
|
-
export interface CalloutNativeCommands {
|
|
39
|
-
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
40
|
-
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
41
|
-
}
|
|
42
|
-
export declare const Commands: CalloutNativeCommands;
|
|
43
|
-
declare const _default: CalloutComponentType;
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=CalloutNativeComponent.macos.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.macos.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.macos.ts"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iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,cAAc,GACd,iBAAiB,EACnB,aAAa,CACd,CAAC;IACF,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC,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;wBAEiE,oBAAoB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
-
export const Commands = codegenNativeCommands({
|
|
4
|
-
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
5
|
-
});
|
|
6
|
-
export default codegenNativeComponent('FRNCallout');
|
|
7
|
-
//# sourceMappingURL=CalloutNativeComponent.macos.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.macos.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.macos.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,22 +0,0 @@
|
|
|
1
|
-
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
|
|
2
|
-
|
|
3
|
-
import type { ICalloutType } from './Callout.types';
|
|
4
|
-
import { calloutName } from './Callout.types';
|
|
5
|
-
|
|
6
|
-
export const settings: IComposeSettings<ICalloutType> = [
|
|
7
|
-
{
|
|
8
|
-
tokens: {
|
|
9
|
-
backgroundColor: 'bodyStandoutBackground',
|
|
10
|
-
borderColor: 'transparent',
|
|
11
|
-
borderWidth: 0,
|
|
12
|
-
borderRadius: 5,
|
|
13
|
-
directionalHint: 'bottonLeftEdge',
|
|
14
|
-
},
|
|
15
|
-
root: {
|
|
16
|
-
style: {
|
|
17
|
-
position: 'absolute',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
calloutName,
|
|
22
|
-
];
|
package/src/Callout.settings.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
|
|
2
|
-
|
|
3
|
-
import type { ICalloutType } from './Callout.types';
|
|
4
|
-
import { calloutName } from './Callout.types';
|
|
5
|
-
|
|
6
|
-
export const settings: IComposeSettings<ICalloutType> = [
|
|
7
|
-
{
|
|
8
|
-
tokens: {
|
|
9
|
-
backgroundColor: 'bodyStandoutBackground',
|
|
10
|
-
beakWidth: 20,
|
|
11
|
-
borderColor: 'bodyFrameBackground',
|
|
12
|
-
borderWidth: 1,
|
|
13
|
-
directionalHint: 'bottonLeftEdge',
|
|
14
|
-
gapSpace: 0,
|
|
15
|
-
minPadding: 0,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
calloutName,
|
|
19
|
-
];
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
-
|
|
4
|
-
import type { HostComponent, ViewProps } from 'react-native';
|
|
5
|
-
import type { WithDefault, UnsafeMixed, Int32, DirectEventHandler, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
-
|
|
7
|
-
interface AnchorRect {
|
|
8
|
-
screenX: Double;
|
|
9
|
-
screenY: Double;
|
|
10
|
-
width: Double;
|
|
11
|
-
height: Double;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Shared native props specific to Callout native component
|
|
16
|
-
*/
|
|
17
|
-
export interface NativeProps extends ViewProps {
|
|
18
|
-
accessibilityLabel?: string;
|
|
19
|
-
accessibilityOnShowAnnouncement?: string;
|
|
20
|
-
anchorRect?: AnchorRect;
|
|
21
|
-
|
|
22
|
-
dismissBehaviors?: string[];
|
|
23
|
-
doNotTakePointerCapture?: boolean;
|
|
24
|
-
focusable?: boolean;
|
|
25
|
-
isBeakVisible?: boolean;
|
|
26
|
-
maxHeight?: Int32;
|
|
27
|
-
maxWidth?: Int32;
|
|
28
|
-
setInitialFocus?: boolean;
|
|
29
|
-
|
|
30
|
-
// targetAnchor?: string; // Win32 only Callout can target an anchor registered in the anchor registry // Can be a node id or an anchor ID - This need to be reworked as Mixed types are not supported going forward
|
|
31
|
-
testID?: string;
|
|
32
|
-
|
|
33
|
-
onRestoreFocus?: DirectEventHandler<{ target: Int32; containsFocus: boolean }>;
|
|
34
|
-
onDismiss?: DirectEventHandler<{ target: Int32 }>;
|
|
35
|
-
onShow?: DirectEventHandler<{ target: Int32 }>;
|
|
36
|
-
|
|
37
|
-
directionalHint?: WithDefault<
|
|
38
|
-
| 'leftTopEdge'
|
|
39
|
-
| 'leftCenter'
|
|
40
|
-
| 'leftBottomEdge'
|
|
41
|
-
| 'topLeftEdge'
|
|
42
|
-
| 'topAutoEdge'
|
|
43
|
-
| 'topCenter'
|
|
44
|
-
| 'topRightEdge'
|
|
45
|
-
| 'rightTopEdge'
|
|
46
|
-
| 'rightCenter'
|
|
47
|
-
| 'rightBottomEdge'
|
|
48
|
-
| 'bottomLeftEdge'
|
|
49
|
-
| 'bottonLeftEdge' // Typo in the original code, should be 'bottomLeftEdge'
|
|
50
|
-
| 'bottomAutoEdge'
|
|
51
|
-
| 'bottomCenter'
|
|
52
|
-
| 'bottomRightEdge',
|
|
53
|
-
'topleftEdge'
|
|
54
|
-
>;
|
|
55
|
-
target?: UnsafeMixed;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type CalloutComponentType = HostComponent<NativeProps>;
|
|
59
|
-
|
|
60
|
-
export interface CalloutNativeCommands {
|
|
61
|
-
focusWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
62
|
-
blurWindow: (viewRef: React.ElementRef<CalloutComponentType>) => void;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const Commands: CalloutNativeCommands = codegenNativeCommands<CalloutNativeCommands>({
|
|
66
|
-
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
export default codegenNativeComponent<NativeProps>('FRNCallout') as CalloutComponentType;
|