@ray-js/components 1.4.0-alpha.0 → 1.4.0-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/Button/Button.js +1 -3
- package/lib/Button/Button.thing.js +15 -17
- package/lib/Button/Button.wechat.js +15 -17
- package/lib/Button/props.js +1 -1
- package/lib/Camera/Camera.d.ts +2 -1
- package/lib/Camera/Camera.js +3 -3
- package/lib/Camera/Camera.thing.js +1 -3
- package/lib/Camera/Camera.wechat.d.ts +2 -1
- package/lib/Camera/Camera.wechat.js +2 -2
- package/lib/Checkbox/Checkbox.js +1 -3
- package/lib/Checkbox/Checkbox.thing.js +8 -9
- package/lib/Checkbox/Checkbox.wechat.js +9 -10
- package/lib/CheckboxGroup/CheckboxGroup.js +15 -19
- package/lib/CheckboxGroup/CheckboxGroup.thing.js +12 -17
- package/lib/CheckboxGroup/CheckboxGroup.wechat.js +12 -17
- package/lib/CheckboxGroup/props.d.ts +1 -1
- package/lib/CoverView/CoverView.js +1 -3
- package/lib/CoverView/CoverView.thing.js +1 -3
- package/lib/CoverView/CoverView.wechat.d.ts +2 -1
- package/lib/CoverView/CoverView.wechat.js +0 -2
- package/lib/CoverView/props.d.ts +1 -1
- package/lib/CoverView/props.js +1 -1
- package/lib/Form/Form.js +12 -12
- package/lib/Form/Form.thing.js +1 -3
- package/lib/Form/Form.wechat.js +20 -25
- package/lib/Form/props.d.ts +1 -1
- package/lib/Icon/Icon.js +7 -7
- package/lib/Icon/Icon.thing.js +7 -7
- package/lib/Icon/Icon.wechat.js +7 -7
- package/lib/Icon/iconfont/iconfont.js +13 -20
- package/lib/Icon/props.d.ts +1 -1
- package/lib/Icon/props.js +1 -1
- package/lib/Iframe/Iframe.d.ts +2 -1
- package/lib/Iframe/Iframe.js +3 -3
- package/lib/Iframe/Iframe.thing.js +1 -3
- package/lib/Iframe/Iframe.wechat.d.ts +2 -1
- package/lib/Iframe/Iframe.wechat.js +3 -3
- package/lib/Image/Image.js +6 -8
- package/lib/Image/Image.thing.js +8 -10
- package/lib/Image/Image.wechat.js +26 -32
- package/lib/Input/Input.js +29 -26
- package/lib/Input/Input.thing.js +36 -36
- package/lib/Input/Input.wechat.js +47 -47
- package/lib/Input/props.d.ts +11 -21
- package/lib/Input/props.js +1 -3
- package/lib/IpcPlayer/IpcPlayer.d.ts +2 -1
- package/lib/IpcPlayer/IpcPlayer.js +3 -3
- package/lib/IpcPlayer/IpcPlayer.thing.js +1 -3
- package/lib/IpcPlayer/IpcPlayer.wechat.d.ts +2 -1
- package/lib/IpcPlayer/IpcPlayer.wechat.js +2 -2
- package/lib/Label/Label.js +7 -8
- package/lib/Label/Label.thing.js +8 -8
- package/lib/Label/Label.wechat.js +8 -8
- package/lib/Map/Map.js +1 -3
- package/lib/Map/Map.thing.js +1 -3
- package/lib/Map/Map.wechat.js +1 -3
- package/lib/Modal/index.js +4 -2
- package/lib/Modal/index.web.js +6 -4
- package/lib/MovableArea/MovableArea.js +5 -4
- package/lib/MovableArea/MovableArea.thing.js +1 -3
- package/lib/MovableArea/MovableArea.wechat.js +1 -3
- package/lib/MovableView/MovableView.js +12 -11
- package/lib/MovableView/MovableView.thing.js +1 -3
- package/lib/MovableView/MovableView.wechat.js +1 -3
- package/lib/NativeVideo/NativeVideo.d.ts +2 -1
- package/lib/NativeVideo/NativeVideo.js +3 -3
- package/lib/NativeVideo/NativeVideo.thing.js +1 -3
- package/lib/NativeVideo/NativeVideo.wechat.d.ts +2 -1
- package/lib/NativeVideo/NativeVideo.wechat.js +2 -2
- package/lib/PageContainer/PageContainer.js +12 -19
- package/lib/PageContainer/PageContainer.thing.d.ts +2 -1
- package/lib/PageContainer/PageContainer.thing.js +0 -2
- package/lib/PageContainer/PageContainer.wechat.d.ts +2 -1
- package/lib/PageContainer/PageContainer.wechat.js +0 -2
- package/lib/PageContainer/props.d.ts +2 -2
- package/lib/PageContainer/props.js +3 -3
- package/lib/Picker/Picker.js +23 -31
- package/lib/Picker/Picker.thing.js +26 -31
- package/lib/Picker/Picker.wechat.js +26 -31
- package/lib/PickerView/PickerView.js +23 -34
- package/lib/PickerView/PickerView.thing.js +16 -19
- package/lib/PickerView/PickerView.wechat.js +16 -19
- package/lib/PickerViewColumn/PickerViewColumn.js +4 -4
- package/lib/PickerViewColumn/PickerViewColumn.thing.js +6 -7
- package/lib/PickerViewColumn/PickerViewColumn.wechat.js +6 -7
- package/lib/Progress/Progress.js +1 -3
- package/lib/Progress/Progress.thing.js +6 -7
- package/lib/Progress/Progress.wechat.js +6 -7
- package/lib/Radio/Radio.js +1 -3
- package/lib/Radio/Radio.thing.js +8 -9
- package/lib/Radio/Radio.wechat.js +9 -10
- package/lib/RadioGroup/RadioGroup.js +12 -18
- package/lib/RadioGroup/RadioGroup.thing.js +15 -21
- package/lib/RadioGroup/RadioGroup.wechat.js +12 -17
- package/lib/RadioGroup/props.d.ts +1 -1
- package/lib/RichText/RichText.js +1 -1
- package/lib/RichText/RichText.thing.js +1 -3
- package/lib/RichText/RichText.wechat.js +1 -3
- package/lib/ScrollView/ScrollView.js +12 -13
- package/lib/ScrollView/ScrollView.thing.js +6 -7
- package/lib/ScrollView/ScrollView.wechat.js +6 -7
- package/lib/Slider/Slider.js +4 -8
- package/lib/Slider/Slider.thing.js +13 -14
- package/lib/Slider/Slider.wechat.js +14 -15
- package/lib/Slider/props.js +1 -1
- package/lib/Swiper/Swiper.d.ts +1 -1
- package/lib/Swiper/Swiper.js +24 -33
- package/lib/Swiper/Swiper.thing.d.ts +1 -1
- package/lib/Swiper/Swiper.thing.js +18 -24
- package/lib/Swiper/Swiper.wechat.d.ts +1 -1
- package/lib/Swiper/Swiper.wechat.js +18 -24
- package/lib/Swiper/props.d.ts +1 -1
- package/lib/Swiper/props.js +2 -2
- package/lib/SwiperItem/SwiperItem.js +4 -4
- package/lib/SwiperItem/SwiperItem.thing.js +8 -9
- package/lib/SwiperItem/SwiperItem.wechat.js +8 -9
- package/lib/Switch/Switch.js +5 -8
- package/lib/Switch/Switch.thing.js +12 -14
- package/lib/Switch/Switch.wechat.js +12 -14
- package/lib/Switch/props.js +1 -1
- package/lib/Text/Text.js +1 -3
- package/lib/Text/Text.thing.js +1 -3
- package/lib/Text/Text.wechat.js +20 -25
- package/lib/Textarea/Textarea.js +13 -24
- package/lib/Textarea/Textarea.thing.js +26 -30
- package/lib/Textarea/Textarea.wechat.js +26 -30
- package/lib/Textarea/props.d.ts +4 -10
- package/lib/View/View.js +29 -32
- package/lib/View/View.thing.js +34 -35
- package/lib/View/View.wechat.js +34 -35
- package/lib/View/props.js +1 -1
- package/lib/WebView/WebView.js +1 -3
- package/lib/WebView/WebView.thing.js +1 -3
- package/lib/WebView/WebView.wechat.js +1 -3
- package/lib/assets/icons.js +1 -1
- package/lib/core/index.js +4 -11
- package/lib/types/event.d.ts +1 -1
- package/lib/types/index.js +1 -0
- package/lib/utils/handleProps.js +26 -40
- package/package.json +25 -25
- package/LICENSE.md +0 -9
- package/lib/Modal/index.web.d.ts +0 -2
package/lib/View/View.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
|
-
|
3
|
+
const _excluded = ["id", "className", "style", "children", "hoverClassName", "hoverStartTime", "hoverStayTime", "hoverable", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
5
5
|
import * as React from 'react';
|
6
6
|
import clsx from 'clsx';
|
7
7
|
import PropTypes from 'prop-types';
|
@@ -9,38 +9,35 @@ import handleProps from '../utils/handleProps';
|
|
9
9
|
import { filterProps, inlineStyle, useTouch } from '@ray-js/framework-shared';
|
10
10
|
import { defaultViewProps } from './props';
|
11
11
|
import styles from './index.module.less';
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
12
|
+
const View = /*#__PURE__*/React.forwardRef((props, ref) => {
|
13
|
+
const {
|
14
|
+
id,
|
15
|
+
className,
|
16
|
+
style,
|
17
|
+
children,
|
18
|
+
hoverClassName,
|
19
|
+
hoverStartTime,
|
20
|
+
hoverStayTime,
|
21
|
+
hoverable,
|
22
|
+
onClick,
|
23
|
+
onLongClick,
|
24
|
+
onTouchCancel,
|
25
|
+
onTouchEnd,
|
26
|
+
onTouchMove,
|
27
|
+
onTouchStart,
|
28
|
+
onTransitionEnd
|
29
|
+
} = props,
|
30
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
31
|
+
const [touching, handlers] = useTouch({
|
31
32
|
hoverDelay: hoverStartTime,
|
32
33
|
hoverDuration: hoverStayTime,
|
33
|
-
onLongClick
|
34
|
-
onTouchStart
|
35
|
-
onTouchMove
|
36
|
-
onTouchEnd
|
37
|
-
onTouchCancel
|
38
|
-
onClick
|
39
|
-
})
|
40
|
-
_useTouch2 = _slicedToArray(_useTouch, 2),
|
41
|
-
touching = _useTouch2[0],
|
42
|
-
handlers = _useTouch2[1];
|
43
|
-
|
34
|
+
onLongClick,
|
35
|
+
onTouchStart,
|
36
|
+
onTouchMove,
|
37
|
+
onTouchEnd,
|
38
|
+
onTouchCancel,
|
39
|
+
onClick
|
40
|
+
});
|
44
41
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("v-view", _extends({}, handleProps(props), {
|
45
42
|
ref: ref,
|
46
43
|
id: id,
|
package/lib/View/View.thing.js
CHANGED
@@ -1,53 +1,52 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
|
-
|
3
|
+
const _excluded = ["id", "className", "style", "hoverClassName", "hoverStartTime", "hoverStayTime", "children", "onLongClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "hoverable", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
6
5
|
import * as React from 'react';
|
7
6
|
import clsx from 'clsx';
|
8
7
|
import PropTypes from 'prop-types';
|
9
8
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
10
9
|
import { View as RemaxView } from '@ray-js/adapter';
|
11
10
|
import styles from './index.module.less';
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
11
|
+
const View = /*#__PURE__*/React.forwardRef((props, ref) => {
|
12
|
+
const {
|
13
|
+
id,
|
14
|
+
className,
|
15
|
+
style,
|
16
|
+
hoverClassName,
|
17
|
+
hoverStartTime,
|
18
|
+
hoverStayTime,
|
19
|
+
children,
|
20
|
+
onLongClick,
|
21
|
+
onTouchStart,
|
22
|
+
onTouchMove,
|
23
|
+
onTouchEnd,
|
24
|
+
onTouchCancel,
|
25
|
+
onClick,
|
26
|
+
hoverable,
|
27
|
+
onTransitionEnd
|
28
|
+
} = props,
|
29
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
30
|
+
const [touching, handlers] = useTouch({
|
31
31
|
hoverDelay: hoverStartTime,
|
32
32
|
hoverDuration: hoverStayTime,
|
33
|
-
onLongClick
|
34
|
-
onTouchStart
|
35
|
-
onTouchMove
|
36
|
-
onTouchEnd
|
37
|
-
onTouchCancel
|
38
|
-
onClick
|
39
|
-
})
|
40
|
-
|
41
|
-
|
42
|
-
handlers = _useTouch2[1];
|
43
|
-
|
44
|
-
return /*#__PURE__*/React.createElement(RemaxView // @ts-ignore
|
33
|
+
onLongClick,
|
34
|
+
onTouchStart,
|
35
|
+
onTouchMove,
|
36
|
+
onTouchEnd,
|
37
|
+
onTouchCancel,
|
38
|
+
onClick
|
39
|
+
});
|
40
|
+
return /*#__PURE__*/React.createElement(RemaxView
|
41
|
+
// @ts-ignore
|
45
42
|
, _extends({
|
46
43
|
ref: ref,
|
47
44
|
id: id,
|
48
45
|
className: className,
|
49
46
|
style: inlineStyle(style),
|
50
|
-
hoverClassName: clsx(
|
47
|
+
hoverClassName: clsx({
|
48
|
+
[styles.hover]: hoverable
|
49
|
+
}, hoverClassName),
|
51
50
|
hoverStartTime: hoverStartTime,
|
52
51
|
hoverStayTime: hoverStayTime,
|
53
52
|
onTransitionEnd: onTransitionEnd
|
package/lib/View/View.wechat.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
3
|
-
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
|
-
|
3
|
+
const _excluded = ["id", "className", "style", "hoverClassName", "hoverStartTime", "hoverStayTime", "children", "onLongClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "hoverable", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
6
5
|
import * as React from 'react';
|
7
6
|
import clsx from 'clsx';
|
8
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
@@ -10,45 +9,45 @@ import { View as RemaxView } from '@ray-core/wechat';
|
|
10
9
|
import PropTypes from 'prop-types';
|
11
10
|
import { defaultViewProps } from './props';
|
12
11
|
import styles from './index.module.less';
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
12
|
+
const View = /*#__PURE__*/React.forwardRef((props, ref) => {
|
13
|
+
const {
|
14
|
+
id,
|
15
|
+
className,
|
16
|
+
style,
|
17
|
+
hoverClassName,
|
18
|
+
hoverStartTime,
|
19
|
+
hoverStayTime,
|
20
|
+
children,
|
21
|
+
onLongClick,
|
22
|
+
onTouchStart,
|
23
|
+
onTouchMove,
|
24
|
+
onTouchEnd,
|
25
|
+
onTouchCancel,
|
26
|
+
onClick,
|
27
|
+
hoverable,
|
28
|
+
onTransitionEnd
|
29
|
+
} = props,
|
30
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
31
|
+
const [touching, handlers] = useTouch({
|
32
32
|
hoverDelay: hoverStartTime,
|
33
33
|
hoverDuration: hoverStayTime,
|
34
|
-
onLongClick
|
35
|
-
onTouchStart
|
36
|
-
onTouchMove
|
37
|
-
onTouchEnd
|
38
|
-
onTouchCancel
|
39
|
-
onClick
|
40
|
-
})
|
41
|
-
|
42
|
-
|
43
|
-
handlers = _useTouch2[1];
|
44
|
-
|
45
|
-
return /*#__PURE__*/React.createElement(RemaxView // @ts-ignore
|
34
|
+
onLongClick,
|
35
|
+
onTouchStart,
|
36
|
+
onTouchMove,
|
37
|
+
onTouchEnd,
|
38
|
+
onTouchCancel,
|
39
|
+
onClick
|
40
|
+
});
|
41
|
+
return /*#__PURE__*/React.createElement(RemaxView
|
42
|
+
// @ts-ignore
|
46
43
|
, _extends({
|
47
44
|
ref: ref,
|
48
45
|
id: id,
|
49
46
|
className: className,
|
50
47
|
style: inlineStyle(style),
|
51
|
-
hoverClassName: clsx(
|
48
|
+
hoverClassName: clsx({
|
49
|
+
[styles.hover]: hoverable
|
50
|
+
}, hoverClassName),
|
52
51
|
hoverStartTime: hoverStartTime,
|
53
52
|
hoverStayTime: hoverStayTime,
|
54
53
|
onTransitionEnd: onTransitionEnd
|
package/lib/View/props.js
CHANGED
package/lib/WebView/WebView.js
CHANGED
package/lib/assets/icons.js
CHANGED
package/lib/core/index.js
CHANGED
@@ -1,23 +1,16 @@
|
|
1
|
-
import "core-js/modules/es.object.to-string.js";
|
2
|
-
import "core-js/modules/es.regexp.to-string.js";
|
3
|
-
import "core-js/modules/es.promise.js";
|
4
|
-
import "core-js/modules/web.dom-collections.for-each.js";
|
5
|
-
import "core-js/modules/es.object.keys.js";
|
6
1
|
export function generateId() {
|
7
2
|
return "V".concat(Math.random().toString(32).substr(2, 6).toUpperCase());
|
8
3
|
}
|
9
4
|
export function nextFrame(duration) {
|
10
|
-
return new Promise(
|
11
|
-
return setTimeout(resolve, duration !== null && duration !== void 0 ? duration : 1000 / 30);
|
12
|
-
});
|
5
|
+
return new Promise(resolve => setTimeout(resolve, duration !== null && duration !== void 0 ? duration : 1000 / 30));
|
13
6
|
}
|
7
|
+
|
14
8
|
/**
|
15
9
|
* props 的 alias 替换
|
16
10
|
*/
|
17
|
-
|
18
11
|
export function propsAlias(props, alias) {
|
19
|
-
Object.keys(alias).forEach(
|
20
|
-
|
12
|
+
Object.keys(alias).forEach(key => {
|
13
|
+
const targetName = alias[key];
|
21
14
|
props[targetName] = props[key];
|
22
15
|
delete props[key];
|
23
16
|
});
|
package/lib/types/event.d.ts
CHANGED
package/lib/types/index.js
CHANGED
package/lib/utils/handleProps.js
CHANGED
@@ -1,63 +1,50 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
-
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
|
-
|
5
|
-
|
6
|
-
import "core-js/modules/es.array.map.js";
|
7
|
-
import "core-js/modules/es.object.entries.js";
|
8
|
-
import "core-js/modules/es.array.concat.js";
|
9
|
-
import "core-js/modules/es.json.stringify.js";
|
3
|
+
const _excluded = ["className", "hoverClassName", "hoverStyle", "refresherDefaultStyle", "overlayStyle", "customStyle", "indicatorStyle", "maskStyle", "placeholderStyle", "borderStyle", "style", "children"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
10
5
|
import { inlineStyle } from '@ray-js/framework-shared';
|
11
6
|
import { paramCase } from 'param-case';
|
12
7
|
import s2o from 'style-to-object';
|
13
|
-
|
14
|
-
|
15
|
-
var tempStyle;
|
16
|
-
|
8
|
+
const transformStyle = originStyle => {
|
9
|
+
let tempStyle;
|
17
10
|
if (typeof originStyle === 'string') {
|
18
11
|
tempStyle = s2o(originStyle);
|
19
12
|
} else {
|
20
13
|
tempStyle = originStyle;
|
21
14
|
}
|
22
|
-
|
23
|
-
|
24
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
25
|
-
k = _ref2[0],
|
26
|
-
v = _ref2[1];
|
27
|
-
|
15
|
+
return Object.entries(inlineStyle(tempStyle)).map(_ref => {
|
16
|
+
let [k, v] = _ref;
|
28
17
|
return "".concat(k, ":").concat(v);
|
29
18
|
}).join(';');
|
30
19
|
};
|
20
|
+
|
31
21
|
/**
|
32
22
|
* 处理 web 端 props
|
33
23
|
*/
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
for (var key in tempProps) {
|
24
|
+
const handleProps = props => {
|
25
|
+
const {
|
26
|
+
className,
|
27
|
+
hoverClassName,
|
28
|
+
hoverStyle,
|
29
|
+
refresherDefaultStyle,
|
30
|
+
overlayStyle,
|
31
|
+
customStyle,
|
32
|
+
indicatorStyle,
|
33
|
+
maskStyle,
|
34
|
+
placeholderStyle,
|
35
|
+
borderStyle,
|
36
|
+
style,
|
37
|
+
children
|
38
|
+
} = props,
|
39
|
+
tempProps = _objectWithoutProperties(props, _excluded);
|
40
|
+
for (const key in tempProps) {
|
52
41
|
if (tempProps[key] === false) {
|
53
42
|
delete tempProps[key];
|
54
|
-
} else if (
|
43
|
+
} else if (typeof tempProps[key] === 'object') {
|
55
44
|
tempProps[key] = JSON.stringify(tempProps[key]);
|
56
45
|
}
|
57
|
-
|
58
46
|
tempProps[paramCase(key)] = tempProps[key];
|
59
47
|
}
|
60
|
-
|
61
48
|
return _objectSpread({
|
62
49
|
class: className,
|
63
50
|
style: style && inlineStyle(style),
|
@@ -70,8 +57,7 @@ var handleProps = function (props) {
|
|
70
57
|
'mask-style': maskStyle && transformStyle(maskStyle),
|
71
58
|
'placeholder-style': placeholderStyle && transformStyle(placeholderStyle),
|
72
59
|
'border-style': borderStyle && transformStyle(borderStyle),
|
73
|
-
children
|
60
|
+
children
|
74
61
|
}, tempProps);
|
75
62
|
};
|
76
|
-
|
77
63
|
export default handleProps;
|
package/package.json
CHANGED
@@ -1,50 +1,50 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/components",
|
3
|
-
"version": "1.4.0-alpha.
|
3
|
+
"version": "1.4.0-alpha.10",
|
4
4
|
"description": "Ray basic components",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
7
7
|
],
|
8
|
+
"repository": {},
|
8
9
|
"license": "MIT",
|
9
|
-
"
|
10
|
-
|
11
|
-
|
10
|
+
"maintainers": [
|
11
|
+
{
|
12
|
+
"name": "tuyafe",
|
13
|
+
"email": "tuyafe@tuya.com"
|
14
|
+
}
|
12
15
|
],
|
13
16
|
"sideEffects": [
|
14
17
|
"*.less",
|
15
18
|
"*.css"
|
16
19
|
],
|
17
|
-
"
|
18
|
-
|
19
|
-
"
|
20
|
-
|
20
|
+
"main": "lib/index.js",
|
21
|
+
"files": [
|
22
|
+
"lib"
|
23
|
+
],
|
21
24
|
"scripts": {
|
22
|
-
"clean": "rm -rf lib",
|
23
25
|
"build": "ray build --type=component",
|
26
|
+
"clean": "rm -rf lib",
|
24
27
|
"watch": "ray start --type=component"
|
25
28
|
},
|
26
29
|
"dependencies": {
|
27
|
-
"@ray-core/macro": "^0.3.
|
28
|
-
"@ray-core/wechat": "^0.3.
|
29
|
-
"@ray-js/adapter": "^1.4.0-alpha.
|
30
|
-
"@ray-js/framework-shared": "^1.4.0-alpha.
|
31
|
-
"ahooks": "^3.7.
|
32
|
-
"clsx": "^1.
|
33
|
-
"core-js": "^3.
|
30
|
+
"@ray-core/macro": "^0.3.6",
|
31
|
+
"@ray-core/wechat": "^0.3.6",
|
32
|
+
"@ray-js/adapter": "^1.4.0-alpha.10",
|
33
|
+
"@ray-js/framework-shared": "^1.4.0-alpha.10",
|
34
|
+
"ahooks": "^3.7.8",
|
35
|
+
"clsx": "^1.2.1",
|
36
|
+
"core-js": "^3.32.1",
|
34
37
|
"hooks": "^0.3.2",
|
35
38
|
"param-case": "^3.0.4",
|
36
39
|
"react": "^17.0.2",
|
37
40
|
"style-to-object": "^0.3.0"
|
38
41
|
},
|
39
42
|
"devDependencies": {
|
40
|
-
"@ray-js/cli": "^1.4.0-alpha.
|
43
|
+
"@ray-js/cli": "^1.4.0-alpha.10"
|
41
44
|
},
|
42
|
-
"
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
],
|
48
|
-
"gitHead": "92a9834964bb74c3a3b0553438b0f0c7a77ad8d0",
|
49
|
-
"repository": {}
|
45
|
+
"publishConfig": {
|
46
|
+
"access": "public",
|
47
|
+
"registry": "https://registry.npmjs.org"
|
48
|
+
},
|
49
|
+
"gitHead": "14cb935df10f020e714b44bb41d4899646db751c"
|
50
50
|
}
|
package/LICENSE.md
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Copyright © 2014-2022 Tuya.inc
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
|
-
|
7
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
|
-
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/lib/Modal/index.web.d.ts
DELETED