@fluentui-react-native/callout 0.28.0 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/lib/Callout.d.ts +2 -8
- package/lib/Callout.js +48 -50
- package/lib/Callout.settings.d.ts +1 -1
- package/lib/Callout.settings.js +12 -12
- package/lib/Callout.settings.macos.d.ts +1 -1
- package/lib/Callout.settings.macos.js +15 -15
- package/lib/Callout.types.d.ts +163 -210
- package/lib/Callout.types.d.ts.map +1 -1
- package/lib/Callout.types.js +1 -1
- package/lib/CalloutNativeComponent.d.ts +42 -2
- package/lib/CalloutNativeComponent.d.ts.map +1 -1
- package/lib/CalloutNativeComponent.js +2 -2
- package/lib/CalloutNativeComponent.js.map +1 -1
- package/lib/CalloutNativeComponent.macos.d.ts +42 -2
- package/lib/CalloutNativeComponent.macos.d.ts.map +1 -1
- package/lib/CalloutNativeComponent.macos.js +4 -6
- package/lib/CalloutNativeComponent.macos.js.map +1 -1
- package/lib/__tests__/Callout.test.d.ts +1 -1
- package/lib/__tests__/Callout.test.js +7 -7
- package/lib/index.d.ts +3 -12
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib-commonjs/Callout.d.ts +2 -8
- package/lib-commonjs/Callout.js +91 -112
- package/lib-commonjs/Callout.settings.d.ts +1 -1
- package/lib-commonjs/Callout.settings.js +15 -15
- package/lib-commonjs/Callout.settings.macos.d.ts +1 -1
- package/lib-commonjs/Callout.settings.macos.js +18 -18
- package/lib-commonjs/Callout.types.d.ts +163 -210
- package/lib-commonjs/Callout.types.d.ts.map +1 -1
- package/lib-commonjs/Callout.types.js +3 -3
- package/lib-commonjs/CalloutNativeComponent.d.ts +42 -2
- package/lib-commonjs/CalloutNativeComponent.d.ts.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.js +9 -11
- package/lib-commonjs/CalloutNativeComponent.js.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.macos.d.ts +42 -2
- package/lib-commonjs/CalloutNativeComponent.macos.d.ts.map +1 -1
- package/lib-commonjs/CalloutNativeComponent.macos.js +10 -14
- package/lib-commonjs/CalloutNativeComponent.macos.js.map +1 -1
- package/lib-commonjs/__tests__/Callout.test.d.ts +1 -1
- package/lib-commonjs/__tests__/Callout.test.js +41 -58
- package/lib-commonjs/index.d.ts +3 -12
- package/lib-commonjs/index.d.ts.map +1 -1
- package/lib-commonjs/index.js +7 -17
- package/macos/FRNCalloutManager.m +2 -1
- package/package.json +26 -25
- package/src/Callout.types.ts +4 -36
- package/src/CalloutNativeComponent.macos.ts +62 -5
- package/src/CalloutNativeComponent.ts +60 -1
- package/src/index.ts +1 -1
- package/eslint.config.js +0 -3
- package/lib/CalloutNativeComponent.types.d.ts +0 -30
- package/lib/CalloutNativeComponent.types.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.types.js +0 -2
- package/lib/CalloutNativeComponent.types.js.map +0 -1
- package/lib/CalloutNativeComponent.types.macos.d.ts +0 -29
- package/lib/CalloutNativeComponent.types.macos.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.types.macos.js +0 -2
- package/lib/CalloutNativeComponent.types.macos.js.map +0 -1
- package/lib/CalloutNativeComponent.win32.d.ts +0 -5
- package/lib/CalloutNativeComponent.win32.d.ts.map +0 -1
- package/lib/CalloutNativeComponent.win32.js +0 -8
- package/lib/CalloutNativeComponent.win32.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.d.ts +0 -30
- package/lib-commonjs/CalloutNativeComponent.types.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.js +0 -3
- package/lib-commonjs/CalloutNativeComponent.types.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.macos.d.ts +0 -29
- package/lib-commonjs/CalloutNativeComponent.types.macos.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.types.macos.js +0 -3
- package/lib-commonjs/CalloutNativeComponent.types.macos.js.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.win32.d.ts +0 -5
- package/lib-commonjs/CalloutNativeComponent.win32.d.ts.map +0 -1
- package/lib-commonjs/CalloutNativeComponent.win32.js +0 -16
- package/lib-commonjs/CalloutNativeComponent.win32.js.map +0 -1
- package/src/CalloutNativeComponent.types.macos.ts +0 -31
- package/src/CalloutNativeComponent.types.ts +0 -31
- package/src/CalloutNativeComponent.win32.ts +0 -11
- package/src/codegenTypes.d.ts +0 -2
|
@@ -1 +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,eAAe,EAAE,SAAS,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,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;GAEG;AAEH,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,gBAAgB,GAChB,cAAc,GACd,iBAAiB,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,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AEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEhE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAEpB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;;OAIG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC;CACpD;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAEhE,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,MAAM,EAAE,cAAc,CAAC;CACxB"}
|
package/lib/Callout.types.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const calloutName = 'Callout';
|
|
2
|
-
//# sourceMappingURL=Callout.types.js.map
|
|
2
|
+
//# sourceMappingURL=Callout.types.js.map
|
|
@@ -1,5 +1,45 @@
|
|
|
1
|
-
import type {
|
|
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', 'bottonLeftEdge'>;
|
|
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
|
+
}
|
|
2
42
|
export declare const Commands: CalloutNativeCommands;
|
|
3
43
|
declare const _default: CalloutComponentType;
|
|
4
44
|
export default _default;
|
|
5
|
-
//# sourceMappingURL=CalloutNativeComponent.d.ts.map
|
|
45
|
+
//# sourceMappingURL=CalloutNativeComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.d.ts","sourceRoot":"","sources":["../src/CalloutNativeCompon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AAE,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,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,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;;AAEH,wBAAyF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
2
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
export const Commands = codegenNativeCommands({
|
|
4
|
-
|
|
4
|
+
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
5
5
|
});
|
|
6
6
|
export default codegenNativeComponent('RCTCallout');
|
|
7
|
-
//# sourceMappingURL=CalloutNativeComponent.js.map
|
|
7
|
+
//# 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;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,5 +1,45 @@
|
|
|
1
|
-
import type {
|
|
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
|
+
}
|
|
2
42
|
export declare const Commands: CalloutNativeCommands;
|
|
3
43
|
declare const _default: CalloutComponentType;
|
|
4
44
|
export default _default;
|
|
5
|
-
//# sourceMappingURL=CalloutNativeComponent.macos.d.ts.map
|
|
45
|
+
//# sourceMappingURL=CalloutNativeComponent.macos.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.macos.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.macos.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"CalloutNativeComponent.macos.d.ts","sourceRoot":"","sources":["../src/CalloutNativeComponent.macos.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,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K,CAAC,UAAU,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CACvE;AAED,eAAO,MAAM,QAAQ,EAAE,qBAErB,CAAC;;AAEH,wBAAyF"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
2
|
-
import
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
3
|
export const Commands = codegenNativeCommands({
|
|
4
|
-
|
|
4
|
+
supportedCommands: ['blurWindow', 'focusWindow'],
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export default requireNativeComponent('FRNCallout');
|
|
9
|
-
//# sourceMappingURL=CalloutNativeComponent.macos.js.map
|
|
6
|
+
export default codegenNativeComponent('FRNCallout');
|
|
7
|
+
//# sourceMappingURL=CalloutNativeComponent.macos.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalloutNativeComponent.macos.js","sourceRoot":"","sources":["../src/CalloutNativeComponent.macos.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,wDAAwD,CAAC;AAC3F,OAAO,
|
|
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,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=Callout.test.d.ts.map
|
|
2
|
+
//# sourceMappingURL=Callout.test.d.ts.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as _jsx } from
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { act } from 'react';
|
|
3
3
|
import * as renderer from 'react-test-renderer';
|
|
4
4
|
import { Callout } from '..';
|
|
5
5
|
it('Callout default props', () => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
let component;
|
|
7
|
+
act(() => {
|
|
8
|
+
component = renderer.create(_jsx(Callout, {}));
|
|
9
|
+
});
|
|
10
|
+
expect(component.toJSON()).toMatchSnapshot();
|
|
11
11
|
});
|
|
12
|
-
//# sourceMappingURL=Callout.test.js.map
|
|
12
|
+
//# sourceMappingURL=Callout.test.js.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
export { calloutName } from './Callout.types';
|
|
2
|
-
export type {
|
|
3
|
-
|
|
4
|
-
DismissBehaviors,
|
|
5
|
-
ICalloutProps,
|
|
6
|
-
ICalloutRenderData,
|
|
7
|
-
ICalloutSlotProps,
|
|
8
|
-
ICalloutTokens,
|
|
9
|
-
ICalloutType,
|
|
10
|
-
RestoreFocusEvent,
|
|
11
|
-
} from './Callout.types';
|
|
12
|
-
export type { CalloutNativeCommands } from './CalloutNativeComponent.types';
|
|
2
|
+
export type { DirectionalHint, DismissBehaviors, ICalloutProps, ICalloutRenderData, ICalloutSlotProps, ICalloutTokens, ICalloutType, RestoreFocusEvent, } from './Callout.types';
|
|
3
|
+
export type { CalloutNativeCommands } from './CalloutNativeComponent';
|
|
13
4
|
export { Callout } from './Callout';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
* @format
|
|
5
5
|
*/
|
|
6
6
|
import type { ICalloutProps, ICalloutSlotProps } from './Callout.types';
|
|
7
|
-
export declare const Callout: import(
|
|
8
|
-
ICalloutProps,
|
|
9
|
-
ICalloutSlotProps,
|
|
10
|
-
import('./Callout.types').ICalloutTokens,
|
|
11
|
-
object,
|
|
12
|
-
object
|
|
13
|
-
>;
|
|
7
|
+
export declare const Callout: import("@uifabricshared/foundation-compose").IComposeReturnType<ICalloutProps, ICalloutSlotProps, import("./Callout.types").ICalloutTokens, object, object>;
|
|
14
8
|
export default Callout;
|
|
15
|
-
//# sourceMappingURL=Callout.d.ts.map
|
|
9
|
+
//# sourceMappingURL=Callout.d.ts.map
|
package/lib-commonjs/Callout.js
CHANGED
|
@@ -1,125 +1,104 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
2
|
/**
|
|
3
3
|
* Copyright (c) Microsoft Corporation.
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
* @format
|
|
6
6
|
*/
|
|
7
|
-
var __createBinding =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
(Object.create
|
|
30
|
-
? function (o, v) {
|
|
31
|
-
Object.defineProperty(o, 'default', { enumerable: true, value: v });
|
|
32
|
-
}
|
|
33
|
-
: function (o, v) {
|
|
34
|
-
o['default'] = v;
|
|
35
|
-
});
|
|
36
|
-
var __importStar =
|
|
37
|
-
(this && this.__importStar) ||
|
|
38
|
-
(function () {
|
|
39
|
-
var ownKeys = function (o) {
|
|
40
|
-
ownKeys =
|
|
41
|
-
Object.getOwnPropertyNames ||
|
|
42
|
-
function (o) {
|
|
43
|
-
var ar = [];
|
|
44
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
45
|
-
return ar;
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
46
29
|
};
|
|
47
|
-
|
|
30
|
+
return ownKeys(o);
|
|
48
31
|
};
|
|
49
32
|
return function (mod) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
55
38
|
};
|
|
56
|
-
|
|
57
|
-
var __importDefault =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
};
|
|
62
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
39
|
+
})();
|
|
40
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
41
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
42
|
+
};
|
|
43
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
44
|
exports.Callout = void 0;
|
|
64
|
-
const React = __importStar(require(
|
|
65
|
-
const react_native_1 = require(
|
|
66
|
-
const tokens_1 = require(
|
|
67
|
-
const foundation_compose_1 = require(
|
|
68
|
-
const foundation_settings_1 = require(
|
|
69
|
-
const Callout_settings_1 = require(
|
|
70
|
-
const Callout_types_1 = require(
|
|
71
|
-
const CalloutNativeComponent_1 = __importDefault(require(
|
|
72
|
-
const CalloutNativeComponent_2 = require(
|
|
45
|
+
const React = __importStar(require("react"));
|
|
46
|
+
const react_native_1 = require("react-native");
|
|
47
|
+
const tokens_1 = require("@fluentui-react-native/tokens");
|
|
48
|
+
const foundation_compose_1 = require("@uifabricshared/foundation-compose");
|
|
49
|
+
const foundation_settings_1 = require("@uifabricshared/foundation-settings");
|
|
50
|
+
const Callout_settings_1 = require("./Callout.settings");
|
|
51
|
+
const Callout_types_1 = require("./Callout.types");
|
|
52
|
+
const CalloutNativeComponent_1 = __importDefault(require("./CalloutNativeComponent"));
|
|
53
|
+
const CalloutNativeComponent_2 = require("./CalloutNativeComponent");
|
|
73
54
|
exports.Callout = (0, foundation_compose_1.compose)({
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
root: [tokens_1.backgroundColorTokens, tokens_1.borderTokens],
|
|
122
|
-
},
|
|
55
|
+
displayName: Callout_types_1.calloutName,
|
|
56
|
+
usePrepareProps: (props, useStyling) => {
|
|
57
|
+
const { componentRef, target, ...rest } = props;
|
|
58
|
+
React.useImperativeHandle(componentRef, () => ({
|
|
59
|
+
blurWindow() {
|
|
60
|
+
if (componentRef.current != null) {
|
|
61
|
+
CalloutNativeComponent_2.Commands.blurWindow(nativeComponentRef.current);
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
focusWindow() {
|
|
65
|
+
if (componentRef.current != null) {
|
|
66
|
+
CalloutNativeComponent_2.Commands.focusWindow(nativeComponentRef.current);
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
}), [componentRef]);
|
|
70
|
+
const nativeComponentRef = React.useRef(null);
|
|
71
|
+
const [nativeTarget, setNativeTarget] = React.useState(null);
|
|
72
|
+
React.useLayoutEffect(() => {
|
|
73
|
+
if (typeof target === 'string') {
|
|
74
|
+
// Pass string type `target` directly
|
|
75
|
+
setNativeTarget(target);
|
|
76
|
+
}
|
|
77
|
+
else if (target?.current) {
|
|
78
|
+
// Pass the tagID for a valid ref `target`
|
|
79
|
+
setNativeTarget((0, react_native_1.findNodeHandle)(target.current));
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
// Clear `target` so we may fall back on `anchorRect` if provided
|
|
83
|
+
setNativeTarget(null);
|
|
84
|
+
}
|
|
85
|
+
}, [target]);
|
|
86
|
+
const slotProps = (0, foundation_settings_1.mergeSettings)(useStyling(props), {
|
|
87
|
+
root: {
|
|
88
|
+
ref: nativeComponentRef,
|
|
89
|
+
...(nativeTarget && { target: nativeTarget }),
|
|
90
|
+
...rest,
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
return { slotProps };
|
|
94
|
+
},
|
|
95
|
+
settings: Callout_settings_1.settings,
|
|
96
|
+
slots: {
|
|
97
|
+
root: CalloutNativeComponent_1.default,
|
|
98
|
+
},
|
|
99
|
+
styles: {
|
|
100
|
+
root: [tokens_1.backgroundColorTokens, tokens_1.borderTokens],
|
|
101
|
+
},
|
|
123
102
|
});
|
|
124
103
|
exports.default = exports.Callout;
|
|
125
|
-
//# sourceMappingURL=Callout.js.map
|
|
104
|
+
//# sourceMappingURL=Callout.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
|
|
2
2
|
import type { ICalloutType } from './Callout.types';
|
|
3
3
|
export declare const settings: IComposeSettings<ICalloutType>;
|
|
4
|
-
//# sourceMappingURL=Callout.settings.d.ts.map
|
|
4
|
+
//# sourceMappingURL=Callout.settings.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.settings = void 0;
|
|
4
|
-
const Callout_types_1 = require(
|
|
4
|
+
const Callout_types_1 = require("./Callout.types");
|
|
5
5
|
exports.settings = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
{
|
|
7
|
+
tokens: {
|
|
8
|
+
backgroundColor: 'bodyStandoutBackground',
|
|
9
|
+
beakWidth: 20,
|
|
10
|
+
borderColor: 'bodyFrameBackground',
|
|
11
|
+
borderWidth: 1,
|
|
12
|
+
directionalHint: 'bottonLeftEdge',
|
|
13
|
+
gapSpace: 0,
|
|
14
|
+
minPadding: 0,
|
|
15
|
+
},
|
|
15
16
|
},
|
|
16
|
-
|
|
17
|
-
Callout_types_1.calloutName,
|
|
17
|
+
Callout_types_1.calloutName,
|
|
18
18
|
];
|
|
19
|
-
//# sourceMappingURL=Callout.settings.js.map
|
|
19
|
+
//# sourceMappingURL=Callout.settings.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
|
|
2
2
|
import type { ICalloutType } from './Callout.types';
|
|
3
3
|
export declare const settings: IComposeSettings<ICalloutType>;
|
|
4
|
-
//# sourceMappingURL=Callout.settings.macos.d.ts.map
|
|
4
|
+
//# sourceMappingURL=Callout.settings.macos.d.ts.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.settings = void 0;
|
|
4
|
-
const Callout_types_1 = require(
|
|
4
|
+
const Callout_types_1 = require("./Callout.types");
|
|
5
5
|
exports.settings = [
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
{
|
|
7
|
+
tokens: {
|
|
8
|
+
backgroundColor: 'bodyStandoutBackground',
|
|
9
|
+
borderColor: 'transparent',
|
|
10
|
+
borderWidth: 0,
|
|
11
|
+
borderRadius: 5,
|
|
12
|
+
directionalHint: 'bottonLeftEdge',
|
|
13
|
+
},
|
|
14
|
+
root: {
|
|
15
|
+
style: {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
13
19
|
},
|
|
14
|
-
|
|
15
|
-
style: {
|
|
16
|
-
position: 'absolute',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
Callout_types_1.calloutName,
|
|
20
|
+
Callout_types_1.calloutName,
|
|
21
21
|
];
|
|
22
|
-
//# sourceMappingURL=Callout.settings.macos.js.map
|
|
22
|
+
//# sourceMappingURL=Callout.settings.macos.js.map
|