@onesy/ui-react 1.0.176 → 1.0.177
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/Interaction/Interaction.d.ts +1 -0
- package/Interaction/Interaction.js +4 -3
- package/esm/Interaction/Interaction.js +4 -3
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -158,6 +158,7 @@ const Interaction = props_ => {
|
|
|
158
158
|
subscription,
|
|
159
159
|
clear,
|
|
160
160
|
disabled,
|
|
161
|
+
mobileDelay = 15,
|
|
161
162
|
className
|
|
162
163
|
} = props;
|
|
163
164
|
const {
|
|
@@ -240,13 +241,13 @@ const Interaction = props_ => {
|
|
|
240
241
|
setTimeout(() => {
|
|
241
242
|
onMouseUp();
|
|
242
243
|
onMouseOut();
|
|
243
|
-
},
|
|
244
|
+
}, mobileDelay);
|
|
244
245
|
};
|
|
245
246
|
const onTouchCancel = () => {
|
|
246
247
|
setTimeout(() => {
|
|
247
248
|
onMouseUp();
|
|
248
249
|
onMouseOut();
|
|
249
|
-
},
|
|
250
|
+
}, mobileDelay);
|
|
250
251
|
};
|
|
251
252
|
const rootDocument = (0, _utils.isEnvironment)('browser') ? ((_refs$root$current = refs.root.current) === null || _refs$root$current === void 0 ? void 0 : _refs$root$current.ownerDocument) || window.document : undefined;
|
|
252
253
|
if (parent) {
|
|
@@ -281,7 +282,7 @@ const Interaction = props_ => {
|
|
|
281
282
|
parent.removeEventListener('mouseleave', onMouseOut);
|
|
282
283
|
}
|
|
283
284
|
};
|
|
284
|
-
}, [touch]);
|
|
285
|
+
}, [mobileDelay, touch]);
|
|
285
286
|
_react.default.useEffect(() => {
|
|
286
287
|
if (refs.init.current) {
|
|
287
288
|
if (refs.interactions.current.length) setInteractions([]);
|
|
@@ -150,6 +150,7 @@ const Interaction = props_ => {
|
|
|
150
150
|
subscription,
|
|
151
151
|
clear,
|
|
152
152
|
disabled,
|
|
153
|
+
mobileDelay = 15,
|
|
153
154
|
className
|
|
154
155
|
} = props;
|
|
155
156
|
const {
|
|
@@ -231,13 +232,13 @@ const Interaction = props_ => {
|
|
|
231
232
|
setTimeout(() => {
|
|
232
233
|
onMouseUp();
|
|
233
234
|
onMouseOut();
|
|
234
|
-
},
|
|
235
|
+
}, mobileDelay);
|
|
235
236
|
};
|
|
236
237
|
const onTouchCancel = () => {
|
|
237
238
|
setTimeout(() => {
|
|
238
239
|
onMouseUp();
|
|
239
240
|
onMouseOut();
|
|
240
|
-
},
|
|
241
|
+
}, mobileDelay);
|
|
241
242
|
};
|
|
242
243
|
const rootDocument = isEnvironment('browser') ? refs.root.current?.ownerDocument || window.document : undefined;
|
|
243
244
|
if (parent) {
|
|
@@ -272,7 +273,7 @@ const Interaction = props_ => {
|
|
|
272
273
|
parent.removeEventListener('mouseleave', onMouseOut);
|
|
273
274
|
}
|
|
274
275
|
};
|
|
275
|
-
}, [touch]);
|
|
276
|
+
}, [mobileDelay, touch]);
|
|
276
277
|
React.useEffect(() => {
|
|
277
278
|
if (refs.init.current) {
|
|
278
279
|
if (refs.interactions.current.length) setInteractions([]);
|
package/esm/index.js
CHANGED
package/index.js
CHANGED