@fluentui-react-native/callout 0.18.1 → 0.19.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.
Files changed (29) hide show
  1. package/.eslintrc.js +2 -4
  2. package/CHANGELOG.json +186 -1
  3. package/CHANGELOG.md +50 -2
  4. package/lib/Callout.types.d.ts +10 -2
  5. package/lib/Callout.types.d.ts.map +1 -1
  6. package/lib/Callout.types.js.map +1 -1
  7. package/lib/__tests__/Callout.test.d.ts +2 -0
  8. package/lib/__tests__/Callout.test.d.ts.map +1 -0
  9. package/lib/__tests__/{Callout.test.win32.js → Callout.test.js} +1 -1
  10. package/lib/__tests__/Callout.test.js.map +1 -0
  11. package/lib-commonjs/Callout.types.d.ts +10 -2
  12. package/lib-commonjs/Callout.types.d.ts.map +1 -1
  13. package/lib-commonjs/Callout.types.js.map +1 -1
  14. package/lib-commonjs/__tests__/Callout.test.d.ts +2 -0
  15. package/lib-commonjs/__tests__/Callout.test.d.ts.map +1 -0
  16. package/lib-commonjs/__tests__/{Callout.test.win32.js → Callout.test.js} +1 -1
  17. package/lib-commonjs/__tests__/Callout.test.js.map +1 -0
  18. package/macos/Callout.swift +10 -21
  19. package/macos/CalloutWindow.swift +41 -19
  20. package/package.json +13 -12
  21. package/src/Callout.types.ts +8 -3
  22. package/src/__tests__/{Callout.test.win32.tsx → Callout.test.tsx} +0 -0
  23. package/src/__tests__/__snapshots__/{Callout.test.win32.tsx.snap → Callout.test.tsx.snap} +0 -0
  24. package/lib/__tests__/Callout.test.win32.d.ts +0 -2
  25. package/lib/__tests__/Callout.test.win32.d.ts.map +0 -1
  26. package/lib/__tests__/Callout.test.win32.js.map +0 -1
  27. package/lib-commonjs/__tests__/Callout.test.win32.d.ts +0 -2
  28. package/lib-commonjs/__tests__/Callout.test.win32.d.ts.map +0 -1
  29. package/lib-commonjs/__tests__/Callout.test.win32.js.map +0 -1
package/.eslintrc.js CHANGED
@@ -1,5 +1,3 @@
1
1
  module.exports = {
2
- extends: [
3
- "@uifabricshared/eslint-config-rules"
4
- ]
5
- }
2
+ extends: ['@fluentui-react-native/eslint-config-rules'],
3
+ };
package/CHANGELOG.json CHANGED
@@ -2,7 +2,192 @@
2
2
  "name": "@fluentui-react-native/callout",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 09 Nov 2021 23:03:11 GMT",
