@ray-js/components 1.3.21 → 1.3.23

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 (141) hide show
  1. package/LICENSE.md +9 -0
  2. package/lib/Button/Button.js +1 -3
  3. package/lib/Button/Button.thing.js +15 -17
  4. package/lib/Button/Button.wechat.js +15 -17
  5. package/lib/Button/props.js +1 -1
  6. package/lib/Camera/Camera.d.ts +2 -1
  7. package/lib/Camera/Camera.js +3 -3
  8. package/lib/Camera/Camera.thing.js +1 -3
  9. package/lib/Camera/Camera.wechat.d.ts +2 -1
  10. package/lib/Camera/Camera.wechat.js +2 -2
  11. package/lib/Checkbox/Checkbox.js +1 -3
  12. package/lib/Checkbox/Checkbox.thing.js +8 -9
  13. package/lib/Checkbox/Checkbox.wechat.js +9 -10
  14. package/lib/CheckboxGroup/CheckboxGroup.js +15 -19
  15. package/lib/CheckboxGroup/CheckboxGroup.thing.js +12 -17
  16. package/lib/CheckboxGroup/CheckboxGroup.wechat.js +12 -17
  17. package/lib/CheckboxGroup/props.d.ts +1 -1
  18. package/lib/CoverView/CoverView.js +1 -3
  19. package/lib/CoverView/CoverView.thing.js +1 -3
  20. package/lib/CoverView/CoverView.wechat.d.ts +2 -1
  21. package/lib/CoverView/CoverView.wechat.js +0 -2
  22. package/lib/CoverView/props.d.ts +1 -1
  23. package/lib/CoverView/props.js +1 -1
  24. package/lib/Form/Form.js +12 -12
  25. package/lib/Form/Form.thing.js +1 -3
  26. package/lib/Form/Form.wechat.js +19 -25
  27. package/lib/Form/props.d.ts +1 -1
  28. package/lib/Icon/Icon.js +10 -10
  29. package/lib/Icon/Icon.thing.js +10 -10
  30. package/lib/Icon/Icon.wechat.js +10 -10
  31. package/lib/Icon/iconfont/iconfont.js +13 -20
  32. package/lib/Icon/props.d.ts +1 -1
  33. package/lib/Icon/props.js +1 -1
  34. package/lib/Iframe/Iframe.d.ts +2 -1
  35. package/lib/Iframe/Iframe.js +3 -3
  36. package/lib/Iframe/Iframe.thing.js +1 -3
  37. package/lib/Iframe/Iframe.wechat.d.ts +2 -1
  38. package/lib/Iframe/Iframe.wechat.js +3 -3
  39. package/lib/Image/Image.js +6 -8
  40. package/lib/Image/Image.thing.js +8 -10
  41. package/lib/Image/Image.wechat.js +25 -32
  42. package/lib/Input/Input.js +28 -26
  43. package/lib/Input/Input.thing.js +35 -36
  44. package/lib/Input/Input.wechat.js +46 -47
  45. package/lib/Input/props.d.ts +1 -1
  46. package/lib/Input/props.js +1 -1
  47. package/lib/IpcPlayer/IpcPlayer.d.ts +2 -1
  48. package/lib/IpcPlayer/IpcPlayer.js +3 -3
  49. package/lib/IpcPlayer/IpcPlayer.thing.js +1 -3
  50. package/lib/IpcPlayer/IpcPlayer.wechat.d.ts +2 -1
  51. package/lib/IpcPlayer/IpcPlayer.wechat.js +2 -2
  52. package/lib/Label/Label.js +7 -8
  53. package/lib/Label/Label.thing.js +8 -8
  54. package/lib/Label/Label.wechat.js +8 -8
  55. package/lib/Map/Map.js +1 -3
  56. package/lib/Map/Map.thing.js +1 -3
  57. package/lib/Map/Map.wechat.js +1 -3
  58. package/lib/Modal/index.js +4 -2
  59. package/lib/Modal/index.web.js +6 -4
  60. package/lib/MovableArea/MovableArea.js +5 -4
  61. package/lib/MovableArea/MovableArea.thing.js +1 -3
  62. package/lib/MovableArea/MovableArea.wechat.js +1 -3
  63. package/lib/MovableView/MovableView.js +12 -11
  64. package/lib/MovableView/MovableView.thing.js +1 -3
  65. package/lib/MovableView/MovableView.wechat.js +1 -3
  66. package/lib/NativeVideo/NativeVideo.d.ts +2 -1
  67. package/lib/NativeVideo/NativeVideo.js +3 -3
  68. package/lib/NativeVideo/NativeVideo.thing.js +1 -3
  69. package/lib/NativeVideo/NativeVideo.wechat.d.ts +2 -1
  70. package/lib/NativeVideo/NativeVideo.wechat.js +2 -2
  71. package/lib/PageContainer/PageContainer.js +12 -19
  72. package/lib/PageContainer/PageContainer.thing.d.ts +2 -1
  73. package/lib/PageContainer/PageContainer.thing.js +0 -2
  74. package/lib/PageContainer/PageContainer.wechat.d.ts +2 -1
  75. package/lib/PageContainer/PageContainer.wechat.js +0 -2
  76. package/lib/PageContainer/props.d.ts +2 -2
  77. package/lib/PageContainer/props.js +3 -3
  78. package/lib/Picker/Picker.js +22 -31
  79. package/lib/Picker/Picker.thing.js +25 -31
  80. package/lib/Picker/Picker.wechat.js +25 -31
  81. package/lib/PickerView/PickerView.js +23 -34
  82. package/lib/PickerView/PickerView.thing.js +16 -19
  83. package/lib/PickerView/PickerView.wechat.js +16 -19
  84. package/lib/PickerViewColumn/PickerViewColumn.js +4 -4
  85. package/lib/PickerViewColumn/PickerViewColumn.thing.js +6 -7
  86. package/lib/PickerViewColumn/PickerViewColumn.wechat.js +6 -7
  87. package/lib/Progress/Progress.js +1 -3
  88. package/lib/Progress/Progress.thing.js +6 -7
  89. package/lib/Progress/Progress.wechat.js +6 -7
  90. package/lib/Radio/Radio.js +1 -3
  91. package/lib/Radio/Radio.thing.js +8 -9
  92. package/lib/Radio/Radio.wechat.js +9 -10
  93. package/lib/RadioGroup/RadioGroup.js +12 -18
  94. package/lib/RadioGroup/RadioGroup.thing.js +15 -21
  95. package/lib/RadioGroup/RadioGroup.wechat.js +12 -17
  96. package/lib/RadioGroup/props.d.ts +1 -1
  97. package/lib/RichText/RichText.js +1 -1
  98. package/lib/RichText/RichText.thing.js +1 -3
  99. package/lib/RichText/RichText.wechat.js +1 -3
  100. package/lib/ScrollView/ScrollView.js +12 -13
  101. package/lib/ScrollView/ScrollView.thing.js +6 -7
  102. package/lib/ScrollView/ScrollView.wechat.js +6 -7
  103. package/lib/Slider/Slider.js +4 -8
  104. package/lib/Slider/Slider.thing.js +13 -14
  105. package/lib/Slider/Slider.wechat.js +14 -15
  106. package/lib/Slider/props.js +1 -1
  107. package/lib/Swiper/Swiper.d.ts +1 -1
  108. package/lib/Swiper/Swiper.js +23 -33
  109. package/lib/Swiper/Swiper.thing.d.ts +1 -1
  110. package/lib/Swiper/Swiper.thing.js +17 -24
  111. package/lib/Swiper/Swiper.wechat.d.ts +1 -1
  112. package/lib/Swiper/Swiper.wechat.js +17 -24
  113. package/lib/Swiper/props.d.ts +1 -1
  114. package/lib/Swiper/props.js +2 -2
  115. package/lib/SwiperItem/SwiperItem.js +4 -4
  116. package/lib/SwiperItem/SwiperItem.thing.js +8 -9
  117. package/lib/SwiperItem/SwiperItem.wechat.js +8 -9
  118. package/lib/Switch/Switch.js +5 -8
  119. package/lib/Switch/Switch.thing.js +12 -14
  120. package/lib/Switch/Switch.wechat.js +12 -14
  121. package/lib/Switch/props.js +1 -1
  122. package/lib/Text/Text.js +1 -3
  123. package/lib/Text/Text.thing.js +1 -3
  124. package/lib/Text/Text.wechat.js +19 -25
  125. package/lib/Textarea/Textarea.js +13 -14
  126. package/lib/Textarea/Textarea.thing.js +25 -22
  127. package/lib/Textarea/Textarea.wechat.js +25 -22
  128. package/lib/Textarea/props.d.ts +1 -1
  129. package/lib/View/View.js +28 -32
  130. package/lib/View/View.thing.js +33 -35
  131. package/lib/View/View.wechat.js +33 -35
  132. package/lib/View/props.js +1 -1
  133. package/lib/WebView/WebView.js +1 -3
  134. package/lib/WebView/WebView.thing.js +1 -3
  135. package/lib/WebView/WebView.wechat.js +1 -3
  136. package/lib/assets/icons.js +1 -1
  137. package/lib/core/index.js +5 -12
  138. package/lib/types/event.d.ts +1 -1
  139. package/lib/types/index.js +1 -0
  140. package/lib/utils/handleProps.js +26 -41
  141. package/package.json +7 -7
