@tamagui/dismissable 1.46.2 → 1.47.0
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/package.json +6 -6
- package/dist/jsx/Dismissable.mjs +0 -252
- package/dist/jsx/Dismissable.mjs.map +0 -6
- package/dist/jsx/Dismissable.native.mjs +0 -14
- package/dist/jsx/Dismissable.native.mjs.map +0 -6
- package/dist/jsx/DismissableProps.mjs +0 -1
- package/dist/jsx/DismissableProps.mjs.map +0 -6
- package/dist/jsx/index.mjs +0 -2
- package/dist/jsx/index.mjs.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/dismissable",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"sideEffects": true,
|
|
5
5
|
"source": "src/index.ts",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@tamagui/compose-refs": "1.
|
|
33
|
-
"@tamagui/core": "1.
|
|
34
|
-
"@tamagui/use-escape-keydown": "1.
|
|
35
|
-
"@tamagui/use-event": "1.
|
|
32
|
+
"@tamagui/compose-refs": "1.47.0",
|
|
33
|
+
"@tamagui/core": "1.47.0",
|
|
34
|
+
"@tamagui/use-escape-keydown": "1.47.0",
|
|
35
|
+
"@tamagui/use-event": "1.47.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": "*"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@tamagui/build": "1.
|
|
41
|
+
"@tamagui/build": "1.47.0",
|
|
42
42
|
"react": "^18.2.0"
|
|
43
43
|
},
|
|
44
44
|
"publishConfig": {
|
package/dist/jsx/Dismissable.mjs
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
import { useEscapeKeydown } from "@tamagui/use-escape-keydown";
|
|
2
|
-
import { useComposedRefs } from "@tamagui/compose-refs";
|
|
3
|
-
import { composeEventHandlers } from "@tamagui/core";
|
|
4
|
-
import { useEvent } from "@tamagui/use-event";
|
|
5
|
-
import * as React from "react";
|
|
6
|
-
import * as ReactDOM from "react-dom";
|
|
7
|
-
function dispatchDiscreteCustomEvent(target, event) {
|
|
8
|
-
if (target)
|
|
9
|
-
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
10
|
-
}
|
|
11
|
-
const DISMISSABLE_LAYER_NAME = "Dismissable";
|
|
12
|
-
const CONTEXT_UPDATE = "dismissable.update";
|
|
13
|
-
const POINTER_DOWN_OUTSIDE = "dismissable.pointerDownOutside";
|
|
14
|
-
const FOCUS_OUTSIDE = "dismissable.focusOutside";
|
|
15
|
-
let originalBodyPointerEvents;
|
|
16
|
-
const DismissableContext = React.createContext({
|
|
17
|
-
layers: /* @__PURE__ */ new Set(),
|
|
18
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
19
|
-
branches: /* @__PURE__ */ new Set()
|
|
20
|
-
});
|
|
21
|
-
const Dismissable = React.forwardRef(
|
|
22
|
-
(props, forwardedRef) => {
|
|
23
|
-
const {
|
|
24
|
-
disableOutsidePointerEvents = false,
|
|
25
|
-
forceUnmount,
|
|
26
|
-
onEscapeKeyDown,
|
|
27
|
-
onPointerDownOutside,
|
|
28
|
-
onFocusOutside,
|
|
29
|
-
onInteractOutside,
|
|
30
|
-
onDismiss,
|
|
31
|
-
...layerProps
|
|
32
|
-
} = props;
|
|
33
|
-
const context = React.useContext(DismissableContext);
|
|
34
|
-
const [node, setNode] = React.useState(null);
|
|
35
|
-
const [, force] = React.useState({});
|
|
36
|
-
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
37
|
-
const layers = Array.from(context.layers);
|
|
38
|
-
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
39
|
-
...context.layersWithOutsidePointerEventsDisabled
|
|
40
|
-
].slice(-1);
|
|
41
|
-
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(
|
|
42
|
-
highestLayerWithOutsidePointerEventsDisabled
|
|
43
|
-
);
|
|
44
|
-
const index = node ? layers.indexOf(node) : -1;
|
|
45
|
-
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
46
|
-
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
47
|
-
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
48
|
-
const target = event.target;
|
|
49
|
-
const isPointerDownOnBranch = [...context.branches].some(
|
|
50
|
-
(branch) => branch.contains(target)
|
|
51
|
-
);
|
|
52
|
-
if (!isPointerEventsEnabled || isPointerDownOnBranch)
|
|
53
|
-
return;
|
|
54
|
-
onPointerDownOutside?.(event);
|
|
55
|
-
onInteractOutside?.(event);
|
|
56
|
-
if (!event.defaultPrevented)
|
|
57
|
-
onDismiss?.();
|
|
58
|
-
});
|
|
59
|
-
const focusOutside = useFocusOutside((event) => {
|
|
60
|
-
const target = event.target;
|
|
61
|
-
const isFocusInBranch = [...context.branches].some(
|
|
62
|
-
(branch) => branch.contains(target)
|
|
63
|
-
);
|
|
64
|
-
if (isFocusInBranch)
|
|
65
|
-
return;
|
|
66
|
-
onFocusOutside?.(event);
|
|
67
|
-
onInteractOutside?.(event);
|
|
68
|
-
if (!event.defaultPrevented)
|
|
69
|
-
onDismiss?.();
|
|
70
|
-
});
|
|
71
|
-
useEscapeKeydown((event) => {
|
|
72
|
-
const isHighestLayer = index === context.layers.size - 1;
|
|
73
|
-
if (!isHighestLayer)
|
|
74
|
-
return;
|
|
75
|
-
onEscapeKeyDown?.(event);
|
|
76
|
-
if (!event.defaultPrevented && onDismiss) {
|
|
77
|
-
event.preventDefault();
|
|
78
|
-
onDismiss();
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
React.useEffect(() => {
|
|
82
|
-
if (!node)
|
|
83
|
-
return;
|
|
84
|
-
if (disableOutsidePointerEvents) {
|
|
85
|
-
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
86
|
-
originalBodyPointerEvents = document.body.style.pointerEvents;
|
|
87
|
-
document.body.style.pointerEvents = "none";
|
|
88
|
-
}
|
|
89
|
-
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
90
|
-
}
|
|
91
|
-
context.layers.add(node);
|
|
92
|
-
dispatchUpdate();
|
|
93
|
-
return () => {
|
|
94
|
-
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
95
|
-
document.body.style.pointerEvents = originalBodyPointerEvents;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}, [node, disableOutsidePointerEvents, context]);
|
|
99
|
-
React.useEffect(() => {
|
|
100
|
-
if (forceUnmount)
|
|
101
|
-
return;
|
|
102
|
-
return () => {
|
|
103
|
-
if (!node)
|
|
104
|
-
return;
|
|
105
|
-
context.layers.delete(node);
|
|
106
|
-
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
107
|
-
dispatchUpdate();
|
|
108
|
-
};
|
|
109
|
-
}, [node, context, forceUnmount]);
|
|
110
|
-
React.useEffect(() => {
|
|
111
|
-
const handleUpdate = () => {
|
|
112
|
-
force({});
|
|
113
|
-
};
|
|
114
|
-
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
115
|
-
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
116
|
-
}, []);
|
|
117
|
-
return <div
|
|
118
|
-
{...layerProps}
|
|
119
|
-
ref={composedRefs}
|
|
120
|
-
style={{
|
|
121
|
-
display: "contents",
|
|
122
|
-
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
123
|
-
// @ts-ignore
|
|
124
|
-
...props.style
|
|
125
|
-
}}
|
|
126
|
-
onFocusCapture={composeEventHandlers(
|
|
127
|
-
// @ts-ignore
|
|
128
|
-
props.onFocusCapture,
|
|
129
|
-
focusOutside.onFocusCapture
|
|
130
|
-
)}
|
|
131
|
-
onBlurCapture={composeEventHandlers(
|
|
132
|
-
// @ts-ignore
|
|
133
|
-
props.onBlurCapture,
|
|
134
|
-
focusOutside.onBlurCapture
|
|
135
|
-
)}
|
|
136
|
-
onPointerDownCapture={composeEventHandlers(
|
|
137
|
-
// @ts-ignore
|
|
138
|
-
props.onPointerDownCapture,
|
|
139
|
-
pointerDownOutside.onPointerDownCapture
|
|
140
|
-
)}
|
|
141
|
-
/>;
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
Dismissable.displayName = DISMISSABLE_LAYER_NAME;
|
|
145
|
-
const BRANCH_NAME = "DismissableBranch";
|
|
146
|
-
const DismissableBranch = React.forwardRef(
|
|
147
|
-
(props, forwardedRef) => {
|
|
148
|
-
const context = React.useContext(DismissableContext);
|
|
149
|
-
const ref = React.useRef(null);
|
|
150
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
151
|
-
React.useEffect(() => {
|
|
152
|
-
const node = ref.current;
|
|
153
|
-
if (node) {
|
|
154
|
-
context.branches.add(node);
|
|
155
|
-
return () => {
|
|
156
|
-
context.branches.delete(node);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}, [context.branches]);
|
|
160
|
-
return <div style={{ display: "contents" }} {...props} ref={composedRefs} />;
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
DismissableBranch.displayName = BRANCH_NAME;
|
|
164
|
-
function usePointerDownOutside(onPointerDownOutside) {
|
|
165
|
-
const handlePointerDownOutside = useEvent(onPointerDownOutside);
|
|
166
|
-
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
167
|
-
const handleClickRef = React.useRef(() => {
|
|
168
|
-
});
|
|
169
|
-
React.useEffect(() => {
|
|
170
|
-
const handlePointerDown = (event) => {
|
|
171
|
-
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
172
|
-
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
173
|
-
handleAndDispatchCustomEvent(
|
|
174
|
-
POINTER_DOWN_OUTSIDE,
|
|
175
|
-
handlePointerDownOutside,
|
|
176
|
-
eventDetail,
|
|
177
|
-
{ discrete: true }
|
|
178
|
-
);
|
|
179
|
-
};
|
|
180
|
-
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
181
|
-
const eventDetail = { originalEvent: event };
|
|
182
|
-
if (event.pointerType === "touch") {
|
|
183
|
-
document.removeEventListener("click", handleClickRef.current);
|
|
184
|
-
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
185
|
-
document.addEventListener("click", handleClickRef.current, { once: true });
|
|
186
|
-
} else {
|
|
187
|
-
handleAndDispatchPointerDownOutsideEvent2();
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
isPointerInsideReactTreeRef.current = false;
|
|
191
|
-
};
|
|
192
|
-
const timerId = setTimeout(() => {
|
|
193
|
-
document.addEventListener("pointerdown", handlePointerDown);
|
|
194
|
-
}, 0);
|
|
195
|
-
return () => {
|
|
196
|
-
window.clearTimeout(timerId);
|
|
197
|
-
document.removeEventListener("pointerdown", handlePointerDown);
|
|
198
|
-
document.removeEventListener("click", handleClickRef.current);
|
|
199
|
-
};
|
|
200
|
-
}, [handlePointerDownOutside]);
|
|
201
|
-
return {
|
|
202
|
-
// ensures we check React component tree (not just DOM tree)
|
|
203
|
-
onPointerDownCapture: () => {
|
|
204
|
-
isPointerInsideReactTreeRef.current = true;
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
function useFocusOutside(onFocusOutside) {
|
|
209
|
-
const handleFocusOutside = useEvent(onFocusOutside);
|
|
210
|
-
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
211
|
-
React.useEffect(() => {
|
|
212
|
-
const handleFocus = (event) => {
|
|
213
|
-
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
214
|
-
const eventDetail = { originalEvent: event };
|
|
215
|
-
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
216
|
-
discrete: false
|
|
217
|
-
});
|
|
218
|
-
}
|
|
219
|
-
};
|
|
220
|
-
document.addEventListener("focusin", handleFocus);
|
|
221
|
-
return () => document.removeEventListener("focusin", handleFocus);
|
|
222
|
-
}, [handleFocusOutside]);
|
|
223
|
-
return {
|
|
224
|
-
onFocusCapture: () => {
|
|
225
|
-
isFocusInsideReactTreeRef.current = true;
|
|
226
|
-
},
|
|
227
|
-
onBlurCapture: () => {
|
|
228
|
-
isFocusInsideReactTreeRef.current = false;
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function dispatchUpdate() {
|
|
233
|
-
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
234
|
-
document.dispatchEvent(event);
|
|
235
|
-
}
|
|
236
|
-
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
237
|
-
const target = detail.originalEvent.target;
|
|
238
|
-
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
239
|
-
if (handler)
|
|
240
|
-
target.addEventListener(name, handler, { once: true });
|
|
241
|
-
if (discrete) {
|
|
242
|
-
dispatchDiscreteCustomEvent(target, event);
|
|
243
|
-
} else {
|
|
244
|
-
target.dispatchEvent(event);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
export {
|
|
248
|
-
Dismissable,
|
|
249
|
-
DismissableBranch,
|
|
250
|
-
dispatchDiscreteCustomEvent
|
|
251
|
-
};
|
|
252
|
-
//# sourceMappingURL=Dismissable.mjs.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Dismissable.tsx"],
|
|
4
|
-
"mappings": "AAGA,SAAS,wBAAwB;AACjC,SAAS,uBAAuB;AAChC,SAAS,4BAA4B;AACrC,SAAS,gBAAgB;AACzB,YAAY,WAAW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M,cAAc,EAAE,eAAe,MAAM;AAC3C,qCAA6B,eAAe,oBAAoB,aAAa;AAAA,UAC3E,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA,IACF;AACA,aAAS,iBAAiB,WAAW,WAAW;AAChD,WAAO,MAAM,SAAS,oBAAoB,WAAW,WAAW;AAAA,EAClE,GAAG,CAAC,kBAAkB,CAAC;AAEvB,SAAO;AAAA,IACL,gBAAgB,MAAM;AACpB,gCAA0B,UAAU;AAAA,IACtC;AAAA,IACA,eAAe,MAAM;AACnB,gCAA0B,UAAU;AAAA,IACtC;AAAA,EACF;AACF;AAEA,SAAS,iBAAiB;AACxB,QAAM,QAAQ,IAAI,YAAY,cAAc;AAC5C,WAAS,cAAc,KAAK;AAC9B;AAEA,SAAS,6BACP,MACA,SACA,QACA,EAAE,SAAS,GACX;AACA,QAAM,SAAS,OAAO,cAAc;AACpC,QAAM,QAAQ,IAAI,YAAY,MAAM,EAAE,SAAS,OAAO,YAAY,MAAM,OAAO,CAAC;AAChF,MAAI;AAAS,WAAO,iBAAiB,MAAM,SAA0B,EAAE,MAAM,KAAK,CAAC;AAEnF,MAAI,UAAU;AACZ,gCAA4B,QAAQ,KAAK;AAAA,EAC3C,OAAO;AACL,WAAO,cAAc,KAAK;AAAA,EAC5B;AACF;",
|
|
5
|
-
"names": ["node", "handleAndDispatchPointerDownOutsideEvent"]
|
|
6
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
const Dismissable = forwardRef((props, _ref) => {
|
|
3
|
-
return props.children;
|
|
4
|
-
});
|
|
5
|
-
const DismissableBranch = forwardRef(
|
|
6
|
-
(props, _ref) => {
|
|
7
|
-
return props.children;
|
|
8
|
-
}
|
|
9
|
-
);
|
|
10
|
-
export {
|
|
11
|
-
Dismissable,
|
|
12
|
-
DismissableBranch
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=Dismissable.native.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=DismissableProps.mjs.map
|
package/dist/jsx/index.mjs
DELETED