5
+ "date": "Fri, 17 Dec 2021 18:38:35 GMT",
6
+ "tag": "@fluentui-react-native/callout_v0.19.3",
7
+ "version": "0.19.3",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "sanajmi@microsoft.com",
12
+ "package": "@fluentui-react-native/callout",
13
+ "commit": "b7787516d0c417fbe350793713ffce3330c0f4a7",
14
+ "comment": "Documentation fixes"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 17 Dec 2021 01:26:42 GMT",
21
+ "tag": "@fluentui-react-native/callout_v0.19.2",
22
+ "version": "0.19.2",
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.2",
29
+ "commit": "511aeb31982a5fb9dd2f7196c0c7217cc4a3dbc6"
30
+ },
31
+ {
32
+ "author": "beachball",
33
+ "package": "@fluentui-react-native/callout",
34
+ "comment": "Bump @uifabricshared/foundation-compose to v1.11.2",
35
+ "commit": "511aeb31982a5fb9dd2f7196c0c7217cc4a3dbc6"
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Thu, 16 Dec 2021 23:00:56 GMT",
42
+ "tag": "@fluentui-react-native/callout_v0.19.1",
43
+ "version": "0.19.1",
44
+ "comments": {
45
+ "none": [
46
+ {
47
+ "author": "dannyvv@microsoft.com",
48
+ "package": "@fluentui-react-native/callout",
49
+ "commit": "25b3989739737bc598a5d699a941af4c0b4a421f",
50
+ "comment": "📦 applying package updates ***NO_CI***"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Thu, 16 Dec 2021 19:10:30 GMT",
57
+ "tag": "@fluentui-react-native/callout_v0.19.1",
58
+ "version": "0.19.1",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "sanajmi@microsoft.com",
63
+ "package": "@fluentui-react-native/callout",
64
+ "commit": "51cbf7c64d5c52feeec2e845cd4dbd4e23c96e1e",
65
+ "comment": "Add up/down arrow key support to macOS ContextualMenu"
66
+ },
67
+ {
68
+ "author": "sanajmi@microsoft.com",
69
+ "package": "@fluentui-react-native/callout",
70
+ "commit": "dd2f47a0a2d6aab7361301a16407c76497b45ce7",
71
+ "comment": "remove focus style overrides for macOS contextual menu items"
72
+ },
73
+ {
74
+ "author": "sanajmi@microsoft.com",
75
+ "package": "@fluentui-react-native/callout",
76
+ "commit": "e597717b14dce4916740076786391449dd4a7c69",
77
+ "comment": "Rename Jest snapshots to be platform agnostic "
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@fluentui-react-native/callout",
82
+ "comment": "Bump @fluentui-react-native/adapters to v0.8.1",
83
+ "commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@fluentui-react-native/callout",
88
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.1",
89
+ "commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@fluentui-react-native/callout",
94
+ "comment": "Bump @fluentui-react-native/tokens to v0.11.1",
95
+ "commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@fluentui-react-native/callout",
100
+ "comment": "Bump @uifabricshared/foundation-compose to v1.11.1",
101
+ "commit": "6a9f067ae2510481b6ff3512c10c08e7de84f86e"
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "date": "Wed, 17 Nov 2021 19:28:07 GMT",
108
+ "tag": "@fluentui-react-native/callout_v0.19.0",
109
+ "version": "0.19.0",
110
+ "comments": {
111
+ "minor": [
112
+ {
113
+ "comment": "Update to react-native 0.64",
114
+ "author": "afoxman@microsoft.com",
115
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
116
+ "package": "@fluentui-react-native/callout"
117
+ }
118
+ ],
119
+ "patch": [
120
+ {
121
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.11.0",
122
+ "author": "afoxman@microsoft.com",
123
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
124
+ "package": "@fluentui-react-native/callout"
125
+ },
126
+ {
127
+ "comment": "Bump @fluentui-react-native/tokens to v0.11.0",
128
+ "author": "afoxman@microsoft.com",
129
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
130
+ "package": "@fluentui-react-native/callout"
131
+ },
132
+ {
133
+ "comment": "Bump @fluentui-react-native/component-cache to v1.3.0",
134
+ "author": "afoxman@microsoft.com",
135
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
136
+ "package": "@fluentui-react-native/callout"
137
+ },
138
+ {
139
+ "comment": "Bump @uifabricshared/foundation-compose to v1.11.0",
140
+ "author": "afoxman@microsoft.com",
141
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
142
+ "package": "@fluentui-react-native/callout"
143
+ },
144
+ {
145
+ "comment": "Bump @uifabricshared/foundation-composable to v0.10.0",
146
+ "author": "afoxman@microsoft.com",
147
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
148
+ "package": "@fluentui-react-native/callout"
149
+ },
150
+ {
151
+ "comment": "Bump @uifabricshared/foundation-settings to v0.11.0",
152
+ "author": "afoxman@microsoft.com",
153
+ "commit": "f16d742b5c2d5b97e49ac1ef7b740cbf89fc42e6",
154
+ "package": "@fluentui-react-native/callout"
155
+ }
156
+ ]
157
+ }
158
+ },
159
+ {
160
+ "date": "Fri, 12 Nov 2021 16:07:20 GMT",
161
+ "tag": "@fluentui-react-native/callout_v0.18.1",
162
+ "version": "0.18.1",
163
+ "comments": {
164
+ "none": [
165
+ {
166
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.10.54",
167
+ "author": "4123478+tido64@users.noreply.github.com",
168
+ "commit": "25673699e6c6c064b41f1246c2c995baa67a74ad",
169
+ "package": "@fluentui-react-native/callout"
170
+ }
171
+ ]
172
+ }
173
+ },
174
+ {
175
+ "date": "Thu, 11 Nov 2021 23:17:41 GMT",
176
+ "tag": "@fluentui-react-native/callout_v0.18.1",
177
+ "version": "0.18.1",
178
+ "comments": {
179
+ "none": [
180
+ {
181
+ "comment": "Rename uifabricshared/eslint-config-rules to fluentui-react-native/eslint-config-rules",
182
+ "author": "ruaraki@microsoft.com",
183
+ "commit": "110fba2a1721a914501404f6040f07656307549e",
184
+ "package": "@fluentui-react-native/callout"
185
+ }
186
+ ]
187
+ }
188
+ },
189
+ {
190
+ "date": "Tue, 09 Nov 2021 23:04:33 GMT",
6
191
  "tag": "@fluentui-react-native/callout_v0.18.1",
7
192
  "version": "0.18.1",
8
193
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,60 @@
1
1
  # Change Log - @fluentui-react-native/callout
2
2
 
3
- This log was last generated on Tue, 09 Nov 2021 23:03:11 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 17 Dec 2021 18:38:35 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.19.3
8
+
9
+ Fri, 17 Dec 2021 18:38:35 GMT
10
+
11
+ ### Patches
12
+
13
+ - Documentation fixes (sanajmi@microsoft.com)
14
+
15
+ ## 0.19.2
16
+
17
+ Fri, 17 Dec 2021 01:26:42 GMT
18
+
19
+ ### Patches
20
+
21
+ - Bump @fluentui-react-native/interactive-hooks to v0.11.2
22
+ - Bump @uifabricshared/foundation-compose to v1.11.2
23
+
24
+ ## 0.19.1
25
+
26
+ Thu, 16 Dec 2021 19:10:30 GMT
27
+
28
+ ### Patches
29
+
30
+ - Add up/down arrow key support to macOS ContextualMenu (sanajmi@microsoft.com)
31
+ - remove focus style overrides for macOS contextual menu items (sanajmi@microsoft.com)
32
+ - Rename Jest snapshots to be platform agnostic (sanajmi@microsoft.com)
33
+ - Bump @fluentui-react-native/adapters to v0.8.1
34
+ - Bump @fluentui-react-native/interactive-hooks to v0.11.1
35
+ - Bump @fluentui-react-native/tokens to v0.11.1
36
+ - Bump @uifabricshared/foundation-compose to v1.11.1
37
+
38
+ ## 0.19.0
39
+
40
+ Wed, 17 Nov 2021 19:28:07 GMT
41
+
42
+ ### Minor changes
43
+
44
+ - Update to react-native 0.64 (afoxman@microsoft.com)
45
+
46
+ ### Patches
47
+
48
+ - Bump @fluentui-react-native/interactive-hooks to v0.11.0 (afoxman@microsoft.com)
49
+ - Bump @fluentui-react-native/tokens to v0.11.0 (afoxman@microsoft.com)
50
+ - Bump @fluentui-react-native/component-cache to v1.3.0 (afoxman@microsoft.com)
51
+ - Bump @uifabricshared/foundation-compose to v1.11.0 (afoxman@microsoft.com)
52
+ - Bump @uifabricshared/foundation-composable to v0.10.0 (afoxman@microsoft.com)
53
+ - Bump @uifabricshared/foundation-settings to v0.11.0 (afoxman@microsoft.com)
54
+
7
55
  ## 0.18.1
8
56
 
9
- Tue, 09 Nov 2021 23:03:11 GMT
57
+ Tue, 09 Nov 2021 23:04:33 GMT
10
58
 
11
59
  ### Patches
12
60
 
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ScreenRect, ViewProps, ViewStyle } from 'react-native';
2
+ import { ScreenRect, ViewStyle } from 'react-native';
3
+ import { IViewProps } from '@fluentui-react-native/adapters';
3
4
  import { IRenderData } from '@uifabricshared/foundation-composable';
4
5
  import { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
5
6
  import { IFocusable } from '@fluentui-react-native/interactive-hooks';
@@ -68,7 +69,11 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
68
69
  */
69
70
  minPadding?: number;
70
71
  }
71
- export interface ICalloutProps extends ViewProps, ICalloutTokens {
72
+ export interface ICalloutProps extends IViewProps, ICalloutTokens {
73
+ /**
74
+ * A string that should be announced when the callout is shown.
75
+ * @platform win32
76
+ */
72
77
  accessibilityOnShowAnnouncement?: string;
73
78
  /**
74
79
  * A RefObject to access the IFocusable interface. Use this to access the public methods and properties of the component.
@@ -78,6 +83,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
78
83
  * Adds a beak to the Callout, pointing to the anchor target.
79
84
  * Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
80
85
  * border width prop will not be honored.
86
+ * @platform win32
81
87
  */
82
88
  isBeakVisible?: boolean;
83
89
  /**
@@ -93,6 +99,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
93
99
  * this callback is most appropriate for components strictly controlling focus.
94
100
  *
95
101
  * restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
102
+ * @platform win32
96
103
  */
97
104
  onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
98
105
  /**
@@ -100,6 +107,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
100
107
  */
101
108
  onShow?: () => void;
102
109
  /**
110
+ * @platform win32
103
111
  * If true then the callout will attempt to focus the first focusable element that it contains.
104
112
  * If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
105
113
  * to either set focus or have focusable items.
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACt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IAE3C;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;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;;;;;OAKG;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,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,oBAAY,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":"AAKA,MAAM,CAAC,IAAM,WAAW,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,IAAM,WAAW,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Callout.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":""}
@@ -5,4 +5,4 @@ it('Callout default props', function () {
5
5
  var tree = renderer.create(React.createElement(Callout, null)).toJSON();
6
6
  expect(tree).toMatchSnapshot();
7
7
  });
8
- //# sourceMappingURL=Callout.test.win32.js.map
8
+ //# sourceMappingURL=Callout.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.test.js","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,EAAE,CAAC,uBAAuB,EAAE;IAC1B,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,OAAO,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ScreenRect, ViewProps, ViewStyle } from 'react-native';
2
+ import { ScreenRect, ViewStyle } from 'react-native';
3
+ import { IViewProps } from '@fluentui-react-native/adapters';
3
4
  import { IRenderData } from '@uifabricshared/foundation-composable';
4
5
  import { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
5
6
  import { IFocusable } from '@fluentui-react-native/interactive-hooks';
@@ -68,7 +69,11 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
68
69
  */
69
70
  minPadding?: number;
70
71
  }
71
- export interface ICalloutProps extends ViewProps, ICalloutTokens {
72
+ export interface ICalloutProps extends IViewProps, ICalloutTokens {
73
+ /**
74
+ * A string that should be announced when the callout is shown.
75
+ * @platform win32
76
+ */
72
77
  accessibilityOnShowAnnouncement?: string;
73
78
  /**
74
79
  * A RefObject to access the IFocusable interface. Use this to access the public methods and properties of the component.
@@ -78,6 +83,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
78
83
  * Adds a beak to the Callout, pointing to the anchor target.
79
84
  * Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
80
85
  * border width prop will not be honored.
86
+ * @platform win32
81
87
  */
82
88
  isBeakVisible?: boolean;
83
89
  /**
@@ -93,6 +99,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
93
99
  * this callback is most appropriate for components strictly controlling focus.
94
100
  *
95
101
  * restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
102
+ * @platform win32
96
103
  */
97
104
  onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
98
105
  /**
@@ -100,6 +107,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
100
107
  */
101
108
  onShow?: () => void;
102
109
  /**
110
+ * @platform win32
103
111
  * If true then the callout will attempt to focus the first focusable element that it contains.
104
112
  * If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
105
113
  * to either set focus or have focusable items.
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.types.d.ts","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AACtE,eAAO,MAAM,WAAW,YAAY,CAAC;AAErC;;GAEG;AAEH,oBAAY,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,oBAAY,gBAAgB,GAAG,yBAAyB,GAAG,8BAA8B,CAAC;AAE1F,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE;QACX;;WAEG;QACH,aAAa,EA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AAED,oBAAY,iBAAiB,GAAG;IAC9B,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,oBAAY,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":";;AAKa,QAAA,WAAW,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":";;AAMa,QAAA,WAAW,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Callout.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":""}
@@ -14,4 +14,4 @@ it('Callout default props', function () {
14
14
  var tree = renderer.create(React.createElement(__1.Callout, null)).toJSON();
15
15
  expect(tree).toMatchSnapshot();
16
16
  });
17
- //# sourceMappingURL=Callout.test.win32.js.map
17
+ //# sourceMappingURL=Callout.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Callout.test.js","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+B;AAC/B,wBAA6B;AAC7B,4DAAgD;AAEhD,EAAE,CAAC,uBAAuB,EAAE;IAC1B,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,WAAO,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
@@ -83,25 +83,21 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
83
83
 
84
84
  // MARK: WindowLifeCycleDelegate
85
85
 
86
- func didDetectHitOutsideCallout(calloutWindow: CalloutWindow) {
87
- dismissCallout()
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
95
91
 
96
92
  private func showCallout() {
97
93
  updateCalloutFrameToAnchor()
98
- calloutWindow.display()
99
- didShowCallout()
94
+ calloutWindow.makeKeyAndOrderFront(self)
95
+ onShowCallout()
100
96
  }
101
97
 
102
98
  private func dismissCallout() {
103
99
  calloutWindow.close()
104
- didDismissCallout()
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 didShowCallout() {
267
+ private func onShowCallout() {
272
268
  onShow?([:])
273
269
  }
274
270
 
275
- private func didDismissCallout() {
271
+ private func onDismissCallout() {
276
272
  if let onDismiss = onDismiss {
277
273
  guard let reactTag = reactTag else {
278
274
  preconditionFailure("React Tag missing")
@@ -286,17 +282,11 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
286
282
 
287
283
  private var anchorView: NSView?
288
284
 
289
- private var proxyView: RCTView = RCTView()
285
+ private var proxyView = RCTView()
290
286
 
291
287
  private lazy var calloutWindow: CalloutWindow = {
292
288
  let window = CalloutWindow()
293
- window.windowLifeCycleDelegate = self
294
- window.isReleasedWhenClosed = true
295
-
296
- window.styleMask = [.fullSizeContentView]
297
- window.level = .popUpMenu
298
- window.backgroundColor = .clear
299
- window.isMovableByWindowBackground = false
289
+ window.lifeCycleDelegate = self
300
290
 
301
291
  let visualEffect = NSVisualEffectView()
302
292
  visualEffect.translatesAutoresizingMaskIntoConstraints = false
@@ -317,8 +307,7 @@ class CalloutView: RCTView, CalloutWindowLifeCycleDelegate {
317
307
  visualEffect.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
318
308
  ])
319
309
 
320
- contentView.addSubview(proxyView)
321
- window.setIsVisible(true)
310
+ visualEffect.addSubview(proxyView)
322
311
 
323
312
  return window
324
313
  }()
@@ -1,37 +1,59 @@
1
1
  import Foundation
2
2
  import AppKit
3
+ import Carbon.HIToolbox
3
4
 
4
- protocol CalloutWindowLifeCycleDelegate {
5
- /*
6
- * Notify the CalloutWindowLifeCycle object that the user touched/clicked outside the bounds of the callout.
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
-
18
- public var windowLifeCycleDelegate: CalloutWindowLifeCycleDelegate?
11
+
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
-
23
- NotificationCenter.default.addObserver(self, selector: #selector(appDidChangeActive(notification:)), name: NSApplication.didResignActiveNotification, object: nil)
24
-
25
- mouseEventMonitor = NSEvent.addLocalMonitorForEvents(matching: .leftMouseUp, handler: { (event) -> NSEvent? in
16
+ isReleasedWhenClosed = false
17
+
18
+ styleMask = .borderless
19
+ level = .popUpMenu
20
+ backgroundColor = .clear
21
+ isMovable = false
22
+
23
+ // Dismiss the Callout if the window is no longer active.
24
+ NotificationCenter.default.addObserver(self, selector: #selector(dismissCallout), name: NSApplication.didResignActiveNotification, object: nil)
25
+
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
26
28
  if (event.window != self) {
27
- self.windowLifeCycleDelegate?.didDetectHitOutsideCallout(calloutWindow: self)
29
+ self?.dismissCallout()
28
30
  }
29
31
  return event
30
32
  })
31
33
  }
32
34
 
33
- @objc func appDidChangeActive(notification: NSNotification) {
34
- windowLifeCycleDelegate?.applicationDidResignActiveForCalloutWindow(calloutWindow: self)
35
+ // Required to get a key view loop in the window
36
+ override var canBecomeKey: Bool {
37
+ return true
38
+ }
39
+
40
+ override var canBecomeMain: Bool {
41
+ return false
42
+ }
43
+
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()
35
57
  }
36
58
 
37
59
  private var mouseEventMonitor: Any?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/callout",
3
- "version": "0.18.1",
3
+ "version": "0.19.3",
4
4
  "description": "A cross-platform Callout component using the Fluent Design System",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -20,21 +20,22 @@
20
20
  "prettier-fix": "fluentui-scripts prettier --fix true"
21
21
  },
22
22
  "dependencies": {
23
- "@fluentui-react-native/component-cache": "^1.2.3",
24
- "@fluentui-react-native/interactive-hooks": ">=0.10.54 <1.0.0",
25
- "@fluentui-react-native/tokens": ">=0.10.3 <1.0.0",
26
- "@uifabricshared/foundation-composable": ">=0.9.3 <1.0.0",
27
- "@uifabricshared/foundation-compose": "^1.10.22",
28
- "@uifabricshared/foundation-settings": ">=0.10.3 <1.0.0"
23
+ "@fluentui-react-native/adapters": "^0.8.1",
24
+ "@fluentui-react-native/component-cache": "^1.3.0",
25
+ "@fluentui-react-native/interactive-hooks": ">=0.11.2 <1.0.0",
26
+ "@fluentui-react-native/tokens": ">=0.11.1 <1.0.0",
27
+ "@uifabricshared/foundation-composable": ">=0.10.0 <1.0.0",
28
+ "@uifabricshared/foundation-compose": "^1.11.2",
29
+ "@uifabricshared/foundation-settings": ">=0.11.0 <1.0.0"
29
30
  },
30
31
  "devDependencies": {
31
- "@types/react-native": "^0.63.0",
32
+ "@fluentui-react-native/eslint-config-rules": "^0.1.1",
33
+ "@types/react-native": "^0.64.0",
32
34
  "@uifabricshared/build-native": "^0.1.1",
33
- "@uifabricshared/eslint-config-rules": "^0.1.1",
34
- "react-native": "^0.63.4"
35
+ "react-native": "^0.64.3"
35
36
  },
36
37
  "peerDependencies": {
37
- "react": ">=16.13.1",
38
- "react-native": ">=0.63.4"
38
+ "react": ">=17.0.1",
39
+ "react-native": ">=0.64.3"
39
40
  }
40
41
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import { ScreenRect, ViewProps, ViewStyle } from 'react-native';
2
+ import { ScreenRect, ViewStyle } from 'react-native';
3
+ import { IViewProps } from '@fluentui-react-native/adapters';
3
4
  import { IRenderData } from '@uifabricshared/foundation-composable';
4
5
  import { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
5
6
  import { IFocusable } from '@fluentui-react-native/interactive-hooks';
@@ -97,9 +98,10 @@ export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTok
97
98
  minPadding?: number;
98
99
  }
99
100
 
100
- export interface ICalloutProps extends ViewProps, ICalloutTokens {
101
- /*
101
+ export interface ICalloutProps extends IViewProps, ICalloutTokens {
102
+ /**
102
103
  * A string that should be announced when the callout is shown.
104
+ * @platform win32
103
105
  */
104
106
  accessibilityOnShowAnnouncement?: string;
105
107
 
@@ -112,6 +114,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
112
114
  * Adds a beak to the Callout, pointing to the anchor target.
113
115
  * Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
114
116
  * border width prop will not be honored.
117
+ * @platform win32
115
118
  */
116
119
  isBeakVisible?: boolean;
117
120
 
@@ -129,6 +132,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
129
132
  * this callback is most appropriate for components strictly controlling focus.
130
133
  *
131
134
  * restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
135
+ * @platform win32
132
136
  */
133
137
  onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
134
138
 
@@ -138,6 +142,7 @@ export interface ICalloutProps extends ViewProps, ICalloutTokens {
138
142
  onShow?: () => void;
139
143
 
140
144
  /**
145
+ * @platform win32
141
146
  * If true then the callout will attempt to focus the first focusable element that it contains.
142
147
  * If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
143
148
  * to either set focus or have focusable items.
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Callout.test.win32.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.win32.d.ts","sourceRoot":"","sources":["../../src/__tests__/Callout.test.win32.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.win32.js","sourceRoot":"","sources":["../../src/__tests__/Callout.test.win32.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,EAAE,CAAC,uBAAuB,EAAE;IAC1B,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,OAAO,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Callout.test.win32.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.win32.d.ts","sourceRoot":"","sources":["../../src/__tests__/Callout.test.win32.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.win32.js","sourceRoot":"","sources":["../../src/__tests__/Callout.test.win32.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA+B;AAC/B,wBAA6B;AAC7B,4DAAgD;AAEhD,EAAE,CAAC,uBAAuB,EAAE;IAC1B,IAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,oBAAC,WAAO,OAAG,CAAC,CAAC,MAAM,EAAE,CAAC;IACnD,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;AACjC,CAAC,CAAC,CAAC"}