@@ -1,17 +1,16 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["htmlFor"];
3
+ const _excluded = ["htmlFor"];
4
4
  import * as React from 'react';
5
5
  import handleProps from '../utils/handleProps';
6
-
7
- var Label = function (props) {
8
- var htmlFor = props.htmlFor,
9
- restProps = _objectWithoutProperties(props, _excluded); // @ts-ignore
10
-
11
-
6
+ const Label = props => {
7
+ const {
8
+ htmlFor
9
+ } = props,
10
+ restProps = _objectWithoutProperties(props, _excluded);
11
+ // @ts-ignore
12
12
  return /*#__PURE__*/React.createElement("v-label", _extends({
13
13
  for: htmlFor
14
14
  }, handleProps(restProps)));
15
15
  };
16
-
17
16
  export default Label;
@@ -3,13 +3,14 @@ import clsx from 'clsx';
3
3
  import { inlineStyle } from '@ray-js/framework-shared';
4
4
  import { Label as RemaxLabel } from '@ray-js/adapter';
5
5
  import styles from './index.module.less';
6
-
7
- var Label = function (props) {
8
- var id = props.id,
9
- style = props.style,
10
- className = props.className,
11
- htmlFor = props.htmlFor,
12
- children = props.children;
6
+ const Label = props => {
7
+ const {
8
+ id,
9
+ style,
10
+ className,
11
+ htmlFor,
12
+ children
13
+ } = props;
13
14
  return /*#__PURE__*/React.createElement(RemaxLabel, {
14
15
  for: htmlFor,
15
16
  id: id,
@@ -17,5 +18,4 @@ var Label = function (props) {
17
18
  className: clsx('ray-label', styles.label, className)
18
19
  }, children);
19
20
  };
20
-
21
21
  export default Label;
@@ -3,13 +3,14 @@ import clsx from 'clsx';
3
3
  import { inlineStyle } from '@ray-js/framework-shared';
4
4
  import { Label as RemaxLabel } from '@ray-core/wechat';
5
5
  import styles from './index.module.less';
6
-
7
- var Label = function (props) {
8
- var id = props.id,
9
- style = props.style,
10
- className = props.className,
11
- htmlFor = props.htmlFor,
12
- children = props.children;
6
+ const Label = props => {
7
+ const {
8
+ id,
9
+ style,
10
+ className,
11
+ htmlFor,
12
+ children
13
+ } = props;
13
14
  return /*#__PURE__*/React.createElement(RemaxLabel, {
14
15
  for: htmlFor,
15
16
  id: id,
@@ -17,5 +18,4 @@ var Label = function (props) {
17
18
  className: clsx('ray-label', styles.label, className)
18
19
  }, children);
19
20
  };
20
-
21
21
  export default Label;
package/lib/Map/Map.js CHANGED
@@ -1,7 +1,5 @@
1
1
  import * as React from 'react';
2
-
3
- var Map = function () {
2
+ const Map = () => {
4
3
  return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
5
4
  };
6
-
7
5
  export default Map;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Map as RemaxMap } from '@ray-js/adapter';
3
-
4
- var Map = function (props) {
3
+ const Map = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMap, props);
6
5
  };
7
-
8
6
  export default Map;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Map as RemaxMap } from '@ray-js/adapter';
3
-
4
- var Map = function (props) {
3
+ const Map = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMap, props);
6
5
  };
7
-
8
6
  export default Map;
@@ -1,6 +1,8 @@
1
1
  import { usePageInstance, createPortal } from '@ray-js/runtime';
2
2
  export default function Modal(_ref) {
3
- var children = _ref.children;
4
- var inst = usePageInstance();
3
+ let {
4
+ children
5
+ } = _ref;
6
+ const inst = usePageInstance();
5
7
  return createPortal(children, inst.modalContainer);
6
8
  }
@@ -1,11 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
3
  export default function Modal(_ref) {
4
- var children = _ref.children;
5
- var domNode = React.useRef(document.createElement('div'));
6
- React.useEffect(function () {
4
+ let {
5
+ children
6
+ } = _ref;
7
+ const domNode = React.useRef(document.createElement('div'));
8
+ React.useEffect(() => {
7
9
  document.body.appendChild(domNode.current);
8
- return function () {
10
+ return () => {
9
11
  document.body.removeChild(domNode.current);
10
12
  };
11
13
  }, []);
@@ -1,10 +1,11 @@
1
- import "core-js/modules/es.object.assign.js";
1
+ import _objectDestructuringEmpty from "@babel/runtime/helpers/esm/objectDestructuringEmpty";
2
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
3
  import React from 'react';
3
4
  import handleProps from '../utils/handleProps';
4
5
  import { MovableArea as RemaxMovableArea } from '@ray-js/adapter';
5
- export var MovableArea = function (props) {
6
- var restProps = Object.assign({}, props); // @ts-ignore
7
-
6
+ export const MovableArea = props => {
7
+ const restProps = _extends({}, (_objectDestructuringEmpty(props), props));
8
+ // @ts-ignore
8
9
  return /*#__PURE__*/React.createElement("v-movable-area", handleProps(restProps));
9
10
  };
10
11
  MovableArea.defaultProps = RemaxMovableArea.defaultProps;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MovableArea as RemaxMovableArea } from '@ray-js/adapter';
3
-
4
- var MovableArea = function (props) {
3
+ const MovableArea = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMovableArea, props);
6
5
  };
7
-
8
6
  export default MovableArea;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MovableArea as RemaxMovableArea } from '@ray-js/adapter';
3
-
4
- var MovableArea = function (props) {
3
+ const MovableArea = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMovableArea, props);
6
5
  };
7
-
8
6
  export default MovableArea;
@@ -1,18 +1,19 @@
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 = ["onChange", "onScale"];
4
+ const _excluded = ["onChange", "onScale"];
5
5
  import React from 'react';
6
6
  import { useEventListener } from 'ahooks';
7
7
  import handleProps from '../utils/handleProps';
8
8
  import { MovableView as RemaxMovableView } from '@ray-js/adapter';
9
- export var MovableView = function (props) {
10
- var onChange = props.onChange,
11
- onScale = props.onScale,
12
- restProps = _objectWithoutProperties(props, _excluded);
13
-
14
- var currentNode = React.useRef(null);
15
- useEventListener('change', function (e) {
9
+ export const MovableView = props => {
10
+ const {
11
+ onChange,
12
+ onScale
13
+ } = props,
14
+ restProps = _objectWithoutProperties(props, _excluded);
15
+ const currentNode = React.useRef(null);
16
+ useEventListener('change', e => {
16
17
  onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({
17
18
  type: 'change'
18
19
  }, e.detail), {}, {
@@ -21,7 +22,7 @@ export var MovableView = function (props) {
21
22
  }, {
22
23
  target: currentNode
23
24
  });
24
- useEventListener('scale', function (e) {
25
+ useEventListener('scale', e => {
25
26
  onScale === null || onScale === void 0 ? void 0 : onScale(_objectSpread(_objectSpread({
26
27
  type: 'scale'
27
28
  }, e.detail), {}, {
@@ -29,8 +30,8 @@ export var MovableView = function (props) {
29
30
  }));
30
31
  }, {
31
32
  target: currentNode
32
- }); // @ts-ignore
33
-
33
+ });
34
+ // @ts-ignore
34
35
  return /*#__PURE__*/React.createElement("v-movable-view", _extends({
35
36
  ref: currentNode
36
37
  }, handleProps(restProps)));
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MovableView as RemaxMovableView } from '@ray-js/adapter';
3
-
4
- var MovableView = function (props) {
3
+ const MovableView = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMovableView, props);
6
5
  };
7
-
8
6
  export default MovableView;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MovableView as RemaxMovableView } from '@ray-js/adapter';
3
-
4
- var MovableView = function (props) {
3
+ const MovableView = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxMovableView, props);
6
5
  };
7
-
8
6
  export default MovableView;
@@ -1,2 +1,3 @@
1
- declare const NativeVideo: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const NativeVideo: () => React.JSX.Element;
2
3
  export default NativeVideo;
@@ -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 NativeVideo = function () {
3
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
4
+ const NativeVideo = () => {
4
5
  return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
5
6
  };
6
-
7
7
  export default NativeVideo;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { NativeVideo as RemaxNativeVideo } from '@ray-js/adapter';
3
-
4
- var NativeVideo = function (props) {
3
+ const NativeVideo = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxNativeVideo, props);
6
5
  };
7
-
8
6
  export default NativeVideo;
@@ -1,2 +1,3 @@
1
- declare function NativeVideo(): JSX.Element;
1
+ import * as React from 'react';
2
+ declare function NativeVideo(): React.JSX.Element;
2
3
  export default NativeVideo;
@@ -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 NativeVideo() {
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 NativeVideo;
@@ -3,13 +3,13 @@ import React, { useRef } from 'react';
3
3
  import { useEventListener } from 'ahooks';
4
4
  import { defaultPageContainerProps } from './props';
5
5
  import handleProps from '../utils/handleProps';
6
-
7
- var PageContainer = function (props) {
8
- var children = props.children;
9
- var currentNode = useRef(null);
10
- useEventListener('clickoverlay', function (e) {
6
+ const PageContainer = props => {
7
+ const {
8
+ children
9
+ } = props;
10
+ const currentNode = useRef(null);
11
+ useEventListener('clickoverlay', e => {
11
12
  var _props$onClickOverlay;
12
-
13
13
  (_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0 ? void 0 : _props$onClickOverlay.call(props, {
14
14
  type: 'clickoverlay',
15
15
  origin: e
@@ -17,9 +17,8 @@ var PageContainer = function (props) {
17
17
  }, {
18
18
  target: currentNode
19
19
  });
20
- useEventListener('beforeenter', function (e) {
20
+ useEventListener('beforeenter', e => {
21
21
  var _props$onBeforeEnter;
22
-
23
22
  (_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0 ? void 0 : _props$onBeforeEnter.call(props, {
24
23
  type: 'beforeenter',
25
24
  origin: e
@@ -27,9 +26,8 @@ var PageContainer = function (props) {
27
26
  }, {
28
27
  target: currentNode
29
28
  });
30
- useEventListener('enter', function (e) {
29
+ useEventListener('enter', e => {
31
30
  var _props$onEnter;
32
-
33
31
  (_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 ? void 0 : _props$onEnter.call(props, {
34
32
  type: 'enter',
35
33
  origin: e
@@ -37,9 +35,8 @@ var PageContainer = function (props) {
37
35
  }, {
38
36
  target: currentNode
39
37
  });
40
- useEventListener('afterenter', function (e) {
38
+ useEventListener('afterenter', e => {
41
39
  var _props$onAfterEnter;
42
-
43
40
  (_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0 ? void 0 : _props$onAfterEnter.call(props, {
44
41
  type: 'afterenter',
45
42
  origin: e
@@ -47,9 +44,8 @@ var PageContainer = function (props) {
47
44
  }, {
48
45
  target: currentNode
49
46
  });
50
- useEventListener('beforeleave', function (e) {
47
+ useEventListener('beforeleave', e => {
51
48
  var _props$onBeforeLeave;
52
-
53
49
  (_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0 ? void 0 : _props$onBeforeLeave.call(props, {
54
50
  type: 'beforeleave',
55
51
  origin: e
@@ -57,9 +53,8 @@ var PageContainer = function (props) {
57
53
  }, {
58
54
  target: currentNode
59
55
  });
60
- useEventListener('leave', function (e) {
56
+ useEventListener('leave', e => {
61
57
  var _props$onLeave;
62
-
63
58
  (_props$onLeave = props.onLeave) === null || _props$onLeave === void 0 ? void 0 : _props$onLeave.call(props, {
64
59
  type: 'leave',
65
60
  origin: e
@@ -67,9 +62,8 @@ var PageContainer = function (props) {
67
62
  }, {
68
63
  target: currentNode
69
64
  });
70
- useEventListener('afterleave', function (e) {
65
+ useEventListener('afterleave', e => {
71
66
  var _props$onAfterLeave;
72
-
73
67
  (_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0 ? void 0 : _props$onAfterLeave.call(props, {
74
68
  type: 'afterleave',
75
69
  origin: e
@@ -85,6 +79,5 @@ var PageContainer = function (props) {
85
79
  }), children)
86
80
  );
87
81
  };
88
-
89
82
  PageContainer.defaultProps = defaultPageContainerProps;
90
83
  export default PageContainer;
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { PageContainerProps } from './props';
2
- declare function PageContainer(props: PageContainerProps): JSX.Element;
3
+ declare function PageContainer(props: PageContainerProps): React.JSX.Element;
3
4
  export default PageContainer;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { PageContainer as RemaxPageContainer } from '@ray-js/adapter';
3
-
4
3
  function PageContainer(props) {
5
4
  return /*#__PURE__*/React.createElement(RemaxPageContainer, props);
6
5
  }
7
-
8
6
  export default PageContainer;
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { PageContainerProps } from './props';
2
- declare function PageContainer(props: PageContainerProps): JSX.Element;
3
+ declare function PageContainer(props: PageContainerProps): React.JSX.Element;
3
4
  export default PageContainer;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { PageContainer as RemaxPageContainer } from '@ray-core/wechat';
3
-
4
3
  function PageContainer(props) {
5
4
  return /*#__PURE__*/React.createElement(RemaxPageContainer, props);
6
5
  }
7
-
8
6
  export default PageContainer;
@@ -1,12 +1,12 @@
1
1
  import { BaseProps } from '../types';
2
2
  import * as React from 'react';
3
3
  import { BaseEvent } from '@ray-js/adapter/esm/types/component';
4
- export declare type PageContainerEventType = {
4
+ export type PageContainerEventType = {
5
5
  type: string;
6
6
  value?: any;
7
7
  origin: BaseEvent;
8
8
  };
9
- export declare type PageContainerProps = BaseProps & {
9
+ export type PageContainerProps = BaseProps & {
10
10
  /** 文本是否可选 */
11
11
  show?: boolean;
12
12
  duration?: number;
@@ -1,9 +1,9 @@
1
- export var defaultPageContainerProps = {
1
+ export const defaultPageContainerProps = {
2
2
  show: false,
3
3
  duration: 300,
4
4
  zIndex: 100,
5
5
  overlay: true,
6
6
  position: 'bottom',
7
- round: false // closeOnSlideDown: false,
8
-
7
+ round: false
8
+ // closeOnSlideDown: false,
9
9
  };
@@ -1,22 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import * as React from 'react';
4
3
  import { useTouch } from '@ray-js/framework-shared';
5
4
  import { useEventListener } from 'ahooks';
6
5
  import handleProps from '../utils/handleProps';
7
- var countArr = 1;
8
-
9
- var Picker = function (props) {
10
- var onTouchStart = props.onTouchStart,
11
- onTouchMove = props.onTouchMove,
12
- onTouchEnd = props.onTouchEnd,
13
- onTouchCancel = props.onTouchCancel,
14
- onClick = props.onClick,
15
- children = props.children;
16
- var currentNode = React.useRef(null);
17
- useEventListener('change', function (e) {
6
+ let countArr = 1;
7
+ const Picker = props => {
8
+ const {
9
+ onTouchStart,
10
+ onTouchMove,
11
+ onTouchEnd,
12
+ onTouchCancel,
13
+ onClick,
14
+ children
15
+ } = props;
16
+ const currentNode = React.useRef(null);
17
+ useEventListener('change', e => {
18
18
  var _props$onChange;
19
-
20
19
  (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
21
20
  type: 'change',
22
21
  value: e.detail.value,
@@ -25,9 +24,8 @@ var Picker = function (props) {
25
24
  }, {
26
25
  target: currentNode
27
26
  });
28
- useEventListener('cancel', function (e) {
27
+ useEventListener('cancel', e => {
29
28
  var _props$onCancel;
30
-
31
29
  (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 ? void 0 : _props$onCancel.call(props, {
32
30
  type: 'cancel',
33
31
  origin: e
@@ -35,29 +33,23 @@ var Picker = function (props) {
35
33
  }, {
36
34
  target: currentNode
37
35
  });
38
-
39
- var _useTouch = useTouch({
40
- onTouchStart: onTouchStart,
41
- onTouchMove: onTouchMove,
42
- onTouchEnd: onTouchEnd,
43
- onTouchCancel: onTouchCancel,
44
- onClick: onClick
45
- }),
46
- _useTouch2 = _slicedToArray(_useTouch, 2),
47
- handlers = _useTouch2[1];
48
-
49
- var multiarr = function (arr) {
50
- for (var i = 0; i < arr.length; i++) {
36
+ const [, handlers] = useTouch({
37
+ onTouchStart,
38
+ onTouchMove,
39
+ onTouchEnd,
40
+ onTouchCancel,
41
+ onClick
42
+ });
43
+ const multiarr = arr => {
44
+ for (let i = 0; i < arr.length; i++) {
51
45
  if (arr[i] instanceof Array) {
52
46
  countArr++;
53
47
  arr = arr[i];
54
48
  multiarr(arr);
55
49
  }
56
50
  }
57
-
58
51
  return countArr;
59
52
  };
60
-
61
53
  return (
62
54
  /*#__PURE__*/
63
55
  // @ts-ignore
@@ -67,6 +59,5 @@ var Picker = function (props) {
67
59
  }), children)
68
60
  );
69
61
  };
70
-
71
62
  Picker.displayName = 'Picker';
72
63
  export default Picker;
@@ -1,51 +1,46 @@
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 = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
3
+ const _excluded = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
5
4
  import clsx from 'clsx';
6
5
  import * as React from 'react';
7
6
  import { inlineStyle, useTouch } from '@ray-js/framework-shared';
8
7
  import { Picker as RemaxPicker } from '@ray-js/adapter';
9
-
10
- var Picker = function (props) {
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,
21
- restProps = _objectWithoutProperties(props, _excluded);
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
-
8
+ const Picker = props => {
9
+ const {
10
+ className,
11
+ style,
12
+ id,
13
+ onChange,
14
+ onTouchStart,
15
+ onTouchMove,
16
+ onTouchEnd,
17
+ onTouchCancel,
18
+ onClick,
19
+ onCancel
20
+ } = props,
21
+ restProps = _objectWithoutProperties(props, _excluded);
22
+ const [touching, handlers] = useTouch({
23
+ onTouchStart,
24
+ onTouchMove,
25
+ onTouchEnd,
26
+ onTouchCancel,
27
+ onClick
28
+ });
34
29
  return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
35
- onChange: function handleChange(e) {
30
+ onChange: e => {
36
31
  onChange === null || onChange === void 0 ? void 0 : onChange({
37
32
  type: e.type,
38
33
  value: e.detail.value,
39
34
  origin: e
40
35
  });
41
36
  },
42
- onCancel: function handleCancel(e) {
37
+ onCancel: e => {
43
38
  onCancel === null || onCancel === void 0 ? void 0 : onCancel({
44
39
  type: e.type,
45
40
  origin: e
46
41
  });
47
42
  },
48
- onColumnChange: function handleColumnChange(e) {
43
+ onColumnChange: e => {
49
44
  onCancel === null || onCancel === void 0 ? void 0 : onCancel({
50
45
  type: e.type,
51
46
  value: e.detail.value,
@@ -56,5 +51,4 @@ var Picker = function (props) {
56
51
  className: clsx(className)
57
52
  }, restProps, handlers), props.children);
58
53
  };
59
-
60
54
  export default Picker;