@ray-js/components 0.7.9-beta-1 → 0.7.13

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,4 +1,4 @@
1
1
  import React from 'react';
2
- import { ScrollViewProps } from './props';
2
+ import { ScrollViewProps } from '@ray-js/adapter';
3
3
  declare const ScrollView: React.FC<ScrollViewProps>;
4
4
  export default ScrollView;
@@ -4,7 +4,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
4
4
  var _excluded = ["onScroll", "onScrollToUpper", "onScrollToLower"];
5
5
  import React from 'react';
6
6
  import { useEventListener } from 'ahooks';
7
- import { defaultScrollViewProps } from './props';
7
+ import { ScrollView as ScrollViewDef } from '@ray-js/adapter';
8
8
  import handleProps from '../utils/handleProps';
9
9
 
10
10
  var ScrollView = function (props) {
@@ -50,5 +50,5 @@ var ScrollView = function (props) {
50
50
  );
51
51
  };
52
52
 
53
- ScrollView.defaultProps = defaultScrollViewProps;
53
+ ScrollView.defaultProps = ScrollViewDef.defaultProps;
54
54
  export default ScrollView;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- import { ScrollViewProps } from './props';
2
+ import type { ScrollViewProps } from '@ray-js/adapter';
3
3
  declare const ScrollView: React.FC<ScrollViewProps>;
4
4
  export default ScrollView;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- import { ScrollViewProps } from './props';
2
+ import { ScrollViewProps } from '@ray-js/adapter';
3
3
  declare const ScrollView: React.FC<ScrollViewProps>;
4
4
  export default ScrollView;
@@ -4,7 +4,7 @@ var _excluded = ["style"];
4
4
  import * as React from 'react';
5
5
  import { inlineStyle } from '@ray-js/framework-shared';
6
6
  import { ScrollView as RemaxScrollView } from '@ray-core/wechat';
7
- import { defaultScrollViewProps } from './props';
7
+ import { ScrollView as ScrollViewDef } from '@ray-js/adapter';
8
8
 
9
9
  var ScrollView = function (props) {
10
10
  var style = props.style,
@@ -16,5 +16,5 @@ var ScrollView = function (props) {
16
16
  }, restProps));
17
17
  };
18
18
 
19
- ScrollView.defaultProps = defaultScrollViewProps;
19
+ ScrollView.defaultProps = ScrollViewDef.defaultProps;
20
20
  export default ScrollView;
@@ -1,3 +1,3 @@
1
1
  import ScrollView from './ScrollView';
2
- export * from './props';
2
+ export type { ScrollViewProps } from '@ray-js/adapter';
3
3
  export default ScrollView;
@@ -1,3 +1,2 @@
1
1
  import ScrollView from './ScrollView';
2
- export * from './props';
3
2
  export default ScrollView;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/components",
3
- "version": "0.7.9-beta-1",
3
+ "version": "0.7.13",
4
4
  "description": "Ray basic components",
5
5
  "keywords": [
6
6
  "ray"
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "@ray-core/macro": "^0.1.3",
28
28
  "@ray-core/wechat": "^0.1.3",
29
- "@ray-js/adapter": "^0.7.9-beta-1",
30
- "@ray-js/framework-shared": "^0.7.9-beta-1",
29
+ "@ray-js/adapter": "^0.7.13",
30
+ "@ray-js/framework-shared": "^0.7.13",
31
31
  "ahooks": "^3.7.1",
32
32
  "clsx": "^1.1.1",
33
33
  "core-js": "^3.19.1",
@@ -37,7 +37,7 @@
37
37
  "style-to-object": "^0.3.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@ray-js/cli": "^0.7.9-beta-1"
40
+ "@ray-js/cli": "^0.7.13"
41
41
  },
42
42
  "maintainers": [
43
43
  {
@@ -45,6 +45,6 @@
45
45
  "email": "tuyafe@tuya.com"
46
46
  }
47
47
  ],
48
- "gitHead": "2601f82682526ffbd3f97ce4d1e3a3390f693064",
48
+ "gitHead": "9a7d91dcc6beffeda2babc1565ac549a29434da5",
49
49
  "repository": {}
50
50
  }
