@ray-js/components 1.4.0-alpha.3 → 1.4.0-alpha.4

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.
Files changed (118) hide show
  1. package/lib/Button/Button.js +1 -3
  2. package/lib/Button/Button.thing.js +15 -17
  3. package/lib/Button/Button.wechat.js +15 -17
  4. package/lib/Button/props.js +1 -1
  5. package/lib/Camera/Camera.js +3 -3
  6. package/lib/Camera/Camera.thing.js +1 -3
  7. package/lib/Camera/Camera.wechat.js +2 -2
  8. package/lib/Checkbox/Checkbox.js +1 -3
  9. package/lib/Checkbox/Checkbox.thing.js +8 -9
  10. package/lib/Checkbox/Checkbox.wechat.js +9 -10
  11. package/lib/CheckboxGroup/CheckboxGroup.js +15 -19
  12. package/lib/CheckboxGroup/CheckboxGroup.thing.js +12 -17
  13. package/lib/CheckboxGroup/CheckboxGroup.wechat.js +12 -17
  14. package/lib/CoverView/CoverView.js +1 -3
  15. package/lib/CoverView/CoverView.thing.js +1 -3
  16. package/lib/CoverView/CoverView.wechat.js +0 -2
  17. package/lib/CoverView/props.js +1 -1
  18. package/lib/Form/Form.js +12 -12
  19. package/lib/Form/Form.thing.js +1 -3
  20. package/lib/Form/Form.wechat.js +20 -25
  21. package/lib/Icon/Icon.js +7 -7
  22. package/lib/Icon/Icon.thing.js +7 -7
  23. package/lib/Icon/Icon.wechat.js +7 -7
  24. package/lib/Icon/iconfont/iconfont.js +13 -20
  25. package/lib/Icon/props.js +1 -1
  26. package/lib/Iframe/Iframe.js +3 -3
  27. package/lib/Iframe/Iframe.thing.js +1 -3
  28. package/lib/Iframe/Iframe.wechat.js +3 -3
  29. package/lib/Image/Image.js +6 -8
  30. package/lib/Image/Image.thing.js +8 -10
  31. package/lib/Image/Image.wechat.js +26 -32
  32. package/lib/Input/Input.js +29 -26
  33. package/lib/Input/Input.thing.js +36 -36
  34. package/lib/Input/Input.wechat.js +47 -47
  35. package/lib/Input/props.d.ts +6 -24
  36. package/lib/Input/props.js +1 -3
  37. package/lib/IpcPlayer/IpcPlayer.js +3 -3
  38. package/lib/IpcPlayer/IpcPlayer.thing.js +1 -3
  39. package/lib/IpcPlayer/IpcPlayer.wechat.js +2 -2
  40. package/lib/Label/Label.js +7 -8
  41. package/lib/Label/Label.thing.js +8 -8
  42. package/lib/Label/Label.wechat.js +8 -8
  43. package/lib/Map/Map.js +1 -3
  44. package/lib/Map/Map.thing.js +1 -3
  45. package/lib/Map/Map.wechat.js +1 -3
  46. package/lib/Modal/index.js +4 -2
  47. package/lib/Modal/index.web.js +6 -4
  48. package/lib/MovableArea/MovableArea.js +5 -4
  49. package/lib/MovableArea/MovableArea.thing.js +1 -3
  50. package/lib/MovableArea/MovableArea.wechat.js +1 -3
  51. package/lib/MovableView/MovableView.js +12 -11
  52. package/lib/MovableView/MovableView.thing.js +1 -3
  53. package/lib/MovableView/MovableView.wechat.js +1 -3
  54. package/lib/NativeVideo/NativeVideo.js +3 -3
  55. package/lib/NativeVideo/NativeVideo.thing.js +1 -3
  56. package/lib/NativeVideo/NativeVideo.wechat.js +2 -2
  57. package/lib/PageContainer/PageContainer.js +12 -19
  58. package/lib/PageContainer/PageContainer.thing.js +0 -2
  59. package/lib/PageContainer/PageContainer.wechat.js +0 -2
  60. package/lib/PageContainer/props.js +3 -3
  61. package/lib/Picker/Picker.js +23 -31
  62. package/lib/Picker/Picker.thing.js +26 -31
  63. package/lib/Picker/Picker.wechat.js +26 -31
  64. package/lib/PickerView/PickerView.js +23 -34
  65. package/lib/PickerView/PickerView.thing.js +16 -19
  66. package/lib/PickerView/PickerView.wechat.js +16 -19
  67. package/lib/PickerViewColumn/PickerViewColumn.js +4 -4
  68. package/lib/PickerViewColumn/PickerViewColumn.thing.js +6 -7
  69. package/lib/PickerViewColumn/PickerViewColumn.wechat.js +6 -7
  70. package/lib/Progress/Progress.js +1 -3
  71. package/lib/Progress/Progress.thing.js +6 -7
  72. package/lib/Progress/Progress.wechat.js +6 -7
  73. package/lib/Radio/Radio.js +1 -3
  74. package/lib/Radio/Radio.thing.js +8 -9
  75. package/lib/Radio/Radio.wechat.js +9 -10
  76. package/lib/RadioGroup/RadioGroup.js +12 -18
  77. package/lib/RadioGroup/RadioGroup.thing.js +15 -21
  78. package/lib/RadioGroup/RadioGroup.wechat.js +12 -17
  79. package/lib/RichText/RichText.js +1 -1
  80. package/lib/RichText/RichText.thing.js +1 -3
  81. package/lib/RichText/RichText.wechat.js +1 -3
  82. package/lib/ScrollView/ScrollView.js +12 -13
  83. package/lib/ScrollView/ScrollView.thing.js +6 -7
  84. package/lib/ScrollView/ScrollView.wechat.js +6 -7
  85. package/lib/Slider/Slider.js +4 -8
  86. package/lib/Slider/Slider.thing.js +13 -14
  87. package/lib/Slider/Slider.wechat.js +14 -15
  88. package/lib/Slider/props.js +1 -1
  89. package/lib/Swiper/Swiper.js +24 -33
  90. package/lib/Swiper/Swiper.thing.js +18 -24
  91. package/lib/Swiper/Swiper.wechat.js +18 -24
  92. package/lib/Swiper/props.js +2 -2
  93. package/lib/SwiperItem/SwiperItem.js +4 -4
  94. package/lib/SwiperItem/SwiperItem.thing.js +8 -9
  95. package/lib/SwiperItem/SwiperItem.wechat.js +8 -9
  96. package/lib/Switch/Switch.js +5 -8
  97. package/lib/Switch/Switch.thing.js +12 -14
  98. package/lib/Switch/Switch.wechat.js +12 -14
  99. package/lib/Switch/props.js +1 -1
  100. package/lib/Text/Text.js +1 -3
  101. package/lib/Text/Text.thing.js +1 -3
  102. package/lib/Text/Text.wechat.js +20 -25
  103. package/lib/Textarea/Textarea.js +13 -24
  104. package/lib/Textarea/Textarea.thing.js +26 -30
  105. package/lib/Textarea/Textarea.wechat.js +26 -30
  106. package/lib/Textarea/props.d.ts +3 -9
  107. package/lib/View/View.js +29 -32
  108. package/lib/View/View.thing.js +34 -35
  109. package/lib/View/View.wechat.js +34 -35
  110. package/lib/View/props.js +1 -1
  111. package/lib/WebView/WebView.js +1 -3
  112. package/lib/WebView/WebView.thing.js +1 -3
  113. package/lib/WebView/WebView.wechat.js +1 -3
  114. package/lib/assets/icons.js +1 -1
  115. package/lib/core/index.js +4 -11
  116. package/lib/types/index.js +1 -0
  117. package/lib/utils/handleProps.js +26 -40
  118. package/package.json +5 -5
