@ray-js/components 1.4.0-alpha.3 → 1.4.0-alpha.5
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/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 +10 -10
- package/LICENSE.md +0 -9
package/lib/Button/Button.js
CHANGED
@@ -1,15 +1,13 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { defaultButtonProps } from './props';
|
3
3
|
import handleProps from '../utils/handleProps';
|
4
|
-
|
5
|
-
var Button = function (props) {
|
4
|
+
const Button = props => {
|
6
5
|
return (
|
7
6
|
/*#__PURE__*/
|
8
7
|
// @ts-ignore
|
9
8
|
React.createElement("v-button", handleProps(props), props.children)
|
10
9
|
);
|
11
10
|
};
|
12
|
-
|
13
11
|
Button.defaultProps = defaultButtonProps;
|
14
12
|
Button.displayName = 'Button';
|
15
13
|
export default Button;
|
@@ -1,30 +1,29 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
|
3
|
+
const _excluded = ["style", "id", "className", "disabled", "loading", "onClick", "hoverClassName", "size", "formType"];
|
4
4
|
import * as React from 'react';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
7
|
import { Button as RemaxButton } from '@ray-js/adapter';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
id
|
12
|
-
className
|
13
|
-
disabled
|
14
|
-
loading
|
15
|
-
onClick
|
16
|
-
hoverClassName
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
8
|
+
const Button = props => {
|
9
|
+
const {
|
10
|
+
style,
|
11
|
+
id,
|
12
|
+
className,
|
13
|
+
disabled,
|
14
|
+
loading,
|
15
|
+
onClick,
|
16
|
+
hoverClassName,
|
17
|
+
size = 'default',
|
18
|
+
formType
|
19
|
+
} = props,
|
20
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
22
21
|
return /*#__PURE__*/React.createElement(RemaxButton, _extends({
|
23
22
|
id: id,
|
24
23
|
style: inlineStyle(style),
|
25
24
|
className: clsx(className),
|
26
25
|
hoverClassName: hoverClassName,
|
27
|
-
onClick:
|
26
|
+
onClick: event => {
|
28
27
|
if (disabled) return;
|
29
28
|
if (loading) return;
|
30
29
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
@@ -35,6 +34,5 @@ var Button = function (props) {
|
|
35
34
|
formType: formType
|
36
35
|
}, restProps));
|
37
36
|
};
|
38
|
-
|
39
37
|
Button.displayName = 'Button';
|
40
38
|
export default Button;
|
@@ -1,32 +1,31 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
|
3
|
+
const _excluded = ["style", "id", "className", "disabled", "loading", "onClick", "hoverClassName", "size", "formType"];
|
4
4
|
import * as React from 'react';
|
5
5
|
import clsx from 'clsx';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
7
|
import { Button as RemaxButton } from '@ray-core/wechat';
|
8
8
|
import { defaultButtonProps } from './props';
|
9
9
|
import styles from './index.module.less';
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
id
|
14
|
-
className
|
15
|
-
disabled
|
16
|
-
loading
|
17
|
-
onClick
|
18
|
-
hoverClassName
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
10
|
+
const Button = props => {
|
11
|
+
const {
|
12
|
+
style,
|
13
|
+
id,
|
14
|
+
className,
|
15
|
+
disabled,
|
16
|
+
loading,
|
17
|
+
onClick,
|
18
|
+
hoverClassName,
|
19
|
+
size = 'default',
|
20
|
+
formType
|
21
|
+
} = props,
|
22
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
24
23
|
return /*#__PURE__*/React.createElement(RemaxButton, _extends({
|
25
24
|
id: id,
|
26
25
|
style: inlineStyle(style),
|
27
26
|
className: clsx('ray-button', styles.button, className),
|
28
27
|
hoverClassName: clsx(styles['button-hover'], hoverClassName),
|
29
|
-
onClick:
|
28
|
+
onClick: event => {
|
30
29
|
if (disabled) return;
|
31
30
|
if (loading) return;
|
32
31
|
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
@@ -37,7 +36,6 @@ var Button = function (props) {
|
|
37
36
|
size: size
|
38
37
|
}, restProps));
|
39
38
|
};
|
40
|
-
|
41
39
|
Button.defaultProps = defaultButtonProps;
|
42
40
|
Button.displayName = 'Button';
|
43
41
|
export default Button;
|
package/lib/Button/props.js
CHANGED
package/lib/Camera/Camera.d.ts
CHANGED
package/lib/Camera/Camera.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import React from 'react';
|
1
|
+
import React from 'react';
|
2
2
|
|
3
|
-
|
3
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
|
+
const Camera = () => {
|
4
5
|
return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
|
5
6
|
};
|
6
|
-
|
7
7
|
export default Camera;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { View } from '@ray-js/components';
|
2
|
+
import { View } from '@ray-js/components';
|
3
3
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
5
|
function Camera() {
|
5
6
|
return /*#__PURE__*/React.createElement(View, null, "\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u7AEF\u6682\u672A\u5B9E\u73B0");
|
6
7
|
}
|
7
|
-
|
8
8
|
export default Camera;
|
package/lib/Checkbox/Checkbox.js
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import handleProps from '../utils/handleProps';
|
3
|
-
|
4
|
-
var Checkbox = function (props) {
|
3
|
+
const Checkbox = props => {
|
5
4
|
// @ts-ignore
|
6
5
|
return /*#__PURE__*/React.createElement("v-checkbox", handleProps(props));
|
7
6
|
};
|
8
|
-
|
9
7
|
Checkbox.displayName = 'Checkbox';
|
10
8
|
export default Checkbox;
|
@@ -1,22 +1,21 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
|
3
|
+
const _excluded = ["className", "style", "id"];
|
4
4
|
import clsx from 'clsx';
|
5
5
|
import * as React from 'react';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
7
|
import { Checkbox as RemaxCheckbox } from '@ray-js/adapter';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
style
|
12
|
-
id
|
13
|
-
|
14
|
-
|
8
|
+
const Checkbox = props => {
|
9
|
+
const {
|
10
|
+
className,
|
11
|
+
style,
|
12
|
+
id
|
13
|
+
} = props,
|
14
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
15
15
|
return /*#__PURE__*/React.createElement(RemaxCheckbox, _extends({
|
16
16
|
id: id,
|
17
17
|
style: inlineStyle(style),
|
18
18
|
className: clsx('ray-checkbox', className)
|
19
19
|
}, restProps));
|
20
20
|
};
|
21
|
-
|
22
21
|
export default Checkbox;
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
-
|
3
|
+
const _excluded = ["className", "style", "id", "color"];
|
4
4
|
import clsx from 'clsx';
|
5
5
|
import * as React from 'react';
|
6
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
7
|
import { Checkbox as RemaxCheckbox } from '@ray-core/wechat';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
style
|
12
|
-
id
|
13
|
-
color
|
14
|
-
|
15
|
-
|
8
|
+
const Checkbox = props => {
|
9
|
+
const {
|
10
|
+
className,
|
11
|
+
style,
|
12
|
+
id,
|
13
|
+
color
|
14
|
+
} = props,
|
15
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
16
16
|
return /*#__PURE__*/React.createElement(RemaxCheckbox, _extends({
|
17
17
|
id: id,
|
18
18
|
style: inlineStyle(style),
|
@@ -20,5 +20,4 @@ var Checkbox = function (props) {
|
|
20
20
|
className: clsx('ray-checkbox', className)
|
21
21
|
}, restProps));
|
22
22
|
};
|
23
|
-
|
24
23
|
export default Checkbox;
|
@@ -1,23 +1,21 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
-
import "core-js/modules/es.array.map.js";
|
3
2
|
import * as React from 'react';
|
4
3
|
import handleProps from '../utils/handleProps';
|
5
4
|
import Label from '../Label';
|
6
5
|
import CheckBox from '../Checkbox';
|
7
6
|
import { useEventListener } from 'ahooks';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
useEventListener('clickoverlay',
|
18
|
-
var _props$
|
19
|
-
|
20
|
-
(_props$onChange2 = props.onChange) === null || _props$onChange2 === void 0 ? void 0 : _props$onChange2.call(props, {
|
7
|
+
const CheckboxGroup = props => {
|
8
|
+
const {
|
9
|
+
options,
|
10
|
+
name,
|
11
|
+
disabled,
|
12
|
+
onChange = () => {},
|
13
|
+
children
|
14
|
+
} = props;
|
15
|
+
const currentNode = React.useRef(null);
|
16
|
+
useEventListener('clickoverlay', e => {
|
17
|
+
var _props$onChange;
|
18
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
|
21
19
|
type: e.type,
|
22
20
|
value: e.detail.value,
|
23
21
|
origin: e
|
@@ -30,10 +28,9 @@ var CheckboxGroup = function (props) {
|
|
30
28
|
// @ts-ignore
|
31
29
|
React.createElement("v-checkbox-group", _extends({
|
32
30
|
ref: currentNode
|
33
|
-
}, handleProps(props)), children ||
|
34
|
-
return options.map(
|
31
|
+
}, handleProps(props)), children || (() => {
|
32
|
+
return options.map((item, index) => {
|
35
33
|
var _item$checked;
|
36
|
-
|
37
34
|
return /*#__PURE__*/React.createElement(Label, {
|
38
35
|
key: index + '_' + item.value
|
39
36
|
}, /*#__PURE__*/React.createElement(CheckBox, {
|
@@ -43,9 +40,8 @@ var CheckboxGroup = function (props) {
|
|
43
40
|
color: item.color
|
44
41
|
}), item.label);
|
45
42
|
});
|
46
|
-
}())
|
43
|
+
})())
|
47
44
|
);
|
48
45
|
};
|
49
|
-
|
50
46
|
CheckboxGroup.displayName = 'CheckboxGroup';
|
51
47
|
export default CheckboxGroup;
|
@@ -1,27 +1,23 @@
|
|
1
|
-
import "core-js/modules/es.array.map.js";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { CheckboxGroup as RemaxCheckboxGroup } from '@ray-js/adapter';
|
4
3
|
import Checkbox from '../Checkbox';
|
5
4
|
import Label from '../Label';
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
const CheckboxGroup = props => {
|
6
|
+
const {
|
7
|
+
options,
|
8
|
+
name,
|
9
|
+
disabled,
|
10
|
+
onChange = () => {},
|
11
|
+
children
|
12
|
+
} = props;
|
14
13
|
return /*#__PURE__*/React.createElement(RemaxCheckboxGroup, {
|
15
14
|
name: name,
|
16
|
-
onChange:
|
15
|
+
onChange: e => {
|
17
16
|
!disabled && onChange(e);
|
18
17
|
}
|
19
|
-
},
|
20
|
-
return
|
21
|
-
}() || function renderOptions() {
|
22
|
-
return options.map(function (item, index) {
|
18
|
+
}, (() => children)() || (() => {
|
19
|
+
return options.map((item, index) => {
|
23
20
|
var _item$checked;
|
24
|
-
|
25
21
|
return /*#__PURE__*/React.createElement(Label, {
|
26
22
|
key: index + '_' + item.value
|
27
23
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
@@ -31,7 +27,6 @@ var CheckboxGroup = function (props) {
|
|
31
27
|
color: item.color
|
32
28
|
}), item.label);
|
33
29
|
});
|
34
|
-
}());
|
30
|
+
})());
|
35
31
|
};
|
36
|
-
|
37
32
|
export default CheckboxGroup;
|
@@ -1,27 +1,23 @@
|
|
1
|
-
import "core-js/modules/es.array.map.js";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { CheckboxGroup as RemaxCheckboxGroup } from '@ray-core/wechat';
|
4
3
|
import Checkbox from '../Checkbox';
|
5
4
|
import Label from '../Label';
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
const CheckboxGroup = props => {
|
6
|
+
const {
|
7
|
+
options,
|
8
|
+
name,
|
9
|
+
disabled,
|
10
|
+
onChange = () => {},
|
11
|
+
children
|
12
|
+
} = props;
|
14
13
|
return /*#__PURE__*/React.createElement(RemaxCheckboxGroup, {
|
15
14
|
name: name,
|
16
|
-
onChange:
|
15
|
+
onChange: e => {
|
17
16
|
!disabled && onChange(e);
|
18
17
|
}
|
19
|
-
},
|
20
|
-
return
|
21
|
-
}() || function renderOptions() {
|
22
|
-
return options.map(function (item, index) {
|
18
|
+
}, (() => children)() || (() => {
|
19
|
+
return options.map((item, index) => {
|
23
20
|
var _item$checked;
|
24
|
-
|
25
21
|
return /*#__PURE__*/React.createElement(Label, {
|
26
22
|
key: index + '_' + item.value
|
27
23
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
@@ -31,7 +27,6 @@ var CheckboxGroup = function (props) {
|
|
31
27
|
color: item.color
|
32
28
|
}), item.label);
|
33
29
|
});
|
34
|
-
}());
|
30
|
+
})());
|
35
31
|
};
|
36
|
-
|
37
32
|
export default CheckboxGroup;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { BaseProps } from '../types';
|
2
2
|
import { CheckboxProps } from '../Checkbox/props';
|
3
|
-
export
|
3
|
+
export type CheckboxGroupOption = CheckboxProps & {
|
4
4
|
label: string;
|
5
5
|
};
|
6
6
|
export interface CheckboxGroupProps extends BaseProps {
|
@@ -1,8 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { CoverView as RemaxCoverView } from '@ray-js/adapter';
|
3
|
-
|
4
|
-
var CoverView = function (props) {
|
3
|
+
const CoverView = props => {
|
5
4
|
return /*#__PURE__*/React.createElement(RemaxCoverView, props, props.children);
|
6
5
|
};
|
7
|
-
|
8
6
|
export default CoverView;
|
package/lib/CoverView/props.d.ts
CHANGED
package/lib/CoverView/props.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export const defaultCoverViewProps = {};
|
package/lib/Form/Form.js
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
|
-
|
4
|
+
const _excluded = ["onSubmit", "onReset"];
|
5
5
|
import * as React from 'react';
|
6
6
|
import handleProps from '../utils/handleProps';
|
7
7
|
import { useEventListener } from 'ahooks';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
onReset
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
useEventListener('submit',
|
8
|
+
const Form = props => {
|
9
|
+
const {
|
10
|
+
onSubmit,
|
11
|
+
onReset
|
12
|
+
} = props,
|
13
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
14
|
+
const currentNode = React.useRef(null);
|
15
|
+
useEventListener('submit', e => {
|
16
16
|
onSubmit(_objectSpread(_objectSpread({}, e.detail || {}), {}, {
|
17
17
|
origin: e,
|
18
18
|
type: 'submit'
|
@@ -20,18 +20,18 @@ var Form = function (props) {
|
|
20
20
|
}, {
|
21
21
|
target: currentNode
|
22
22
|
});
|
23
|
-
useEventListener('reset',
|
23
|
+
useEventListener('reset', e => {
|
24
24
|
onReset(_objectSpread(_objectSpread({}, e.detail || {}), {}, {
|
25
25
|
origin: e,
|
26
26
|
type: 'reset'
|
27
27
|
}));
|
28
28
|
}, {
|
29
29
|
target: currentNode
|
30
|
-
});
|
30
|
+
});
|
31
31
|
|
32
|
+
// @ts-ignore
|
32
33
|
return /*#__PURE__*/React.createElement("v-form", _extends({
|
33
34
|
ref: currentNode
|
34
35
|
}, handleProps(restProps)));
|
35
36
|
};
|
36
|
-
|
37
37
|
export default Form;
|
package/lib/Form/Form.thing.js
CHANGED
package/lib/Form/Form.wechat.js
CHANGED
@@ -1,33 +1,28 @@
|
|
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 = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
5
5
|
import * as React from 'react';
|
6
6
|
import { Form as RemaxForm } from '@ray-core/wechat';
|
7
7
|
import { useTouch } from '@ray-js/framework-shared';
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
onLongClick
|
12
|
-
onTouchCancel
|
13
|
-
onTouchEnd
|
14
|
-
onTouchMove
|
15
|
-
onTouchStart
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
onLongClick
|
20
|
-
onTouchStart
|
21
|
-
onTouchMove
|
22
|
-
onTouchEnd
|
23
|
-
onTouchCancel
|
24
|
-
onClick
|
25
|
-
})
|
26
|
-
_useTouch2 = _slicedToArray(_useTouch, 2),
|
27
|
-
touching = _useTouch2[0],
|
28
|
-
handlers = _useTouch2[1];
|
29
|
-
|
8
|
+
const Form = props => {
|
9
|
+
const {
|
10
|
+
onClick,
|
11
|
+
onLongClick,
|
12
|
+
onTouchCancel,
|
13
|
+
onTouchEnd,
|
14
|
+
onTouchMove,
|
15
|
+
onTouchStart
|
16
|
+
} = props,
|
17
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
18
|
+
const [touching, handlers] = useTouch({
|
19
|
+
onLongClick,
|
20
|
+
onTouchStart,
|
21
|
+
onTouchMove,
|
22
|
+
onTouchEnd,
|
23
|
+
onTouchCancel,
|
24
|
+
onClick
|
25
|
+
});
|
30
26
|
return /*#__PURE__*/React.createElement(RemaxForm, _extends({}, restProps, handlers));
|
31
27
|
};
|
32
|
-
|
33
28
|
export default Form;
|
package/lib/Form/props.d.ts
CHANGED
package/lib/Icon/Icon.js
CHANGED
@@ -3,12 +3,13 @@ import * as React from 'react';
|
|
3
3
|
import { Text } from '@ray-js/components';
|
4
4
|
import { defaultIconProps } from './props';
|
5
5
|
import './index.less';
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
const Icon = props => {
|
7
|
+
const {
|
8
|
+
type,
|
9
|
+
size,
|
10
|
+
color,
|
11
|
+
style
|
12
|
+
} = props;
|
12
13
|
return /*#__PURE__*/React.createElement(Text, {
|
13
14
|
className: "iconfont ".concat(type),
|
14
15
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
@@ -17,7 +18,6 @@ var Icon = function (props) {
|
|
17
18
|
})
|
18
19
|
});
|
19
20
|
};
|
20
|
-
|
21
21
|
Icon.defaultProps = defaultIconProps;
|
22
22
|
Icon.displayName = 'Icon';
|
23
23
|
export default Icon;
|