@@ -1,115 +0,0 @@
1
- import { BaseProps } from '../types';
2
- import { GenericEvent as WxScrollEvent } from '@ray-core/wechat';
3
- export interface ScrollViewProps extends BaseProps {
4
- /** (default: false) 允许横向滚动 1.0.0 */
5
- /**
6
- * @description.en Allow horizontal scrolling
7
- * @description.zh 允许横向滚动
8
- * @default false
9
- */
10
- scrollX?: boolean;
11
- /** (default: false) 允许纵向滚动 1.0.0 */
12
- /**
13
- * @description.en Allow longitudinal roll
14
- * @description.zh 允许纵向滚动
15
- * @default false
16
- */
17
- scrollY?: boolean;
18
- /** 设置竖向滚动条位置 1.0.0 */
19
- /**
20
- * @description.en Sets the vertical scroll bar position
21
- * @description.zh 设置竖向滚动条位置
22
- * @default undefined
23
- */
24
- scrollTop?: number;
25
- /** 设置横向滚动条位置 1.0.0 */
26
- /**
27
- * @description.en Sets the horizontal scroll bar position
28
- * @description.zh 设置横向滚动条位置
29
- * @default undefined
30
- */
31
- scrollLeft?: number;
32
- /** (default: 50) */
33
- /**
34
- * @description.en How far from the top/left is the on Scroll To Upper event 1.0.0 triggered
35
- * @description.zh 距顶部/左边多远时,触发 onScrollToUpper 事件 1.0.0
36
- * @default 50
37
- */
38
- upperThreshold?: number;
39
- /** (default: 50) 距底部/右边多远时,触发 onScrollToLower 事件 1.0.0 */
40
- /**
41
- * @description.en The on Scroll To Lower event 1.0.0 is triggered when it is far from the bottom/right
42
- * @description.zh 距底部/右边多远时,触发 onScrollToLower 事件 1.0.0
43
- * @default 50
44
- */
45
- lowerThreshold?: number;
46
- /** (default: false) 在设置滚动条位置时使用动画过渡 1.0.0 */
47
- /**
48
- * @description.en Animate transition 1.0.0 when setting the scrollbar position
49
- * @description.zh 在设置滚动条位置时使用动画过渡 1.0.0
50
- * @default false
51
- */
52
- scrollWithAnimation?: boolean;
53
- /** 滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY} 1.0.0 */
54
- /**
55
- * @description.en onScroll
56
- * @description.zh 滚动时触发
57
- * @default undefined
58
- */
59
- onScroll?: (event: {
60
- /**
61
- * @description.en type
62
- * @description.zh 类型
63
- * @default undefined
64
- */
65
- type: 'scroll';
66
- /**
67
- * @description.en Horizontal scroll bar position
68
- * @description.zh 横向滚动条位置
69
- * @default undefined
70
- */
71
- scrollLeft: number;
72
- /**
73
- * @description.en Vertical scroll bar position
74
- * @description.zh 竖向滚动条位置
75
- * @default undefined
76
- */
77
- scrollTop: number;
78
- scrollHeight: number;
79
- scrollWidth: number;
80
- deltaX: number;
81
- deltaY: number;
82
- origin: WxScrollEvent;
83
- }) => any;
84
- /**
85
- * @description.en Trigger 1.0.0 when scrolling to the top/left
86
- * @description.zh 滚动到顶部/左边时触发 1.0.0
87
- * @default undefined
88
- */
89
- onScrollToUpper?: (event: {
90
- /**
91
- * @description.en type
92
- * @description.zh 类型
93
- * @default undefined
94
- */
95
- type: 'scrolltoupper';
96
- direction: 'top' | 'left';
97
- origin: WxScrollEvent | Event;
98
- }) => any;
99
- /**
100
- * @description.en Triggered when scrolling to the bottom/right
101
- * @description.zh 滚动到底部/右边时触发
102
- * @default undefined
103
- */
104
- onScrollToLower?: (event: {
105
- /**
106
- * @description.en type
107
- * @description.zh 类型
108
- * @default undefined
109
- */
110
- type: 'scrolltolower';
111
- direction: 'bottom' | 'right';
112
- origin: WxScrollEvent | Event;
113
- }) => any;
114
- }
115
- export declare const defaultScrollViewProps: ScrollViewProps;
@@ -1,5 +0,0 @@
1
- export var defaultScrollViewProps = {
2
- scrollX: false,
3
- scrollY: false,
4
- scrollWithAnimation: false
5
- };