@ray-js/components 1.4.0-alpha.1 → 1.4.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) 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.d.ts +2 -1
  6. package/lib/Camera/Camera.js +3 -3
  7. package/lib/Camera/Camera.thing.js +1 -3
  8. package/lib/Camera/Camera.wechat.d.ts +2 -1
  9. package/lib/Camera/Camera.wechat.js +2 -2
  10. package/lib/Checkbox/Checkbox.js +1 -3
  11. package/lib/Checkbox/Checkbox.thing.js +8 -9
  12. package/lib/Checkbox/Checkbox.wechat.js +9 -10
  13. package/lib/CheckboxGroup/CheckboxGroup.js +15 -19
  14. package/lib/CheckboxGroup/CheckboxGroup.thing.js +12 -17
  15. package/lib/CheckboxGroup/CheckboxGroup.wechat.js +12 -17
  16. package/lib/CheckboxGroup/props.d.ts +1 -1
  17. package/lib/CoverView/CoverView.js +1 -3
  18. package/lib/CoverView/CoverView.thing.js +1 -3
  19. package/lib/CoverView/CoverView.wechat.d.ts +2 -1
  20. package/lib/CoverView/CoverView.wechat.js +0 -2
  21. package/lib/CoverView/props.d.ts +1 -1
  22. package/lib/CoverView/props.js +1 -1
  23. package/lib/Form/Form.js +12 -12
  24. package/lib/Form/Form.thing.js +1 -3
  25. package/lib/Form/Form.wechat.js +20 -25
  26. package/lib/Form/props.d.ts +1 -1
  27. package/lib/Icon/Icon.js +7 -7
  28. package/lib/Icon/Icon.thing.js +7 -7
  29. package/lib/Icon/Icon.wechat.js +7 -7
  30. package/lib/Icon/iconfont/iconfont.js +13 -20
  31. package/lib/Icon/props.d.ts +1 -1
  32. package/lib/Icon/props.js +1 -1
  33. package/lib/Iframe/Iframe.d.ts +2 -1
  34. package/lib/Iframe/Iframe.js +3 -3
  35. package/lib/Iframe/Iframe.thing.js +1 -3
  36. package/lib/Iframe/Iframe.wechat.d.ts +2 -1
  37. package/lib/Iframe/Iframe.wechat.js +3 -3
  38. package/lib/Image/Image.js +6 -8
  39. package/lib/Image/Image.thing.js +8 -10
  40. package/lib/Image/Image.wechat.js +26 -32
  41. package/lib/Input/Input.js +29 -26
  42. package/lib/Input/Input.thing.js +36 -36
  43. package/lib/Input/Input.wechat.js +47 -47
  44. package/lib/Input/props.d.ts +11 -21
  45. package/lib/Input/props.js +1 -3
  46. package/lib/IpcPlayer/IpcPlayer.d.ts +2 -1
  47. package/lib/IpcPlayer/IpcPlayer.js +3 -3
  48. package/lib/IpcPlayer/IpcPlayer.thing.js +1 -3
  49. package/lib/IpcPlayer/IpcPlayer.wechat.d.ts +2 -1
  50. package/lib/IpcPlayer/IpcPlayer.wechat.js +2 -2
  51. package/lib/Label/Label.js +7 -8
  52. package/lib/Label/Label.thing.js +8 -8
  53. package/lib/Label/Label.wechat.js +8 -8
  54. package/lib/Map/Map.js +1 -3
  55. package/lib/Map/Map.thing.js +1 -3
  56. package/lib/Map/Map.wechat.js +1 -3
  57. package/lib/Modal/index.js +4 -2
  58. package/lib/Modal/index.web.js +6 -4
  59. package/lib/MovableArea/MovableArea.js +5 -4
  60. package/lib/MovableArea/MovableArea.thing.js +1 -3
  61. package/lib/MovableArea/MovableArea.wechat.js +1 -3
  62. package/lib/MovableView/MovableView.js +12 -11
  63. package/lib/MovableView/MovableView.thing.js +1 -3
  64. package/lib/MovableView/MovableView.wechat.js +1 -3
  65. package/lib/NativeVideo/NativeVideo.d.ts +2 -1
  66. package/lib/NativeVideo/NativeVideo.js +3 -3
  67. package/lib/NativeVideo/NativeVideo.thing.js +1 -3
  68. package/lib/NativeVideo/NativeVideo.wechat.d.ts +2 -1
  69. package/lib/NativeVideo/NativeVideo.wechat.js +2 -2
  70. package/lib/PageContainer/PageContainer.js +12 -19
  71. package/lib/PageContainer/PageContainer.thing.d.ts +2 -1
  72. package/lib/PageContainer/PageContainer.thing.js +0 -2
  73. package/lib/PageContainer/PageContainer.wechat.d.ts +2 -1
  74. package/lib/PageContainer/PageContainer.wechat.js +0 -2
  75. package/lib/PageContainer/props.d.ts +2 -2
  76. package/lib/PageContainer/props.js +3 -3
  77. package/lib/Picker/Picker.js +23 -31
  78. package/lib/Picker/Picker.thing.js +26 -31
  79. package/lib/Picker/Picker.wechat.js +26 -31
  80. package/lib/PickerView/PickerView.js +23 -34
  81. package/lib/PickerView/PickerView.thing.js +16 -19
  82. package/lib/PickerView/PickerView.wechat.js +16 -19
  83. package/lib/PickerViewColumn/PickerViewColumn.js +4 -4
  84. package/lib/PickerViewColumn/PickerViewColumn.thing.js +6 -7
  85. package/lib/PickerViewColumn/PickerViewColumn.wechat.js +6 -7
  86. package/lib/Progress/Progress.js +1 -3
  87. package/lib/Progress/Progress.thing.js +6 -7
  88. package/lib/Progress/Progress.wechat.js +6 -7
  89. package/lib/Radio/Radio.js +1 -3
  90. package/lib/Radio/Radio.thing.js +8 -9
  91. package/lib/Radio/Radio.wechat.js +9 -10
  92. package/lib/RadioGroup/RadioGroup.js +12 -18
  93. package/lib/RadioGroup/RadioGroup.thing.js +15 -21
  94. package/lib/RadioGroup/RadioGroup.wechat.js +12 -17
  95. package/lib/RadioGroup/props.d.ts +1 -1
  96. package/lib/RichText/RichText.js +1 -1
  97. package/lib/RichText/RichText.thing.js +1 -3
  98. package/lib/RichText/RichText.wechat.js +1 -3
  99. package/lib/ScrollView/ScrollView.js +12 -13
  100. package/lib/ScrollView/ScrollView.thing.js +6 -7
  101. package/lib/ScrollView/ScrollView.wechat.js +6 -7
  102. package/lib/Slider/Slider.js +4 -8
  103. package/lib/Slider/Slider.thing.js +13 -14
  104. package/lib/Slider/Slider.wechat.js +14 -15
  105. package/lib/Slider/props.js +1 -1
  106. package/lib/Swiper/Swiper.d.ts +1 -1
  107. package/lib/Swiper/Swiper.js +24 -33
  108. package/lib/Swiper/Swiper.thing.d.ts +1 -1
  109. package/lib/Swiper/Swiper.thing.js +18 -24
  110. package/lib/Swiper/Swiper.wechat.d.ts +1 -1
  111. package/lib/Swiper/Swiper.wechat.js +18 -24
  112. package/lib/Swiper/props.d.ts +1 -1
  113. package/lib/Swiper/props.js +2 -2
  114. package/lib/SwiperItem/SwiperItem.js +4 -4
  115. package/lib/SwiperItem/SwiperItem.thing.js +8 -9
  116. package/lib/SwiperItem/SwiperItem.wechat.js +8 -9
  117. package/lib/Switch/Switch.js +5 -8
  118. package/lib/Switch/Switch.thing.js +12 -14
  119. package/lib/Switch/Switch.wechat.js +12 -14
  120. package/lib/Switch/props.js +1 -1
  121. package/lib/Text/Text.js +1 -3
  122. package/lib/Text/Text.thing.js +1 -3
  123. package/lib/Text/Text.wechat.js +20 -25
  124. package/lib/Textarea/Textarea.js +13 -24
  125. package/lib/Textarea/Textarea.thing.js +26 -30
  126. package/lib/Textarea/Textarea.wechat.js +26 -30
  127. package/lib/Textarea/props.d.ts +4 -10
  128. package/lib/View/View.js +29 -32
  129. package/lib/View/View.thing.js +34 -35
  130. package/lib/View/View.wechat.js +34 -35
  131. package/lib/View/props.js +1 -1
  132. package/lib/WebView/WebView.js +1 -3
  133. package/lib/WebView/WebView.thing.js +1 -3
  134. package/lib/WebView/WebView.wechat.js +1 -3
  135. package/lib/assets/icons.js +1 -1
  136. package/lib/core/index.js +4 -11
  137. package/lib/types/event.d.ts +1 -1
  138. package/lib/types/index.js +1 -0
  139. package/lib/utils/handleProps.js +26 -40
  140. package/package.json +25 -25
  141. package/LICENSE.md +0 -9
  142. package/lib/Modal/index.web.d.ts +0 -2
