@fluentui-react-native/callout 0.19.1 → 0.19.5
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 +92 -11
- package/CHANGELOG.md +36 -3
- package/lib/Callout.types.d.ts +3 -3
- package/lib-commonjs/Callout.types.d.ts +3 -3
- package/macos/Callout.swift +8 -12
- package/macos/CalloutWindow.swift +26 -18
- package/package.json +3 -3
- package/src/Callout.types.ts +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,88 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Fri, 17 Dec 2021 22:04:25 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/callout_v0.19.5",
|
|
7
|
+
"version": "0.19.5",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "beachball",
|
|
12
|
+
"package": "@fluentui-react-native/callout",
|
|
13
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.4",
|
|
14
|
+
"commit": "b9ea5eb1409f37305169f75398fa7f41229cefbd"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Fri, 17 Dec 2021 19:53:21 GMT",
|
|
21
|
+
"tag": "@fluentui-react-native/callout_v0.19.4",
|
|
22
|
+
"version": "0.19.4",
|
|
23
|
+
"comments": {
|
|
24
|
+
"patch": [
|
|
25
|
+
{
|
|
26
|
+
"author": "beachball",
|
|
27
|
+
"package": "@fluentui-react-native/callout",
|
|
28
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.3",
|
|
29
|
+
"commit": "3012e075ca89e36931357442679b73d20540af8b"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"date": "Fri, 17 Dec 2021 18:39:08 GMT",
|
|
36
|
+
"tag": "@fluentui-react-native/callout_v0.19.3",
|
|
37
|
+
"version": "0.19.3",
|
|
38
|
+
"comments": {
|
|
39
|
+
"patch": [
|
|
40
|
+
{
|
|
41
|
+
"author": "sanajmi@microsoft.com",
|
|
42
|
+
"package": "@fluentui-react-native/callout",
|
|
43
|
+
"commit": "b7787516d0c417fbe350793713ffce3330c0f4a7",
|
|
44
|
+
"comment": "Documentation fixes"
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"date": "Fri, 17 Dec 2021 01:26:42 GMT",
|
|
51
|
+
"tag": "@fluentui-react-native/callout_v0.19.2",
|
|
52
|
+
"version": "0.19.2",
|
|
53
|
+
"comments": {
|
|
54
|
+
"patch": [
|
|
55
|
+
{
|
|
56
|
+
"author": "beachball",
|
|
57
|
+
"package": "@fluentui-react-native/callout",
|
|
58
|
+
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.2",
|
|
59
|
+
"commit": "511aeb31982a5fb9dd2f7196c0c7217cc4a3dbc6"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"author": "beachball",
|
|
63
|
+
"package": "@fluentui-react-native/callout",
|
|
64
|
+
"comment": "Bump @uifabricshared/foundation-compose to v1.11.2",
|
|
65
|
+
"commit": "511aeb31982a5fb9dd2f7196c0c7217cc4a3dbc6"
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"date": "Thu, 16 Dec 2021 23:00:56 GMT",
|
|
72
|
+
"tag": "@fluentui-react-native/callout_v0.19.1",
|
|
73
|
+
"version": "0.19.1",
|
|
74
|
+
"comments": {
|
|
75
|
+
"none": [
|
|
76
|
+
{
|
|
77
|
+
"author": "dannyvv@microsoft.com",
|
|
78
|
+
"package": "@fluentui-react-native/callout",
|
|
79
|
+
"commit": "25b3989739737bc598a5d699a941af4c0b4a421f",
|
|
80
|
+
"comment": "📦 applying package updates ***NO_CI***"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"date": "Thu, 16 Dec 2021 19:10:30 GMT",
|
|
6
87
|
"tag": "@fluentui-react-native/callout_v0.19.1",
|
|
7
88
|
"version": "0.19.1",
|
|
8
89
|
"comments": {
|
|
@@ -10,44 +91,44 @@
|
|
|
10
91
|
{
|
|
11
92
|
"author": "sanajmi@microsoft.com",
|
|
12
93
|
"package": "@fluentui-react-native/callout",
|
|
13
|
-
"commit": "
|
|
14
|
-
"comment": "
|
|
94
|
+
"commit": "51cbf7c64d5c52feeec2e845cd4dbd4e23c96e1e",
|
|
95
|
+
"comment": "Add up/down arrow key support to macOS ContextualMenu"
|
|
15
96
|
},
|
|
16
97
|
{
|
|
17
98
|
"author": "sanajmi@microsoft.com",
|
|
18
99
|
"package": "@fluentui-react-native/callout",
|
|
19
|
-
"commit": "
|
|
20
|
-
"comment": "
|
|
100
|
+
"commit": "dd2f47a0a2d6aab7361301a16407c76497b45ce7",
|
|
101
|
+
"comment": "remove focus style overrides for macOS contextual menu items"
|
|
21
102
|
},
|
|
22
103
|
{
|
|
23
104
|
"author": "sanajmi@microsoft.com",
|
|
24
105
|
"package": "@fluentui-react-native/callout",
|
|
25
|
-
"commit": "
|
|
26
|
-
"comment": "
|
|
106
|
+
"commit": "e597717b14dce4916740076786391449dd4a7c69",
|
|
107
|
+
"comment": "Rename Jest snapshots to be platform agnostic "
|
|
27
108
|
},
|
|
28
109
|
{
|
|
29
110
|
"author": "beachball",
|
|
30
111
|
"package": "@fluentui-react-native/callout",
|
|
31
112
|
"comment": "Bump @fluentui-react-native/adapters to v0.8.1",
|
|
32
|
-
"commit": "
|
|
113
|
+
"commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
|
|
33
114
|
},
|
|
34
115
|
{
|
|
35
116
|
"author": "beachball",
|
|
36
117
|
"package": "@fluentui-react-native/callout",
|
|
37
118
|
"comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.1",
|
|
38
|
-
"commit": "
|
|
119
|
+
"commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
|
|
39
120
|
},
|
|
40
121
|
{
|
|
41
122
|
"author": "beachball",
|
|
42
123
|
"package": "@fluentui-react-native/callout",
|
|
43
124
|
"comment": "Bump @fluentui-react-native/tokens to v0.11.1",
|
|
44
|
-
"commit": "
|
|
125
|
+
"commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
|
|
45
126
|
},
|
|
46
127
|
{
|
|
47
128
|
"author": "beachball",
|
|
48
129
|
"package": "@fluentui-react-native/callout",
|
|
49
130
|
"comment": "Bump @uifabricshared/foundation-compose to v1.11.1",
|
|
50
|
-
"commit": "
|
|
131
|
+
"commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
|
|
51
132
|
}
|
|
52
133
|
]
|
|
53
134
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,51 @@
|
|
|
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, 17 Dec 2021 22:04:25 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.19.5
|
|
8
|
+
|
|
9
|
+
Fri, 17 Dec 2021 22:04:25 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.11.4
|
|
14
|
+
|
|
15
|
+
## 0.19.4
|
|
16
|
+
|
|
17
|
+
Fri, 17 Dec 2021 19:53:21 GMT
|
|
18
|
+
|
|
19
|
+
### Patches
|
|
20
|
+
|
|
21
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.11.3
|
|
22
|
+
|
|
23
|
+
## 0.19.3
|
|
24
|
+
|
|
25
|
+
Fri, 17 Dec 2021 18:39:08 GMT
|
|
26
|
+
|
|
27
|
+
### Patches
|
|
28
|
+
|
|
29
|
+
- Documentation fixes (sanajmi@microsoft.com)
|
|
30
|
+
|
|
31
|
+
## 0.19.2
|
|
32
|
+
|
|
33
|
+
Fri, 17 Dec 2021 01:26:42 GMT
|
|
34
|
+
|
|
35
|
+
### Patches
|
|
36
|
+
|
|
37
|
+
- Bump @fluentui-react-native/interactive-hooks to v0.11.2
|
|
38
|
+
- Bump @uifabricshared/foundation-compose to v1.11.2
|
|
39
|
+
|
|
7
40
|
## 0.19.1
|
|
8
41
|
|
|
9
|
-
Thu, 16 Dec 2021
|
|
42
|
+
Thu, 16 Dec 2021 19:10:30 GMT
|
|
10
43
|
|
|
11
44
|
### Patches
|
|
12
45
|
|
|
46
|
+
- Add up/down arrow key support to macOS ContextualMenu (sanajmi@microsoft.com)
|
|
13
47
|
- remove focus style overrides for macOS contextual menu items (sanajmi@microsoft.com)
|
|
14
48
|
- Rename Jest snapshots to be platform agnostic (sanajmi@microsoft.com)
|
|
15
|
-
- Add up/down arrow key support to macOS ContextualMenu (sanajmi@microsoft.com)
|
|
16
49
|
- Bump @fluentui-react-native/adapters to v0.8.1
|
|
17
50
|
- Bump @fluentui-react-native/interactive-hooks to v0.11.1
|
|
18
51
|
- Bump @fluentui-react-native/tokens to v0.11.1
|
package/lib/Callout.types.d.ts
CHANGED
|
@@ -71,8 +71,8 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
71
71
|
}
|
|
72
72
|
export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
73
73
|
/**
|
|
74
|
-
* @platform win32
|
|
75
74
|
* A string that should be announced when the callout is shown.
|
|
75
|
+
* @platform win32
|
|
76
76
|
*/
|
|
77
77
|
accessibilityOnShowAnnouncement?: string;
|
|
78
78
|
/**
|
|
@@ -80,10 +80,10 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
80
80
|
*/
|
|
81
81
|
componentRef?: React.RefObject<IFocusable>;
|
|
82
82
|
/**
|
|
83
|
-
* @platform win32
|
|
84
83
|
* Adds a beak to the Callout, pointing to the anchor target.
|
|
85
84
|
* Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
|
|
86
85
|
* border width prop will not be honored.
|
|
86
|
+
* @platform win32
|
|
87
87
|
*/
|
|
88
88
|
isBeakVisible?: boolean;
|
|
89
89
|
/**
|
|
@@ -91,7 +91,6 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
91
91
|
*/
|
|
92
92
|
onDismiss?: () => void;
|
|
93
93
|
/**
|
|
94
|
-
* @platform win32
|
|
95
94
|
* Callback invoked during callout dismissal; if set, focus will not be restored by the callout and onRestoreFocus must
|
|
96
95
|
* result in focus being moved to the appropriate focusable target.
|
|
97
96
|
*
|
|
@@ -100,6 +99,7 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
100
99
|
* this callback is most appropriate for components strictly controlling focus.
|
|
101
100
|
*
|
|
102
101
|
* restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
|
|
102
|
+
* @platform win32
|
|
103
103
|
*/
|
|
104
104
|
onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
|
|
105
105
|
/**
|
|
@@ -71,8 +71,8 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
71
71
|
}
|
|
72
72
|
export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
73
73
|
/**
|
|
74
|
-
* @platform win32
|
|
75
74
|
* A string that should be announced when the callout is shown.
|
|
75
|
+
* @platform win32
|
|
76
76
|
*/
|
|
77
77
|
accessibilityOnShowAnnouncement?: string;
|
|
78
78
|
/**
|
|
@@ -80,10 +80,10 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
80
80
|
*/
|
|
81
81
|
componentRef?: React.RefObject<IFocusable>;
|
|
82
82
|
/**
|
|
83
|
-
* @platform win32
|
|
84
83
|
* Adds a beak to the Callout, pointing to the anchor target.
|
|
85
84
|
* Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
|
|
86
85
|
* border width prop will not be honored.
|
|
86
|
+
* @platform win32
|
|
87
87
|
*/
|
|
88
88
|
isBeakVisible?: boolean;
|
|
89
89
|
/**
|
|
@@ -91,7 +91,6 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
91
91
|
*/
|
|
92
92
|
onDismiss?: () => void;
|
|
93
93
|
/**
|
|
94
|
-
* @platform win32
|
|
95
94
|
* Callback invoked during callout dismissal; if set, focus will not be restored by the callout and onRestoreFocus must
|
|
96
95
|
* result in focus being moved to the appropriate focusable target.
|
|
97
96
|
*
|
|
@@ -100,6 +99,7 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
100
99
|
* this callback is most appropriate for components strictly controlling focus.
|
|
101
100
|
*
|
|
102
101
|
* restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
|
|
102
|
+
* @platform win32
|
|
103
103
|
*/
|
|
104
104
|
onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
|
|
105
105
|
/**
|
package/macos/Callout.swift
CHANGED
|
@@ -83,12 +83,8 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
83
83
|
|
|
84
84
|
// MARK: WindowLifeCycleDelegate
|
|
85
85
|
|
|
86
|
-
func
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
func applicationDidResignActiveForCalloutWindow(calloutWindow: CalloutWindow) {
|
|
91
|
-
dismissCallout()
|
|
86
|
+
func calloutWillDismiss(window: CalloutWindow) {
|
|
87
|
+
onDismissCallout()
|
|
92
88
|
}
|
|
93
89
|
|
|
94
90
|
// MARK: Private methods
|
|
@@ -96,12 +92,12 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
96
92
|
private func showCallout() {
|
|
97
93
|
updateCalloutFrameToAnchor()
|
|
98
94
|
calloutWindow.makeKeyAndOrderFront(self)
|
|
99
|
-
|
|
95
|
+
onShowCallout()
|
|
100
96
|
}
|
|
101
97
|
|
|
102
98
|
private func dismissCallout() {
|
|
103
99
|
calloutWindow.close()
|
|
104
|
-
|
|
100
|
+
onDismissCallout()
|
|
105
101
|
}
|
|
106
102
|
|
|
107
103
|
/// Sets the frame of the Callout Window (in screen coordinates to be off of the Anchor on the preferred edge
|
|
@@ -268,11 +264,11 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
268
264
|
return calloutScreenRect
|
|
269
265
|
}
|
|
270
266
|
|
|
271
|
-
private func
|
|
267
|
+
private func onShowCallout() {
|
|
272
268
|
onShow?([:])
|
|
273
269
|
}
|
|
274
270
|
|
|
275
|
-
private func
|
|
271
|
+
private func onDismissCallout() {
|
|
276
272
|
if let onDismiss = onDismiss {
|
|
277
273
|
guard let reactTag = reactTag else {
|
|
278
274
|
preconditionFailure("React Tag missing")
|
|
@@ -286,11 +282,11 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
|
|
|
286
282
|
|
|
287
283
|
private var anchorView: NSView?
|
|
288
284
|
|
|
289
|
-
private var proxyView
|
|
285
|
+
private var proxyView = RCTView()
|
|
290
286
|
|
|
291
287
|
private lazy var calloutWindow: CalloutWindow = {
|
|
292
288
|
let window = CalloutWindow()
|
|
293
|
-
window.
|
|
289
|
+
window.lifeCycleDelegate = self
|
|
294
290
|
|
|
295
291
|
let visualEffect = NSVisualEffectView()
|
|
296
292
|
visualEffect.translatesAutoresizingMaskIntoConstraints = false
|
|
@@ -1,41 +1,38 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
import AppKit
|
|
3
|
+
import Carbon.HIToolbox
|
|
3
4
|
|
|
4
|
-
protocol CalloutWindowLifeCycleDelegate {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
func didDetectHitOutsideCallout(calloutWindow: CalloutWindow)
|
|
9
|
-
|
|
10
|
-
/*
|
|
11
|
-
* Notify the CalloutWindowLifeCycle object that the window the callout is in is no longer active.
|
|
12
|
-
*/
|
|
13
|
-
func applicationDidResignActiveForCalloutWindow(calloutWindow: CalloutWindow)
|
|
5
|
+
protocol CalloutWindowLifeCycleDelegate: AnyObject {
|
|
6
|
+
/// Notify the delegate that the Callout is about to dismiss
|
|
7
|
+
func calloutWillDismiss(window: CalloutWindow)
|
|
14
8
|
}
|
|
15
9
|
|
|
16
10
|
class CalloutWindow: NSWindow {
|
|
17
11
|
|
|
18
|
-
|
|
12
|
+
weak var lifeCycleDelegate: CalloutWindowLifeCycleDelegate?
|
|
19
13
|
|
|
20
14
|
override init(contentRect: NSRect, styleMask style: NSWindow.StyleMask, backing backingStoreType: NSWindow.BackingStoreType, defer flag: Bool) {
|
|
21
15
|
super.init(contentRect: contentRect, styleMask: style, backing: backingStoreType, defer: flag)
|
|
22
|
-
isReleasedWhenClosed =
|
|
16
|
+
isReleasedWhenClosed = false
|
|
23
17
|
|
|
24
18
|
styleMask = .borderless
|
|
25
19
|
level = .popUpMenu
|
|
26
20
|
backgroundColor = .clear
|
|
27
21
|
isMovable = false
|
|
28
22
|
|
|
29
|
-
|
|
23
|
+
// Dismiss the Callout if the window is no longer active.
|
|
24
|
+
NotificationCenter.default.addObserver(self, selector: #selector(dismissCallout), name: NSApplication.didResignActiveNotification, object: nil)
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
// Dismiss the Callout if the user touched/clicked outside the bounds of the callout.
|
|
27
|
+
mouseEventMonitor = NSEvent.addLocalMonitorForEvents(matching: .leftMouseUp, handler: { [weak self] (event) -> NSEvent? in
|
|
32
28
|
if (event.window != self) {
|
|
33
|
-
self
|
|
29
|
+
self?.dismissCallout()
|
|
34
30
|
}
|
|
35
31
|
return event
|
|
36
32
|
})
|
|
37
33
|
}
|
|
38
34
|
|
|
35
|
+
// Required to get a key view loop in the window
|
|
39
36
|
override var canBecomeKey: Bool {
|
|
40
37
|
return true
|
|
41
38
|
}
|
|
@@ -44,9 +41,20 @@ class CalloutWindow: NSWindow {
|
|
|
44
41
|
return false
|
|
45
42
|
}
|
|
46
43
|
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
// Dismiss the Callout if the user presses the Escape Key
|
|
45
|
+
override func keyDown(with event: NSEvent) {
|
|
46
|
+
switch Int(event.keyCode) {
|
|
47
|
+
case kVK_Escape:
|
|
48
|
+
dismissCallout()
|
|
49
|
+
default:
|
|
50
|
+
return super.keyDown(with: event)
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@objc private func dismissCallout() {
|
|
55
|
+
lifeCycleDelegate?.calloutWillDismiss(window: self)
|
|
56
|
+
close()
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
private var mouseEventMonitor: Any?
|
|
52
|
-
}
|
|
60
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/callout",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.5",
|
|
4
4
|
"description": "A cross-platform Callout component using the Fluent Design System",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@fluentui-react-native/adapters": "^0.8.1",
|
|
24
24
|
"@fluentui-react-native/component-cache": "^1.3.0",
|
|
25
|
-
"@fluentui-react-native/interactive-hooks": ">=0.11.
|
|
25
|
+
"@fluentui-react-native/interactive-hooks": ">=0.11.4 <1.0.0",
|
|
26
26
|
"@fluentui-react-native/tokens": ">=0.11.1 <1.0.0",
|
|
27
27
|
"@uifabricshared/foundation-composable": ">=0.10.0 <1.0.0",
|
|
28
|
-
"@uifabricshared/foundation-compose": "^1.11.
|
|
28
|
+
"@uifabricshared/foundation-compose": "^1.11.2",
|
|
29
29
|
"@uifabricshared/foundation-settings": ">=0.11.0 <1.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/Callout.types.ts
CHANGED
|
@@ -100,8 +100,8 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
|
|
|
100
100
|
|
|
101
101
|
export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
102
102
|
/**
|
|
103
|
-
* @platform win32
|
|
104
103
|
* A string that should be announced when the callout is shown.
|
|
104
|
+
* @platform win32
|
|
105
105
|
*/
|
|
106
106
|
accessibilityOnShowAnnouncement?: string;
|
|
107
107
|
|
|
@@ -111,10 +111,10 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
111
111
|
componentRef?: React.RefObject<IFocusable>;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* @platform win32
|
|
115
114
|
* Adds a beak to the Callout, pointing to the anchor target.
|
|
116
115
|
* Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
|
|
117
116
|
* border width prop will not be honored.
|
|
117
|
+
* @platform win32
|
|
118
118
|
*/
|
|
119
119
|
isBeakVisible?: boolean;
|
|
120
120
|
|
|
@@ -124,7 +124,6 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
124
124
|
onDismiss?: () => void;
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
|
-
* @platform win32
|
|
128
127
|
* Callback invoked during callout dismissal; if set, focus will not be restored by the callout and onRestoreFocus must
|
|
129
128
|
* result in focus being moved to the appropriate focusable target.
|
|
130
129
|
*
|
|
@@ -133,6 +132,7 @@ export interface ICalloutProps extends IViewProps, ICalloutTokens {
|
|
|
133
132
|
* this callback is most appropriate for components strictly controlling focus.
|
|
134
133
|
*
|
|
135
134
|
* restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
|
|
135
|
+
* @platform win32
|
|
136
136
|
*/
|
|
137
137
|
onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
|
|
138
138
|
|