@ray-js/components 0.9.8-beta-1 → 0.9.8-beta-3
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/lib/Picker/Picker.thing.d.ts +1 -1
- package/lib/Picker/Picker.thing.js +48 -5
- package/lib/Picker/Picker.wechat.d.ts +1 -1
- package/lib/Picker/Picker.wechat.js +48 -5
- package/lib/PickerView/PickerView.thing.d.ts +3 -3
- package/lib/PickerView/PickerView.thing.js +22 -6
- package/lib/PickerView/PickerView.wechat.d.ts +3 -3
- package/lib/PickerView/PickerView.wechat.js +22 -6
- package/package.json +5 -5
@@ -1,17 +1,60 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["style"];
|
4
|
+
var _excluded = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
|
5
|
+
import clsx from 'clsx';
|
4
6
|
import * as React from 'react';
|
5
|
-
import { inlineStyle } from '@ray-js/framework-shared';
|
7
|
+
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
6
8
|
import { Picker as RemaxPicker } from '@ray-js/adapter';
|
7
9
|
|
8
10
|
var Picker = function (props) {
|
9
|
-
var
|
11
|
+
var className = props.className,
|
12
|
+
style = props.style,
|
13
|
+
id = props.id,
|
14
|
+
onChange = props.onChange,
|
15
|
+
onTouchStart = props.onTouchStart,
|
16
|
+
onTouchMove = props.onTouchMove,
|
17
|
+
onTouchEnd = props.onTouchEnd,
|
18
|
+
onTouchCancel = props.onTouchCancel,
|
19
|
+
onClick = props.onClick,
|
20
|
+
onCancel = props.onCancel,
|
10
21
|
restProps = _objectWithoutProperties(props, _excluded);
|
11
22
|
|
23
|
+
var _useTouch = useTouch({
|
24
|
+
onTouchStart: onTouchStart,
|
25
|
+
onTouchMove: onTouchMove,
|
26
|
+
onTouchEnd: onTouchEnd,
|
27
|
+
onTouchCancel: onTouchCancel,
|
28
|
+
onClick: onClick
|
29
|
+
}),
|
30
|
+
_useTouch2 = _slicedToArray(_useTouch, 2),
|
31
|
+
touching = _useTouch2[0],
|
32
|
+
handlers = _useTouch2[1];
|
33
|
+
|
12
34
|
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
13
|
-
|
14
|
-
|
35
|
+
onChange: function handleChange(e) {
|
36
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
37
|
+
type: e.type,
|
38
|
+
value: e.detail.value,
|
39
|
+
origin: e
|
40
|
+
});
|
41
|
+
},
|
42
|
+
onCancel: function handleCancel(e) {
|
43
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel({
|
44
|
+
type: e.type,
|
45
|
+
origin: e
|
46
|
+
});
|
47
|
+
},
|
48
|
+
onColumnChange: function handleColumnChange(e) {
|
49
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel({
|
50
|
+
type: e.type,
|
51
|
+
value: e.detail.value,
|
52
|
+
origin: e
|
53
|
+
});
|
54
|
+
},
|
55
|
+
style: inlineStyle(style),
|
56
|
+
className: clsx(className)
|
57
|
+
}, restProps, handlers), props.children);
|
15
58
|
};
|
16
59
|
|
17
60
|
export default Picker;
|
@@ -1,17 +1,60 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["style"];
|
4
|
+
var _excluded = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
|
5
|
+
import clsx from 'clsx';
|
4
6
|
import * as React from 'react';
|
5
|
-
import { inlineStyle } from '@ray-js/framework-shared';
|
7
|
+
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
6
8
|
import { Picker as RemaxPicker } from '@ray-js/adapter';
|
7
9
|
|
8
10
|
var Picker = function (props) {
|
9
|
-
var
|
11
|
+
var className = props.className,
|
12
|
+
style = props.style,
|
13
|
+
id = props.id,
|
14
|
+
onChange = props.onChange,
|
15
|
+
onTouchStart = props.onTouchStart,
|
16
|
+
onTouchMove = props.onTouchMove,
|
17
|
+
onTouchEnd = props.onTouchEnd,
|
18
|
+
onTouchCancel = props.onTouchCancel,
|
19
|
+
onClick = props.onClick,
|
20
|
+
onCancel = props.onCancel,
|
10
21
|
restProps = _objectWithoutProperties(props, _excluded);
|
11
22
|
|
23
|
+
var _useTouch = useTouch({
|
24
|
+
onTouchStart: onTouchStart,
|
25
|
+
onTouchMove: onTouchMove,
|
26
|
+
onTouchEnd: onTouchEnd,
|
27
|
+
onTouchCancel: onTouchCancel,
|
28
|
+
onClick: onClick
|
29
|
+
}),
|
30
|
+
_useTouch2 = _slicedToArray(_useTouch, 2),
|
31
|
+
touching = _useTouch2[0],
|
32
|
+
handlers = _useTouch2[1];
|
33
|
+
|
12
34
|
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
13
|
-
|
14
|
-
|
35
|
+
onChange: function handleChange(e) {
|
36
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
37
|
+
type: e.type,
|
38
|
+
value: e.detail.value,
|
39
|
+
origin: e
|
40
|
+
});
|
41
|
+
},
|
42
|
+
onCancel: function handleCancel(e) {
|
43
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel({
|
44
|
+
type: e.type,
|
45
|
+
origin: e
|
46
|
+
});
|
47
|
+
},
|
48
|
+
onColumnChange: function handleColumnChange(e) {
|
49
|
+
onCancel === null || onCancel === void 0 ? void 0 : onCancel({
|
50
|
+
type: e.type,
|
51
|
+
value: e.detail.value,
|
52
|
+
origin: e
|
53
|
+
});
|
54
|
+
},
|
55
|
+
style: inlineStyle(style),
|
56
|
+
className: clsx(className)
|
57
|
+
}, restProps, handlers), props.children);
|
15
58
|
};
|
16
59
|
|
17
60
|
export default Picker;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import
|
3
|
-
declare const
|
4
|
-
export default
|
2
|
+
import { PickerViewProps } from '@ray-js/adapter';
|
3
|
+
declare const Picker: React.FC<PickerViewProps>;
|
4
|
+
export default Picker;
|
@@ -1,17 +1,33 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["style"];
|
3
|
+
var _excluded = ["className", "style", "id", "onChange", "children"];
|
4
|
+
import clsx from 'clsx';
|
4
5
|
import * as React from 'react';
|
5
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
6
7
|
import { PickerView as RemaxPickerView } from '@ray-js/adapter';
|
8
|
+
import styles from './index.module.less';
|
7
9
|
|
8
|
-
var
|
9
|
-
var
|
10
|
+
var Picker = function (props) {
|
11
|
+
var className = props.className,
|
12
|
+
style = props.style,
|
13
|
+
id = props.id,
|
14
|
+
onChange = props.onChange,
|
15
|
+
children = props.children,
|
10
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
11
17
|
|
12
18
|
return /*#__PURE__*/React.createElement(RemaxPickerView, _extends({
|
13
|
-
|
14
|
-
|
19
|
+
onChange: function handleChange(e) {
|
20
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
21
|
+
type: 'change',
|
22
|
+
value: e.detail.value,
|
23
|
+
origin: e
|
24
|
+
});
|
25
|
+
},
|
26
|
+
style: inlineStyle(style),
|
27
|
+
className: clsx(styles.pickerViewWrp, className)
|
28
|
+
}, restProps), function renderChildren() {
|
29
|
+
return children;
|
30
|
+
}());
|
15
31
|
};
|
16
32
|
|
17
|
-
export default
|
33
|
+
export default Picker;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import
|
3
|
-
declare const
|
4
|
-
export default
|
2
|
+
import { PickerViewProps } from '@ray-js/adapter';
|
3
|
+
declare const Picker: React.FC<PickerViewProps>;
|
4
|
+
export default Picker;
|
@@ -1,17 +1,33 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
var _excluded = ["style"];
|
3
|
+
var _excluded = ["className", "style", "id", "onChange", "children"];
|
4
|
+
import clsx from 'clsx';
|
4
5
|
import * as React from 'react';
|
5
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
6
7
|
import { PickerView as RemaxPickerView } from '@ray-js/adapter';
|
8
|
+
import styles from './index.module.less';
|
7
9
|
|
8
|
-
var
|
9
|
-
var
|
10
|
+
var Picker = function (props) {
|
11
|
+
var className = props.className,
|
12
|
+
style = props.style,
|
13
|
+
id = props.id,
|
14
|
+
onChange = props.onChange,
|
15
|
+
children = props.children,
|
10
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
11
17
|
|
12
18
|
return /*#__PURE__*/React.createElement(RemaxPickerView, _extends({
|
13
|
-
|
14
|
-
|
19
|
+
onChange: function handleChange(e) {
|
20
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
21
|
+
type: 'change',
|
22
|
+
value: e.detail.value,
|
23
|
+
origin: e
|
24
|
+
});
|
25
|
+
},
|
26
|
+
style: inlineStyle(style),
|
27
|
+
className: clsx(styles.pickerViewWrp, className)
|
28
|
+
}, restProps), function renderChildren() {
|
29
|
+
return children;
|
30
|
+
}());
|
15
31
|
};
|
16
32
|
|
17
|
-
export default
|
33
|
+
export default Picker;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/components",
|
3
|
-
"version": "0.9.8-beta-
|
3
|
+
"version": "0.9.8-beta-3",
|
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.9.8-beta-
|
30
|
-
"@ray-js/framework-shared": "^0.9.8-beta-
|
29
|
+
"@ray-js/adapter": "^0.9.8-beta-3",
|
30
|
+
"@ray-js/framework-shared": "^0.9.8-beta-3",
|
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.9.8-beta-
|
40
|
+
"@ray-js/cli": "^0.9.8-beta-3"
|
41
41
|
},
|
42
42
|
"maintainers": [
|
43
43
|
{
|
@@ -45,6 +45,6 @@
|
|
45
45
|
"email": "tuyafe@tuya.com"
|
46
46
|
}
|
47
47
|
],
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "3b223dc2b6fe9c484f0bf326d4640781b9f31b89",
|
49
49
|
"repository": {}
|
50
50
|
}
|