@@ -1,2 +1,3 @@
1
- declare const IpcPlayer: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const IpcPlayer: () => React.JSX.Element;
2
3
  export default IpcPlayer;
@@ -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 IpcPlayer = function () {
3
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
4
+ const IpcPlayer = () => {
4
5
  return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
5
6
  };
6
-
7
7
  export default IpcPlayer;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { IpcPlayer as RemaxIpcPlayer } from '@ray-js/adapter';
3
-
4
- var IpcPlayer = function (props) {
3
+ const IpcPlayer = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxIpcPlayer, props);
6
5
  };
7
-
8
6
  export default IpcPlayer;
@@ -1,2 +1,3 @@
1
- declare function IpcPlayer(): JSX.Element;
1
+ import * as React from 'react';
2
+ declare function IpcPlayer(): React.JSX.Element;
2
3
  export default IpcPlayer;
@@ -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 IpcPlayer() {
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 IpcPlayer;
@@ -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,22 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+ import "core-js/modules/web.dom-collections.iterator.js";
3
3
  import * as React from 'react';
4
4
  import { useTouch } from '@ray-js/framework-shared';
5
5
  import { useEventListener } from 'ahooks';
6
6
  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) {
7
+ let countArr = 1;
8
+ const Picker = props => {
9
+ const {
10
+ onTouchStart,
11
+ onTouchMove,
12
+ onTouchEnd,
13
+ onTouchCancel,
14
+ onClick,
15
+ children
16
+ } = props;
17
+ const currentNode = React.useRef(null);
18
+ useEventListener('change', e => {
18
19
  var _props$onChange;
19
-
20
20
  (_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
21
21
  type: 'change',
22
22
  value: e.detail.value,
@@ -25,9 +25,8 @@ var Picker = function (props) {
25
25
  }, {
26
26
  target: currentNode
27
27
  });
28
- useEventListener('cancel', function (e) {
28
+ useEventListener('cancel', e => {
29
29
  var _props$onCancel;
30
-
31
30
  (_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 ? void 0 : _props$onCancel.call(props, {
32
31
  type: 'cancel',
33
32
  origin: e
@@ -35,29 +34,23 @@ var Picker = function (props) {
35
34
  }, {
36
35
  target: currentNode
37
36
  });
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++) {
37
+ const [, handlers] = useTouch({
38
+ onTouchStart,
39
+ onTouchMove,
40
+ onTouchEnd,
41
+ onTouchCancel,
42
+ onClick
43
+ });
44
+ const multiarr = arr => {
45
+ for (let i = 0; i < arr.length; i++) {
51
46
  if (arr[i] instanceof Array) {
52
47
  countArr++;
53
48
  arr = arr[i];
54
49
  multiarr(arr);
55
50
  }
56
51
  }
57
-
58
52
  return countArr;
59
53
  };
60
-
61
54
  return (
62
55
  /*#__PURE__*/
63
56
  // @ts-ignore
@@ -67,6 +60,5 @@ var Picker = function (props) {
67
60
  }), children)
68
61
  );
69
62
  };
70
-
71
63
  Picker.displayName = 'Picker';
72
64
  export default Picker;