@fluentui-react-native/callout 0.23.14 → 0.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +73 -1
- package/CHANGELOG.md +25 -2
- package/lib/Callout.types.d.ts +5 -4
- package/lib/Callout.types.d.ts.map +1 -1
- package/lib/Callout.types.js.map +1 -1
- package/lib-commonjs/Callout.types.d.ts +5 -4
- package/lib-commonjs/Callout.types.d.ts.map +1 -1
- package/lib-commonjs/Callout.types.js.map +1 -1
- package/macos/{Callout.swift → CalloutView.swift} +6 -1
- package/macos/FRNCalloutManager.m +2 -0
- package/package.json +14 -15
- package/src/Callout.types.ts +6 -4
- package/src/__tests__/__snapshots__/Callout.test.tsx.snap +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,79 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 09 Jun 2023 21:34:18 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/callout_v0.24.1",
|
|
7
|
+
"version": "0.24.1",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "saadnajmi2@gmail.com",
|
|
12
|
+
"package": "@fluentui-react-native/callout",
|
|
13
|
+
"commit": "3229c24401791f983031da4b00154263f3b3a2cb",
|
|
14
|
+
"comment": "[Callout] Implement setInitialFocus for macOS"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Mon, 05 Jun 2023 19:26:22 GMT",
|
|
21
|
+
"tag": "@fluentui-react-native/callout_v0.24.0",
|
|
22
|
+
"version": "0.24.0",
|
|
23
|
+
"comments": {
|
|
24
|
+
"minor": [
|
|
25
|
+
{
|
|
26
|
+
"author": "sanajmi@microsoft.com",
|
|
27
|
+
"package": "@fluentui-react-native/callout",
|
|
28
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325",
|
|
29
|
+
"comment": "Upgrade to React Native 0.71"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@fluentui-react-native/callout",
|
|
34
|
+
"comment": "Bump @fluentui-react-native/adapters to v0.11.0",
|
|
35
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@fluentui-react-native/callout",
|
|
40
|
+
"comment": "Bump @fluentui-react-native/component-cache to v1.5.0",
|
|
41
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@fluentui-react-native/callout",
|
|
46
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.23.0",
|
|
47
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@fluentui-react-native/callout",
|
|
52
|
+
"comment": "Bump @fluentui-react-native/tokens to v0.21.0",
|
|
53
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/callout",
|
|
58
|
+
"comment": "Bump @uifabricshared/foundation-composable to v0.12.0",
|
|
59
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui-react-native/callout",
|
|
64
|
+
"comment": "Bump @uifabricshared/foundation-compose to v1.14.0",
|
|
65
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@fluentui-react-native/callout",
|
|
70
|
+
"comment": "Bump @uifabricshared/foundation-settings to v0.13.0",
|
|
71
|
+
"commit": "8c0f9d27e34913da82c00299c12c399877257325"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"date": "Tue, 30 May 2023 20:34:15 GMT",
|
|
6
78
|
"tag": "@fluentui-react-native/callout_v0.23.14",
|
|
7
79
|
"version": "0.23.14",
|
|
8
80
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/callout
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 09 Jun 2023 21:34:18 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.24.1
|
|
8
|
+
|
|
9
|
+
Fri, 09 Jun 2023 21:34:18 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- [Callout] Implement setInitialFocus for macOS (saadnajmi2@gmail.com)
|
|
14
|
+
|
|
15
|
+
## 0.24.0
|
|
16
|
+
|
|
17
|
+
Mon, 05 Jun 2023 19:26:22 GMT
|
|
18
|
+
|
|
19
|
+
### Minor changes
|
|
20
|
+
|
|
21
|
+
- Upgrade to React Native 0.71 (sanajmi@microsoft.com)
|
|
22
|
+
- Bump @fluentui-react-native/adapters to v0.11.0
|
|
23
|
+
- Bump @fluentui-react-native/component-cache to v1.5.0
|
|
24
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.23.0
|
|
25
|
+
- Bump @fluentui-react-native/tokens to v0.21.0
|
|
26
|
+
- Bump @uifabricshared/foundation-composable to v0.12.0
|
|
27
|
+
- Bump @uifabricshared/foundation-compose to v1.14.0
|
|
28
|
+
- Bump @uifabricshared/foundation-settings to v0.13.0
|
|
29
|
+
|
|
7
30
|
## 0.23.14
|
|
8
31
|
|
|
9
|
-
Tue, 30 May 2023 20:
|
|
32
|
+
Tue, 30 May 2023 20:34:15 GMT
|
|
10
33
|
|
|
11
34
|
### Patches
|
|
12
35
|
|
package/lib/Callout.types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { KeyboardMetrics, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IViewProps } from '@fluentui-react-native/adapters';
|
|
4
4
|
import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
|
|
5
5
|
import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
|
|
@@ -28,7 +28,7 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
28
28
|
* AnchorRect arbitrary anchor rectangle; coordinate system is in DIPs, relative
|
|
29
29
|
* to the React surface origin.
|
|
30
30
|
*/
|
|
31
|
-
anchorRect?:
|
|
31
|
+
anchorRect?: KeyboardMetrics;
|
|
32
32
|
/**
|
|
33
33
|
* Width of the beak on the Callout indicating its anchor.
|
|
34
34
|
*/
|
|
@@ -160,8 +160,9 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
160
160
|
*/
|
|
161
161
|
onShow?: () => void;
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
163
|
+
* Determines whether the Callout sets focus when displayed.
|
|
164
|
+
* On macOS: this determines whether the Callout becomes the key window.
|
|
165
|
+
* On win32: If true then the callout will attempt to focus the first focusable element that it contains.
|
|
165
166
|
* If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
|
|
166
167
|
* to either set focus or have focusable items.
|
|
167
168
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OA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AAC,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.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":"AAQA,MAAM,CAAC,IAAM,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { KeyboardMetrics, ViewStyle } from 'react-native';
|
|
3
3
|
import type { IViewProps } from '@fluentui-react-native/adapters';
|
|
4
4
|
import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
|
|
5
5
|
import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
|
|
@@ -28,7 +28,7 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
28
28
|
* AnchorRect arbitrary anchor rectangle; coordinate system is in DIPs, relative
|
|
29
29
|
* to the React surface origin.
|
|
30
30
|
*/
|
|
31
|
-
anchorRect?:
|
|
31
|
+
anchorRect?: KeyboardMetrics;
|
|
32
32
|
/**
|
|
33
33
|
* Width of the beak on the Callout indicating its anchor.
|
|
34
34
|
*/
|
|
@@ -160,8 +160,9 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
160
160
|
*/
|
|
161
161
|
onShow?: () => void;
|
|
162
162
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
163
|
+
* Determines whether the Callout sets focus when displayed.
|
|
164
|
+
* On macOS: this determines whether the Callout becomes the key window.
|
|
165
|
+
* On win32: If true then the callout will attempt to focus the first focusable element that it contains.
|
|
165
166
|
* If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
|
|
166
167
|
* to either set focus or have focusable items.
|
|
167
168
|
*/
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,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,cAAc,GACd,iBAAiB,CAAC;AAEtB,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,GAAG,8BAA8B,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE;QACX;;WAEG;QACH,aAAa,EAAE,OAAO,CAAC;KACxB,CAAC;CACH;AAED,UAAU,mBAAmB;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;CACxC;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,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"}
|
|
@@ -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":";;;AAQa,QAAA,WAAW,GAAG,SAAS,CAAC"}
|
|
@@ -26,6 +26,8 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
@objc public var setInitialFocus: Bool = false
|
|
30
|
+
|
|
29
31
|
@objc public var onShow: RCTDirectEventBlock?
|
|
30
32
|
|
|
31
33
|
@objc public var onDismiss: RCTDirectEventBlock?
|
|
@@ -91,7 +93,10 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
updateCalloutFrameToAnchor()
|
|
94
|
-
calloutWindow.
|
|
96
|
+
calloutWindow.orderFront(self)
|
|
97
|
+
if (setInitialFocus) {
|
|
98
|
+
calloutWindow.makeKey()
|
|
99
|
+
}
|
|
95
100
|
|
|
96
101
|
// Dismiss the Callout if the window is no longer active.
|
|
97
102
|
NotificationCenter.default.addObserver(self, selector: #selector(dismissCallout), name: NSApplication.didResignActiveNotification, object: nil)
|
|
@@ -42,6 +42,8 @@ RCT_EXPORT_VIEW_PROPERTY(anchorRect, screenRect)
|
|
|
42
42
|
|
|
43
43
|
RCT_EXPORT_VIEW_PROPERTY(directionalHint, NSRectEdge)
|
|
44
44
|
|
|
45
|
+
RCT_EXPORT_VIEW_PROPERTY(setInitialFocus, BOOL)
|
|
46
|
+
|
|
45
47
|
RCT_EXPORT_VIEW_PROPERTY(onShow, RCTDirectEventBlock)
|
|
46
48
|
|
|
47
49
|
RCT_EXPORT_VIEW_PROPERTY(onDismiss, RCTDirectEventBlock)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"description": "A cross-platform Callout component using the Fluent Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -25,25 +25,24 @@
|
|
|
25
25
|
"directory": "packages/components/Callout"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@fluentui-react-native/adapters": "^0.
|
|
29
|
-
"@fluentui-react-native/component-cache": "^1.
|
|
30
|
-
"@fluentui-react-native/interactive-hooks": ">=0.
|
|
31
|
-
"@fluentui-react-native/tokens": ">=0.
|
|
32
|
-
"@uifabricshared/foundation-composable": ">=0.
|
|
33
|
-
"@uifabricshared/foundation-compose": "^1.
|
|
34
|
-
"@uifabricshared/foundation-settings": ">=0.
|
|
28
|
+
"@fluentui-react-native/adapters": "^0.11.0",
|
|
29
|
+
"@fluentui-react-native/component-cache": "^1.5.0",
|
|
30
|
+
"@fluentui-react-native/interactive-hooks": ">=0.23.0 <1.0.0",
|
|
31
|
+
"@fluentui-react-native/tokens": ">=0.21.0 <1.0.0",
|
|
32
|
+
"@uifabricshared/foundation-composable": ">=0.12.0 <1.0.0",
|
|
33
|
+
"@uifabricshared/foundation-compose": "^1.14.0",
|
|
34
|
+
"@uifabricshared/foundation-settings": ">=0.13.0 <1.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|
|
38
38
|
"@fluentui-react-native/scripts": "^0.1.1",
|
|
39
|
-
"@office-iss/react-native-win32": "^0.
|
|
40
|
-
"
|
|
41
|
-
"react": "
|
|
42
|
-
"react-native": "^0.68.0"
|
|
39
|
+
"@office-iss/react-native-win32": "^0.71.0",
|
|
40
|
+
"react": "18.2.0",
|
|
41
|
+
"react-native": "^0.71.0"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
|
-
"react": "
|
|
46
|
-
"react-native": "^0.
|
|
44
|
+
"react": "18.2.0",
|
|
45
|
+
"react-native": "^0.71.0"
|
|
47
46
|
},
|
|
48
47
|
"rnx-kit": {
|
|
49
48
|
"kitType": "library",
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"microsoft/react-native"
|
|
53
52
|
],
|
|
54
53
|
"requirements": [
|
|
55
|
-
"react-native@0.
|
|
54
|
+
"react-native@0.71"
|
|
56
55
|
],
|
|
57
56
|
"capabilities": [
|
|
58
57
|
"core",
|
package/src/Callout.types.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type * as React from 'react';
|
|
2
|
-
|
|
2
|
+
// SAAD - Looks like ScreenRect got renamed.
|
|
3
|
+
import type { KeyboardMetrics, ViewStyle } from 'react-native';
|
|
3
4
|
|
|
4
5
|
import type { IViewProps } from '@fluentui-react-native/adapters';
|
|
5
6
|
import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
|
|
@@ -50,7 +51,7 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
50
51
|
* AnchorRect arbitrary anchor rectangle; coordinate system is in DIPs, relative
|
|
51
52
|
* to the React surface origin.
|
|
52
53
|
*/
|
|
53
|
-
anchorRect?:
|
|
54
|
+
anchorRect?: KeyboardMetrics;
|
|
54
55
|
|
|
55
56
|
/**
|
|
56
57
|
* Width of the beak on the Callout indicating its anchor.
|
|
@@ -198,8 +199,9 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
198
199
|
onShow?: () => void;
|
|
199
200
|
|
|
200
201
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
202
|
+
* Determines whether the Callout sets focus when displayed.
|
|
203
|
+
* On macOS: this determines whether the Callout becomes the key window.
|
|
204
|
+
* On win32: If true then the callout will attempt to focus the first focusable element that it contains.
|
|
203
205
|
* If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
|
|
204
206
|
* to either set focus or have focusable items.
|
|
205
207
|
*/
|