@fluentui-react-native/callout 0.23.7 → 0.23.9

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 CHANGED
@@ -2,7 +2,61 @@
2
2
  "name": "@fluentui-react-native/callout",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 07 Mar 2023 20:51:41 GMT",
5
+ "date": "Sat, 18 Mar 2023 17:18:20 GMT",
6
+ "tag": "@fluentui-react-native/callout_v0.23.9",
7
+ "version": "0.23.9",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "beachball",
12
+ "package": "@fluentui-react-native/callout",
13
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.26",
14
+ "commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui-react-native/callout",
19
+ "comment": "Bump @fluentui-react-native/tokens to v0.20.13",
20
+ "commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui-react-native/callout",
25
+ "comment": "Bump @uifabricshared/foundation-compose to v1.13.7",
26
+ "commit": "601309349ca2bc18780a3fb71c59337f7c26f9bf"
27
+ }
28
+ ]
29
+ }
30
+ },
31
+ {
32
+ "date": "Tue, 14 Mar 2023 20:50:45 GMT",
33
+ "tag": "@fluentui-react-native/callout_v0.23.8",
34
+ "version": "0.23.8",
35
+ "comments": {
36
+ "patch": [
37
+ {
38
+ "author": "beachball",
39
+ "package": "@fluentui-react-native/callout",
40
+ "comment": "Bump @fluentui-react-native/interactive-hooks to v0.22.25",
41
+ "commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
42
+ },
43
+ {
44
+ "author": "beachball",
45
+ "package": "@fluentui-react-native/callout",
46
+ "comment": "Bump @fluentui-react-native/tokens to v0.20.12",
47
+ "commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
48
+ },
49
+ {
50
+ "author": "beachball",
51
+ "package": "@fluentui-react-native/callout",
52
+ "comment": "Bump @uifabricshared/foundation-compose to v1.13.6",
53
+ "commit": "b2d39b11dbaa12600bd96a9d54e0ebd013d9597f"
54
+ }
55
+ ]
56
+ }
57
+ },
58
+ {
59
+ "date": "Tue, 07 Mar 2023 20:54:15 GMT",
6
60
  "tag": "@fluentui-react-native/callout_v0.23.7",
7
61
  "version": "0.23.7",
8
62
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,32 @@
1
1
  # Change Log - @fluentui-react-native/callout
2
2
 
3
- This log was last generated on Tue, 07 Mar 2023 20:51:41 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 18 Mar 2023 17:18:20 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.23.9
8
+
9
+ Sat, 18 Mar 2023 17:18:20 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump @fluentui-react-native/interactive-hooks to v0.22.26
14
+ - Bump @fluentui-react-native/tokens to v0.20.13
15
+ - Bump @uifabricshared/foundation-compose to v1.13.7
16
+
17
+ ## 0.23.8
18
+
19
+ Tue, 14 Mar 2023 20:50:45 GMT
20
+
21
+ ### Patches
22
+
23
+ - Bump @fluentui-react-native/interactive-hooks to v0.22.25
24
+ - Bump @fluentui-react-native/tokens to v0.20.12
25
+ - Bump @uifabricshared/foundation-compose to v1.13.6
26
+
7
27
  ## 0.23.7
8
28
 
9
- Tue, 07 Mar 2023 20:51:41 GMT
29
+ Tue, 07 Mar 2023 20:54:15 GMT
10
30
 
11
31
  ### Patches
12
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui-react-native/callout",
3
- "version": "0.23.7",
3
+ "version": "0.23.9",
4
4
  "description": "A cross-platform Callout component using the Fluent Design System",
5
5
  "license": "MIT",
6
6
  "author": "",
@@ -27,10 +27,10 @@
27
27
  "dependencies": {
28
28
  "@fluentui-react-native/adapters": "^0.10.2",
29
29
  "@fluentui-react-native/component-cache": "^1.4.4",
30
- "@fluentui-react-native/interactive-hooks": ">=0.22.24 <1.0.0",
31
- "@fluentui-react-native/tokens": ">=0.20.11 <1.0.0",
30
+ "@fluentui-react-native/interactive-hooks": ">=0.22.26 <1.0.0",
31
+ "@fluentui-react-native/tokens": ">=0.20.13 <1.0.0",
32
32
  "@uifabricshared/foundation-composable": ">=0.11.3 <1.0.0",
33
- "@uifabricshared/foundation-compose": "^1.13.5",
33
+ "@uifabricshared/foundation-compose": "^1.13.7",
34
34
  "@uifabricshared/foundation-settings": ">=0.12.3 <1.0.0"
35
35
  },
36
36
  "devDependencies": {
package/lib/Callout.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import type { ICalloutProps, ICalloutSlotProps } from './Callout.types';
2
- export declare const Callout: import("@uifabricshared/foundation-compose").IComposeReturnType<ICalloutProps, ICalloutSlotProps, import("./Callout.types").ICalloutTokens, object, object>;
3
- export default Callout;
4
- //# sourceMappingURL=Callout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../src/Callout.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAgB,MAAM,iBAAiB,CAAC;AAQtF,eAAO,MAAM,OAAO,6JAkClB,CAAC;AAEH,eAAe,OAAO,CAAC"}
package/lib/Callout.js DELETED
@@ -1,66 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import * as React from 'react';
24
- import { findNodeHandle, Platform } from 'react-native';
25
- import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
26
- import { useViewCommandFocus } from '@fluentui-react-native/interactive-hooks';
27
- import { backgroundColorTokens, borderTokens } from '@fluentui-react-native/tokens';
28
- import { compose } from '@uifabricshared/foundation-compose';
29
- import { mergeSettings } from '@uifabricshared/foundation-settings';
30
- import { settings } from './Callout.settings';
31
- import { calloutName } from './Callout.types';
32
- var NativeCalloutView = Platform.select({
33
- macos: ensureNativeComponent('FRNCallout'),
34
- default: ensureNativeComponent('RCTCallout'), // win32
35
- });
36
- export var Callout = compose({
37
- displayName: calloutName,
38
- usePrepareProps: function (props, useStyling) {
39
- var componentRef = props.componentRef, target = props.target, rest = __rest(props, ["componentRef", "target"]);
40
- var calloutRef = useViewCommandFocus(componentRef);
41
- var _a = React.useState(null), nativeTarget = _a[0], setNativeTarget = _a[1];
42
- React.useLayoutEffect(function () {
43
- if (typeof target === 'string') {
44
- // Pass string type `target` directly
45
- setNativeTarget(target);
46
- }
47
- else if (target === null || target === void 0 ? void 0 : target.current) {
48
- // Pass the tagID for a valid ref `target`
49
- setNativeTarget(findNodeHandle(target.current));
50
- }
51
- }, [target]);
52
- var slotProps = mergeSettings(useStyling(props), {
53
- root: __assign(__assign({ ref: calloutRef }, (nativeTarget && { target: nativeTarget })), rest),
54
- });
55
- return { slotProps: slotProps };
56
- },
57
- settings: settings,
58
- slots: {
59
- root: NativeCalloutView,
60
- },
61
- styles: {
62
- root: [backgroundColorTokens, borderTokens],
63
- },
64
- });
65
- export default Callout;
66
- //# sourceMappingURL=Callout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.js","sourceRo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,MAAM,CAAC,CAAC;aACzB;iBAAM,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO,EAAE;gBAC1B,0CAA0C;gBAC1C,eAAe,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;aACjD;QACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;QAEb,IAAM,SAAS,GAAG,aAAa,CAAoB,UAAU,CAAC,KAAK,CAAC,EAAE;YACpE,IAAI,sBACF,GAAG,EAAE,UAAU,IACZ,CAAC,YAAY,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,GAC1C,IAAI,CACR;SACF,CAAC,CAAC;QAEH,OAAO,EAAE,SAAS,WAAA,EAAE,CAAC;IACvB,CAAC;IACD,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE;QACL,IAAI,EAAE,iBAAiB;KACxB;IACD,MAAM,EAAE;QACN,IAAI,EAAE,CAAC,qBAAqB,EAAE,YAAY,CAAC;KAC5C;CACF,CAAC,CAAC;AAEH,eAAe,OAAO,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { IComposeSettings } from '@uifabricshared/foundation-compose';
2
- import type { ICalloutType } from './Callout.types';
3
- export declare const settings: IComposeSettings<ICalloutType>;
4
- //# sourceMappingURL=Callout.settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.settings.d.ts","sourceRoot":"","sources":["../src/Callout.settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,YAAY,CAanD,CAAC"}
@@ -1,16 +0,0 @@
1
- import { calloutName } from './Callout.types';
2
- export var settings = [
3
- {
4
- tokens: {
5
- backgroundColor: 'bodyStandoutBackground',
6
- beakWidth: 20,
7
- borderColor: 'bodyFrameBackground',
8
- borderWidth: 1,
9
- directionalHint: 'bottonLeftEdge',
10
- gapSpace: 0,
11
- minPadding: 0,
12
- },
13
- },
14
- calloutName,
15
- ];
16
- //# sourceMappingURL=Callout.settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.settings.js","sourceRoot":"","sources":["../src/Callout.settings.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,IAAM,QAAQ,GAAmC;IACtD;QACE,MAAM,EAAE;YACN,eAAe,EAAE,wBAAwB;YACzC,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,CAAC;YACd,eAAe,EAAE,gBAAgB;YACjC,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;SACd;KACF;IACD,WAAW;CACZ,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { IComposeSettings } from '@uifabricshared/foundation-compose';
2
- import type { ICalloutType } from './Callout.types';
3
- export declare const settings: IComposeSettings<ICalloutType>;
4
- //# sourceMappingURL=Callout.settings.macos.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.settings.macos.d.ts","sourceRoot":"","sources":["../src/Callout.settings.macos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAE3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,QAAQ,EAAE,gBAAgB,CAAC,YAAY,CAkBnD,CAAC"}
@@ -1,21 +0,0 @@
1
- import { calloutName } from './Callout.types';
2
- export var settings = [
3
- {
4
- tokens: {
5
- backgroundColor: 'bodyStandoutBackground',
6
- beakWidth: 20,
7
- borderColor: 'bodyFrameBackground',
8
- borderWidth: 1,
9
- directionalHint: 'bottonLeftEdge',
10
- gapSpace: 0,
11
- minPadding: 0,
12
- },
13
- root: {
14
- style: {
15
- position: 'absolute',
16
- },
17
- },
18
- },
19
- calloutName,
20
- ];
21
- //# sourceMappingURL=Callout.settings.macos.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.settings.macos.js","sourceRoot":"","sources":["../src/Callout.settings.macos.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,CAAC,IAAM,QAAQ,GAAmC;IACtD;QACE,MAAM,EAAE;YACN,eAAe,EAAE,wBAAwB;YACzC,SAAS,EAAE,EAAE;YACb,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,CAAC;YACd,eAAe,EAAE,gBAAgB;YACjC,QAAQ,EAAE,CAAC;YACX,UAAU,EAAE,CAAC;SACd;QACD,IAAI,EAAE;YACJ,KAAK,EAAE;gBACL,QAAQ,EAAE,UAAU;aACrB;SACF;KACF;IACD,WAAW;CACZ,CAAC"}
@@ -1,186 +0,0 @@
1
- import type * as React from 'react';
2
- import type { ScreenRect, ViewStyle } from 'react-native';
3
- import type { IViewProps } from '@fluentui-react-native/adapters';
4
- import type { IFocusable } from '@fluentui-react-native/interactive-hooks';
5
- import type { IBackgroundColorTokens, IBorderTokens } from '@fluentui-react-native/tokens';
6
- import type { IRenderData } from '@uifabricshared/foundation-composable';
7
- export declare const calloutName = "Callout";
8
- /**
9
- * Properties and Tokens for FluentUI React Native Callout
10
- */
11
- export type DirectionalHint = 'leftTopEdge' | 'leftCenter' | 'leftBottomEdge' | 'topLeftEdge' | 'topAutoEdge' | 'topCenter' | 'topRightEdge' | 'rightTopEdge' | 'rightCenter' | 'rightBottomEdge' | 'bottonLeftEdge' | 'bottomAutoEdge' | 'bottomCenter' | 'bottomRightEdge';
12
- export type DismissBehaviors = 'preventDismissOnKeyDown' | 'preventDismissOnClickOutside';
13
- export interface RestoreFocusEvent {
14
- nativeEvent: {
15
- /**
16
- * containsFocus is true if the Callout had focus while being dismissed.
17
- */
18
- containsFocus: boolean;
19
- };
20
- }
21
- interface OmittedBorderTokens {
22
- borderRadius?: number | string;
23
- borderStyle?: ViewStyle['borderStyle'];
24
- }
25
- type CalloutBorderTokens = Omit<IBorderTokens, keyof OmittedBorderTokens>;
26
- export interface ICalloutTokens extends IBackgroundColorTokens, CalloutBorderTokens {
27
- /**
28
- * AnchorRect arbitrary anchor rectangle; coordinate system is in DIPs, relative
29
- * to the React surface origin.
30
- */
31
- anchorRect?: ScreenRect;
32
- /**
33
- * Width of the beak on the Callout indicating its anchor.
34
- */
35
- beakWidth?: number;
36
- /**
37
- * Defines the suggested drop direction and alignment for the Callout to use, relative
38
- * to the anchor information.
39
- */
40
- directionalHint?: DirectionalHint;
41
- /**
42
- * Defines variations on how the callout dismissal may be controlled. the async eventing
43
- * of React-Native makes passing some aspects of dismissal control over to JS difficult.
44
- * Moreover, the native platform or host may have competing priorities with regards to transient UI
45
- * that generate bi-directional lifetime management between JS (which mounts and unmounts the
46
- * component) and native (which may tear down the transient UI without JS input).
47
- *
48
- * This property provides control over the latter issue, enabling relevant native platform
49
- * interactions with transient UI to be managed from JS.
50
- *
51
- * These behaviors should generally be orthogonal, and therefore combinable.
52
- */
53
- dismissBehaviors?: DismissBehaviors[];
54
- /**
55
- * Defines the size of the gap between the anchor and the Callout. Not used if
56
- * no anchor information is provided.
57
- */
58
- gapSpace?: number;
59
- /**
60
- * Defines a maximum height for the Callout.
61
- */
62
- maxHeight?: number | string;
63
- /**
64
- * Defines a maximum width for the Callout.
65
- */
66
- maxWidth?: number | string;
67
- /**
68
- * Defines a minimum width for the Callout.
69
- */
70
- minWidth?: number | string;
71
- /**
72
- * Defines the minimum padding between the Callout and the display edges.
73
- */
74
- minPadding?: number;
75
- }
76
- export interface ICalloutProps extends IViewProps, ICalloutTokens {
77
- /**
78
- * A string that should be announced when the callout is shown.
79
- * @platform win32
80
- */
81
- accessibilityOnShowAnnouncement?: string;
82
- /**
83
- * A RefObject to access the IFocusable interface. Use this to access the public methods and properties of the component.
84
- */
85
- componentRef?: React.RefObject<IFocusable>;
86
- /**
87
- * Defines event redirection behaviors for pointer events relative to the Callout control.
88
- *
89
- * Pointer events (i.e. mouse, pen, touch) often have the effect of initiating and dismissing Callout controls.
90
- * Typically the instigating events are click events, but when using a mouse may also include pointer enter
91
- * and leave events i.e. hover. Once opened, many Callout scenarios desire modal-like interactions, where
92
- * the user must interact with or relative to the Callout before interacting with other controls again. A common
93
- * example is context menus, where pointer events away from the menu may dismiss the context menu. Such an interaction
94
- * can initiate unintended actions such as invoking a button or otherwise pointer-responsive surface. The modal-like
95
- * behavior is the most common case of Callout usage, and having "safe" areas to press-dismiss the Callout without
96
- * invoking additional actions is useful.
97
- *
98
- * This modal-like behavior, where true modal behavior would specifically require interacting with the modal component until
99
- * it is dismissed, has implications for canonical event routing in React-Native. Canonically all pointer events are passed in
100
- * a Capture phase from the root element to the target element, then bubbled back from the target element to the root element.
101
- * This structure allows many interaction patterns to be implemented that may include stopping event routing in each phase.
102
- * This event routing can disrupt the modal-like behavior desired by a Callout control, which in native frameworks may take
103
- * advantage of a "take event capture" feature -- making the Callout the first handler of the pointer event. The event may optionally
104
- * be forwarded afterwards to the canonical event routing pattern for further handling (and often is not forwarded).
105
- *
106
- * One impact of "taking event capture" is the implicit behavior for mouse events on the parent surface of the Callout -- if
107
- * event capture is taken by the Callout, paired events may fire such as a mouse leave event. This makes sense if we think about
108
- * the event behavior after the Callout has taken capture; mouse enter and mouse leave events would only propagate to the parent surface
109
- * if the Callout event handling decided to forward said events (often not). As paired events, however, there should not be a
110
- * mouse enter event without a corresponding mouse leave event (or vice versa). Since mouse enter and mouse leave events would not
111
- * naturally fire on the parent surface when the Callout has pointer capture, the parent surface should receive a mouse leave event when
112
- * the Callout takes capture.
113
- *
114
- * Coming back to the start of this comment, some Callout scenarios may be initiated by mouse enter/leave events. A common example is
115
- * tooltips, which are supported on lower-level React-Native components, but such behavior is not exclusive to tooltips.
116
- * The Callout control is generally used for more advanced scenarios, as mentioned before often desiring modal-like behavior and accordingly
117
- * the default behavior of the Callout control is to take pointer capture. Accounting for the paired mouse enter/leave events in the paragraph
118
- * above, it is difficult to have a mouse enter/leave-invoked Callout that takes pointer capture -- without significant workarounds,
119
- * the Callout would open and close cyclically from repeated mouse enter/leave events. There are other scenarios where taking pointer capture
120
- * is not desirable, such as a semi-persistent Callout; to support these scenarios the doNotTakePointerCapture property is offered to
121
- * specify if the Callout should not take pointer capture when it opens.
122
- *
123
- * While pointer capture is generally managed in native frameworks via imperative APIs, managing pointer capture is offered as a property that
124
- * only affects the Callout's on-show behavior when it would typically take pointer capture. This design implies that changing this property after
125
- * the Callout has been shown has no effect -- similar to the Callout's onShow callback. Doing so simplifies Callout usage for developers,
126
- * not needing to mind native platform pointer capture that may be complex particularly when React-Native is integrated into a larger app.
127
- * Pointer capture may be lost (and regained) but is otherwise abstracted away from the developer. More advanced control of pointer capture
128
- * would need to be provided by a native module independent of any particular control.
129
- *
130
- * When the Callout is closed, pointer capture is released by the Callout and further handled by the native platform -- generally returning
131
- * pointer capture to the parent surface.
132
- * @platform win32
133
- */
134
- doNotTakePointerCapture?: boolean;
135
- /**
136
- * Adds a beak to the Callout, pointing to the anchor target.
137
- * Notable Win32 limitation: Beak rendering currently limits the border width to its default, and the
138
- * border width prop will not be honored.
139
- * @platform win32
140
- */
141
- isBeakVisible?: boolean;
142
- /**
143
- * Callback invoked when the callout has been dismissed.
144
- */
145
- onDismiss?: () => void;
146
- /**
147
- * Callback invoked during callout dismissal; if set, focus will not be restored by the callout and onRestoreFocus must
148
- * result in focus being moved to the appropriate focusable target.
149
- *
150
- * The callee should carefully consider their scenarios to avoid dropping focus, or inappropriately
151
- * moving focus from another component. Focus is not guaranteed to have entered the React-Native surface at all, and
152
- * this callback is most appropriate for components strictly controlling focus.
153
- *
154
- * restoreFocusEvent.nativeEvent.containsFocus is true if the Callout had focus while being dismissed.
155
- * @platform win32
156
- */
157
- onRestoreFocus?: (restoreFocusEvent: RestoreFocusEvent) => void;
158
- /**
159
- * Callback invoked when the callout has been shown.
160
- */
161
- onShow?: () => void;
162
- /**
163
- * @platform win32
164
- * If true then the callout will attempt to focus the first focusable element that it contains.
165
- * If it doesn't find an element, no focus will be set. This means that it's the contents responsibility
166
- * to either set focus or have focusable items.
167
- */
168
- setInitialFocus?: boolean;
169
- /**
170
- * Target node the callout uses for relative positioning; the anchor of the callout.
171
- * A ref is the typical usage; certain components may proffer a string as an anchor target, such as
172
- * anchoring to a point inside the component.
173
- */
174
- target?: React.RefObject<React.Component> | string;
175
- }
176
- export type ICalloutSlotProps = {
177
- root: ICalloutProps;
178
- };
179
- export type ICalloutRenderData = IRenderData<ICalloutSlotProps>;
180
- export interface ICalloutType {
181
- props: ICalloutProps;
182
- slotProps: ICalloutSlotProps;
183
- tokens: ICalloutTokens;
184
- }
185
- export {};
186
- //# sourceMappingURL=Callout.types.d.ts.map
@@ -1 +0,0 @@
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,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,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,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,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,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,2 +0,0 @@
1
- export var calloutName = 'Callout';
2
- //# sourceMappingURL=Callout.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.types.js","sourceRoot":"","sources":["../src/Callout.types.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,IAAM,WAAW,GAAG,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Callout.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import * as renderer from 'react-test-renderer';
3
- import { Callout } from '..';
4
- it('Callout default props', function () {
5
- var tree = renderer.create(React.createElement(Callout, null)).toJSON();
6
- expect(tree).toMatchSnapshot();
7
- });
8
- //# sourceMappingURL=Callout.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Callout.test.js","sourceRoot":"","sources":["../../src/__tests__/Callout.test.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,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"}
package/lib/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export { calloutName } from './Callout.types';
2
- export type { DirectionalHint, DismissBehaviors, ICalloutProps, ICalloutRenderData, ICalloutSlotProps, ICalloutTokens, ICalloutType, RestoreFocusEvent, } from './Callout.types';
3
- export { Callout } from './Callout';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
package/lib/index.js DELETED
@@ -1,3 +0,0 @@
1
- export { calloutName } from './Callout.types';
2
- export { Callout } from './Callout';
3
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAW9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}