@ray-js/components 1.7.37 → 1.7.38

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.
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- const _excluded = ["id", "className", "style", "hoverClassName", "hoverStartTime", "hoverStayTime", "children", "onLongClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "hoverable", "onTransitionEnd"];
3
+ const _excluded = ["id", "className", "style", "children", "hoverable", "hoverClassName"];
4
4
  import * as React from 'react';
5
5
  import clsx from 'clsx';
6
6
  import PropTypes from 'prop-types';
7
- import { inlineStyle, useTouch } from '@ray-js/framework-shared';
7
+ import { inlineStyle } from '@ray-js/framework-shared';
8
8
  import { View as RemaxView } from '@ray-js/adapter';
9
9
  import styles from './index.module.less';
10
10
  const View = /*#__PURE__*/React.forwardRef((props, ref) => {
@@ -12,30 +12,11 @@ const View = /*#__PURE__*/React.forwardRef((props, ref) => {
12
12
  id,
13
13
  className,
14
14
  style,
15
- hoverClassName,
16
- hoverStartTime,
17
- hoverStayTime,
18
15
  children,
19
- onLongClick,
20
- onTouchStart,
21
- onTouchMove,
22
- onTouchEnd,
23
- onTouchCancel,
24
- onClick,
25
16
  hoverable,
26
- onTransitionEnd
17
+ hoverClassName
27
18
  } = props,
28
19
  restProps = _objectWithoutProperties(props, _excluded);
29
- const [touching, handlers] = useTouch({
30
- hoverDelay: hoverStartTime,
31
- hoverDuration: hoverStayTime,
32
- onLongClick,
33
- onTouchStart,
34
- onTouchMove,
35
- onTouchEnd,
36
- onTouchCancel,
37
- onClick
38
- });
39
20
  return /*#__PURE__*/React.createElement(RemaxView
40
21
  // @ts-ignore
41
22
  , _extends({
@@ -45,11 +26,8 @@ const View = /*#__PURE__*/React.forwardRef((props, ref) => {
45
26
  style: inlineStyle(style),
46
27
  hoverClassName: clsx({
47
28
  [styles.hover]: hoverable
48
- }, hoverClassName),
49
- hoverStartTime: hoverStartTime,
50
- hoverStayTime: hoverStayTime,
51
- onTransitionEnd: onTransitionEnd
52
- }, handlers, restProps), children);
29
+ }, hoverClassName)
30
+ }, restProps), children);
53
31
  });
54
32
  View.displayName = 'View';
55
33
  export default View;
@@ -66,7 +44,5 @@ View.propTypes = {
66
44
  onTouchMove: PropTypes.func,
67
45
  onTouchEnd: PropTypes.func,
68
46
  onTouchCancel: PropTypes.func,
69
- onClick: PropTypes.func,
70
- hoverable: PropTypes.bool,
71
- onTransitionEnd: PropTypes.func
47
+ onClick: PropTypes.func
72
48
  };
@@ -18,5 +18,6 @@ export interface ViewProps extends BaseProps {
18
18
  * @default 70
19
19
  */
20
20
  hoverStayTime?: number;
21
+ hoverable?: boolean;
21
22
  }
22
23
  export declare const defaultViewProps: Partial<ViewProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/components",
3
- "version": "1.7.37",
3
+ "version": "1.7.38",
4
4
  "description": "Ray basic components",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,8 +29,8 @@
29
29
  "dependencies": {
30
30
  "@ray-core/macro": "^0.4.9",
31
31
  "@ray-core/wechat": "^0.4.9",
32
- "@ray-js/adapter": "1.7.37",
33
- "@ray-js/framework-shared": "1.7.37",
32
+ "@ray-js/adapter": "1.7.38",
33
+ "@ray-js/framework-shared": "1.7.38",
34
34
  "ahooks": "^3.8.5",
35
35
  "clsx": "^1.2.1",
36
36
  "core-js": "^3.43.0",
@@ -40,11 +40,11 @@
40
40
  "style-to-object": "^0.3.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@ray-js/cli": "1.7.37"
43
+ "@ray-js/cli": "1.7.38"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "b27ef8f72efef08ba6f3727fe068e2a92a190a20"
49
+ "gitHead": "220c8acfcb8d08cf396e05909db2153d62a1e304"
50
50
  }