@@ -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
- var _excluded = ["style", "id", "className", "disabled", "loading", "onClick", "hoverClassName", "size", "formType"];
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
- var Button = function (props) {
10
- var style = props.style,
11
- id = props.id,
12
- className = props.className,
13
- disabled = props.disabled,
14
- loading = props.loading,
15
- onClick = props.onClick,
16
- hoverClassName = props.hoverClassName,
17
- _props$size = props.size,
18
- size = _props$size === void 0 ? 'default' : _props$size,
19
- formType = props.formType,
20
- restProps = _objectWithoutProperties(props, _excluded);
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: function handleTap(event) {
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
- var _excluded = ["style", "id", "className", "disabled", "loading", "onClick", "hoverClassName", "size", "formType"];
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
- var Button = function (props) {
12
- var style = props.style,
13
- id = props.id,
14
- className = props.className,
15
- disabled = props.disabled,
16
- loading = props.loading,
17
- onClick = props.onClick,
18
- hoverClassName = props.hoverClassName,
19
- _props$size = props.size,
20
- size = _props$size === void 0 ? 'default' : _props$size,
21
- formType = props.formType,
22
- restProps = _objectWithoutProperties(props, _excluded);
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: function handleTap(event) {
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;
@@ -1,4 +1,4 @@
1
- export var defaultButtonProps = {
1
+ export const defaultButtonProps = {
2
2
  size: 'default',
3
3
  type: 'default',
4
4
  hoverStyle: {
@@ -1,7 +1,7 @@
1
- import React from 'react'; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1
+ import React from 'react';
2
2
 
3
- var Camera = function () {
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,6 @@
1
1
  import * as React from 'react';
2
2
  import { Camera as RemaxCamera } from '@ray-js/adapter';
3
-
4
- var Camera = function (props) {
3
+ const Camera = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxCamera, props);
6
5
  };
7
-
8
6
  export default Camera;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { View } from '@ray-js/components'; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
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;
@@ -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
- var _excluded = ["className", "style", "id"];
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
- var Checkbox = function (props) {
10
- var className = props.className,
11
- style = props.style,
12
- id = props.id,
13
- restProps = _objectWithoutProperties(props, _excluded);
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
- var _excluded = ["className", "style", "id", "color"];
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
- var Checkbox = function (props) {
10
- var className = props.className,
11
- style = props.style,
12
- id = props.id,
13
- color = props.color,
14
- restProps = _objectWithoutProperties(props, _excluded);
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
- var CheckboxGroup = function (props) {
10
- var options = props.options,
11
- name = props.name,
12
- disabled = props.disabled,
13
- _props$onChange = props.onChange,
14
- onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
15
- children = props.children;
16
- var currentNode = React.useRef(null);
17
- useEventListener('clickoverlay', function (e) {
18
- var _props$onChange2;
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 || function renderOptions() {
34
- return options.map(function (item, index) {
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
- var CheckboxGroup = function (props) {
8
- var options = props.options,
9
- name = props.name,
10
- disabled = props.disabled,
11
- _props$onChange = props.onChange,
12
- onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
13
- children = props.children;
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: function handleOnChange(e) {
15
+ onChange: e => {
17
16
  !disabled && onChange(e);
18
17
  }
19
- }, function renderChildren() {
20
- return children;
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
- var CheckboxGroup = function (props) {
8
- var options = props.options,
9
- name = props.name,
10
- disabled = props.disabled,
11
- _props$onChange = props.onChange,
12
- onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
13
- children = props.children;
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: function handleOnChange(e) {
15
+ onChange: e => {
17
16
  !disabled && onChange(e);
18
17
  }
19
- }, function renderChildren() {
20
- return children;
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,7 +1,5 @@
1
1
  import React from 'react';
2
-
3
- var CoverView = function () {
2
+ const CoverView = () => {
4
3
  return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
5
4
  };
6
-
7
5
  export default CoverView;
@@ -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;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { View } from '@ray-js/components';
3
-
4
3
  function CoverView() {
5
4
  return /*#__PURE__*/React.createElement(View, null, "\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F\u7AEF\u6682\u672A\u5B9E\u73B0");
6
5
  }
7
-
8
6
  export default CoverView;
@@ -1 +1 @@
1
- export var defaultCoverViewProps = {};
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
- var _excluded = ["onSubmit", "onReset"];
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
- var Form = function (props) {
10
- var onSubmit = props.onSubmit,
11
- onReset = props.onReset,
12
- restProps = _objectWithoutProperties(props, _excluded);
13
-
14
- var currentNode = React.useRef(null);
15
- useEventListener('submit', function (e) {
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', function (e) {
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
- }); // @ts-ignore
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;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Form as RemaxForm } from '@ray-js/adapter';
3
-
4
- var Form = function (props) {
3
+ const Form = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxForm, props);
6
5
  };
7
-
8
6
  export default Form;
@@ -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
- var _excluded = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
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
- var Form = function (props) {
10
- var onClick = props.onClick,
11
- onLongClick = props.onLongClick,
12
- onTouchCancel = props.onTouchCancel,
13
- onTouchEnd = props.onTouchEnd,
14
- onTouchMove = props.onTouchMove,
15
- onTouchStart = props.onTouchStart,
16
- restProps = _objectWithoutProperties(props, _excluded);
17
-
18
- var _useTouch = useTouch({
19
- onLongClick: onLongClick,
20
- onTouchStart: onTouchStart,
21
- onTouchMove: onTouchMove,
22
- onTouchEnd: onTouchEnd,
23
- onTouchCancel: onTouchCancel,
24
- onClick: 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/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
- var Icon = function (props) {
8
- var type = props.type,
9
- size = props.size,
10
- color = props.color,
11
- style = props.style;
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;
@@ -2,12 +2,13 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
2
  import * as React from 'react';
3
3
  import { Text } from '@ray-js/components';
4
4
  import './index.less';
5
-
6
- var Icon = function (props) {
7
- var type = props.type,
8
- size = props.size,
9
- color = props.color,
10
- style = props.style;
5
+ const Icon = props => {
6
+ const {
7
+ type,
8
+ size,
9
+ color,
10
+ style
11
+ } = props;
11
12
  return /*#__PURE__*/React.createElement(Text, {
12
13
  className: "iconfont ".concat(type),
13
14
  style: _objectSpread(_objectSpread({}, style), {}, {
@@ -16,6 +17,5 @@ var Icon = function (props) {
16
17
  })
17
18
  });
18
19
  };
19
-
20
20
  Icon.displayName = 'Icon';
21
21
  export default Icon;
@@ -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
- var Icon = function (props) {
8
- var type = props.type,
9
- size = props.size,
10
- color = props.color,
11
- style = props.style;
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;