@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.
@@ -15,6 +15,7 @@ export declare type IInteraction = IBaseElement & {
15
15
  wave_version?: 'simple';
16
16
  subscription?: OnesySubscription;
17
17
  clear?: any;
18
+ mobileDelay?: number;
18
19
  };
19
20
  declare const Interaction: React.FC<IInteraction>;
20
21
  export default Interaction;
@@ -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
- }, 15);
244
+ }, mobileDelay);
244
245
  };
245
246
  const onTouchCancel = () => {
246
247
  setTimeout(() => {
247
248
  onMouseUp();
248
249
  onMouseOut();
249
- }, 15);
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
- }, 15);
235
+ }, mobileDelay);
235
236
  };
236
237
  const onTouchCancel = () => {
237
238
  setTimeout(() => {
238
239
  onMouseUp();
239
240
  onMouseOut();
240
- }, 15);
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
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.175
1
+ /** @license UiReact v1.0.176
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.175
1
+ /** @license UiReact v1.0.176
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.176",
3
+ "version": "1.0.177",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",