@tarojs/components-react 3.8.0-canary.0 → 3.8.0-canary.1

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 (45) hide show
  1. package/LICENSE +14 -0
  2. package/dist/components/button/index.js +115 -0
  3. package/dist/components/button/index.js.map +1 -0
  4. package/dist/components/button/style/index.scss.js +4 -0
  5. package/dist/components/button/style/index.scss.js.map +1 -0
  6. package/dist/components/icon/index.js +30 -0
  7. package/dist/components/icon/index.js.map +1 -0
  8. package/dist/components/icon/style/index.scss.js +4 -0
  9. package/dist/components/icon/style/index.scss.js.map +1 -0
  10. package/dist/components/image/index.js +9 -6
  11. package/dist/components/image/index.js.map +1 -1
  12. package/dist/components/image/style/index.css.js +4 -0
  13. package/dist/components/image/style/index.css.js.map +1 -0
  14. package/dist/components/input/index.js +260 -0
  15. package/dist/components/input/index.js.map +1 -0
  16. package/dist/components/input/style/index.scss.js +4 -0
  17. package/dist/components/input/style/index.scss.js.map +1 -0
  18. package/dist/components/pull-down-refresh/index.js +9 -2
  19. package/dist/components/pull-down-refresh/index.js.map +1 -1
  20. package/dist/components/pull-down-refresh/style/index.css.js +4 -0
  21. package/dist/components/pull-down-refresh/style/index.css.js.map +1 -0
  22. package/dist/components/scroll-view/index.js +16 -9
  23. package/dist/components/scroll-view/index.js.map +1 -1
  24. package/dist/components/scroll-view/style/index.css.js +4 -0
  25. package/dist/components/scroll-view/style/index.css.js.map +1 -0
  26. package/dist/components/swiper/index.js +26 -20
  27. package/dist/components/swiper/index.js.map +1 -1
  28. package/dist/components/swiper/style/index.css.js +4 -0
  29. package/dist/components/swiper/style/index.css.js.map +1 -0
  30. package/dist/components/text/index.js +9 -5
  31. package/dist/components/text/index.js.map +1 -1
  32. package/dist/components/text/style/index.css.js +4 -0
  33. package/dist/components/text/style/index.css.js.map +1 -0
  34. package/dist/components/view/index.js +8 -4
  35. package/dist/components/view/index.js.map +1 -1
  36. package/dist/components/view/style/index.css.js +4 -0
  37. package/dist/components/view/style/index.css.js.map +1 -0
  38. package/dist/index.css +1 -0
  39. package/dist/index.js +6 -1
  40. package/dist/index.js.map +1 -1
  41. package/dist/utils/index.js +19 -1
  42. package/dist/utils/index.js.map +1 -1
  43. package/package.json +20 -14
  44. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js +0 -13
  45. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js.map +0 -1
package/LICENSE CHANGED
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
158
158
  The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
159
  `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
160
  See `/LICENSE` for details of the license.
161
+
162
+ ==================
163
+
164
+ MIT (weui):
165
+ The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
166
+ `/packages/taro-components/src/components/*.scss`
167
+ See `/LICENSE.txt` for details of the license.
168
+
169
+ ==================
170
+
171
+ Apache-2.0 (intersection-observer):
172
+ The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
173
+ `/packages/taro-api/src/polyfill/intersection-observer.ts`
174
+ See `/LICENSE.txt` for details of the license.
@@ -0,0 +1,115 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
+ import _createClass from '@babel/runtime/helpers/createClass';
4
+ import _inherits from '@babel/runtime/helpers/inherits';
5
+ import _createSuper from '@babel/runtime/helpers/createSuper';
6
+ import './style/index.scss.js';
7
+ import classNames from 'classnames';
8
+ import React from 'react';
9
+ import { omit, createForwardRefComponent } from '../../utils/index.js';
10
+
11
+ var Button = /*#__PURE__*/function (_React$Component) {
12
+ _inherits(Button, _React$Component);
13
+ var _super = _createSuper(Button);
14
+ function Button(props) {
15
+ var _this;
16
+ _classCallCheck(this, Button);
17
+ _this = _super.call(this, props);
18
+ _this.state = {
19
+ hover: false,
20
+ touch: false
21
+ };
22
+ return _this;
23
+ }
24
+ _createClass(Button, [{
25
+ key: "componentWillUnmount",
26
+ value: function componentWillUnmount() {
27
+ this.startTimer && clearTimeout(this.startTimer);
28
+ this.endTimer && clearTimeout(this.endTimer);
29
+ }
30
+ }, {
31
+ key: "render",
32
+ value: function render() {
33
+ var _this2 = this;
34
+ var _this$props = this.props,
35
+ _this$props$plain = _this$props.plain,
36
+ plain = _this$props$plain === void 0 ? false : _this$props$plain,
37
+ children = _this$props.children,
38
+ _this$props$disabled = _this$props.disabled,
39
+ disabled = _this$props$disabled === void 0 ? false : _this$props$disabled,
40
+ className = _this$props.className,
41
+ style = _this$props.style,
42
+ onClick = _this$props.onClick,
43
+ onTouchStart = _this$props.onTouchStart,
44
+ onTouchEnd = _this$props.onTouchEnd,
45
+ _this$props$hoverClas = _this$props.hoverClass,
46
+ hoverClass = _this$props$hoverClas === void 0 ? 'button-hover' : _this$props$hoverClas,
47
+ _this$props$hoverStar = _this$props.hoverStartTime,
48
+ hoverStartTime = _this$props$hoverStar === void 0 ? 20 : _this$props$hoverStar,
49
+ _this$props$hoverStay = _this$props.hoverStayTime,
50
+ hoverStayTime = _this$props$hoverStay === void 0 ? 70 : _this$props$hoverStay,
51
+ _this$props$loading = _this$props.loading,
52
+ loading = _this$props$loading === void 0 ? false : _this$props$loading,
53
+ type = _this$props.type,
54
+ forwardedRef = _this$props.forwardedRef;
55
+ var cls = classNames(className, 'taro-button-core', _defineProperty({}, "".concat(hoverClass), this.state.hover && !disabled));
56
+ var _onTouchStart = function _onTouchStart(e) {
57
+ _this2.setState(function () {
58
+ return {
59
+ touch: true
60
+ };
61
+ });
62
+ if (hoverClass && hoverClass !== 'none' && !disabled) {
63
+ _this2.startTimer = setTimeout(function () {
64
+ if (_this2.state.touch) {
65
+ _this2.setState(function () {
66
+ return {
67
+ hover: true
68
+ };
69
+ });
70
+ }
71
+ }, hoverStartTime);
72
+ }
73
+ onTouchStart && onTouchStart(e);
74
+ };
75
+ var _onTouchEnd = function _onTouchEnd(e) {
76
+ _this2.setState(function () {
77
+ return {
78
+ touch: false
79
+ };
80
+ });
81
+ if (hoverClass && hoverClass !== 'none' && !disabled) {
82
+ _this2.endTimer = setTimeout(function () {
83
+ if (!_this2.state.touch) {
84
+ _this2.setState(function () {
85
+ return {
86
+ hover: false
87
+ };
88
+ });
89
+ }
90
+ }, hoverStayTime);
91
+ }
92
+ onTouchEnd && onTouchEnd(e);
93
+ };
94
+ return React.createElement("button", Object.assign({}, omit(this.props, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef']), {
95
+ type: type,
96
+ ref: forwardedRef,
97
+ className: cls,
98
+ style: style,
99
+ onClick: onClick,
100
+ disabled: disabled,
101
+ onTouchStart: _onTouchStart,
102
+ onTouchEnd: _onTouchEnd,
103
+ loading: loading.toString(),
104
+ plain: plain.toString()
105
+ }), !!loading && React.createElement("i", {
106
+ className: 'weui-loading'
107
+ }), children);
108
+ }
109
+ }]);
110
+ return Button;
111
+ }(React.Component);
112
+ var index = createForwardRefComponent(Button);
113
+
114
+ export { index as default };
115
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/button/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n size?: string\n plain?: boolean\n hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n disabled?: boolean\n loading?: boolean\n type?: string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLButtonElement>\n}\n\ninterface IState {\n hover:boolean\n touch: boolean\n}\n\nclass Button extends React.Component<IProps, IState> {\n constructor (props) {\n super(props)\n this.state = {\n hover: false,\n touch: false\n }\n }\n\n startTimer: ReturnType<typeof setTimeout>\n endTimer: ReturnType<typeof setTimeout>\n\n componentWillUnmount () {\n this.startTimer && clearTimeout(this.startTimer)\n this.endTimer && clearTimeout(this.endTimer)\n }\n\n render () {\n const {\n plain = false,\n children,\n disabled = false,\n className,\n style,\n onClick,\n onTouchStart,\n onTouchEnd,\n hoverClass = 'button-hover',\n hoverStartTime = 20,\n hoverStayTime = 70,\n loading = false,\n type,\n forwardedRef,\n } = this.props\n const cls = classNames(\n className,\n 'taro-button-core',\n {\n [`${hoverClass}`]: this.state.hover && !disabled\n }\n )\n\n const _onTouchStart = e => {\n this.setState(() => ({\n touch: true\n }))\n if (hoverClass && hoverClass !== 'none' && !disabled) {\n this.startTimer = setTimeout(() => {\n if (this.state.touch) {\n this.setState(() => ({\n hover: true\n }))\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n }\n const _onTouchEnd = e => {\n this.setState(() => ({\n touch: false\n }))\n if (hoverClass && hoverClass !== 'none' && !disabled) {\n this.endTimer = setTimeout(() => {\n if (!this.state.touch) {\n this.setState(() => ({\n hover: false\n }))\n }\n }, hoverStayTime)\n }\n onTouchEnd && onTouchEnd(e)\n }\n\n return (\n <button\n {...omit(this.props, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading', 'forwardedRef'])}\n type={type}\n ref={forwardedRef}\n className={cls}\n style={style}\n onClick={onClick}\n disabled={disabled}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n loading={loading.toString()}\n plain={plain.toString()}\n >\n {!!loading && <i className='weui-loading' />}\n {children}\n </button>\n )\n }\n}\n\nexport default createForwardRefComponent(Button)\n"],"names":["Button","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","state","hover","touch","_createClass","key","value","componentWillUnmount","startTimer","clearTimeout","endTimer","render","_this2","_this$props","_this$props$plain","plain","children","_this$props$disabled","disabled","className","style","onClick","onTouchStart","onTouchEnd","_this$props$hoverClas","hoverClass","_this$props$hoverStar","hoverStartTime","_this$props$hoverStay","hoverStayTime","_this$props$loading","loading","type","forwardedRef","cls","classNames","_defineProperty","concat","_onTouchStart","e","setState","setTimeout","_onTouchEnd","React","createElement","Object","assign","omit","ref","toString","Component","createForwardRefComponent"],"mappings":";;;;;;;;;;AAK6D,IAoBvDA,MAAO,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,MAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,MAAA,CAAA,CAAA;EACX,SAAAA,MAAAA,CAAaK,KAAK,EAAA;AAAA,IAAA,IAAAC,KAAA,CAAA;AAAAC,IAAAA,eAAA,OAAAP,MAAA,CAAA,CAAA;AAChBM,IAAAA,KAAA,GAAAH,MAAA,CAAAK,IAAA,OAAMH,KAAK,CAAA,CAAA;IACXC,KAAA,CAAKG,KAAK,GAAG;AACXC,MAAAA,KAAK,EAAE,KAAK;AACZC,MAAAA,KAAK,EAAE,KAAA;KACR,CAAA;AAAA,IAAA,OAAAL,KAAA,CAAA;AACH,GAAA;AAACM,EAAAA,YAAA,CAAAZ,MAAA,EAAA,CAAA;IAAAa,GAAA,EAAA,sBAAA;IAAAC,KAAA,EAKD,SAAAC,oBAAAA,GAAoB;MAClB,IAAI,CAACC,UAAU,IAAIC,YAAY,CAAC,IAAI,CAACD,UAAU,CAAC,CAAA;MAChD,IAAI,CAACE,QAAQ,IAAID,YAAY,CAAC,IAAI,CAACC,QAAQ,CAAC,CAAA;AAC9C,KAAA;AAAC,GAAA,EAAA;IAAAL,GAAA,EAAA,QAAA;IAAAC,KAAA,EAED,SAAAK,MAAAA,GAAM;AAAA,MAAA,IAAAC,MAAA,GAAA,IAAA,CAAA;AACJ,MAAA,IAAAC,WAAA,GAeI,IAAI,CAAChB,KAAK;QAAAiB,iBAAA,GAAAD,WAAA,CAdZE,KAAK;AAALA,QAAAA,KAAK,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,iBAA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C,MAAA,CAAA,EAAA,EACMC,IAAI,CAAC,IAAI,CAAClD,KAAK,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,EACrG;AAAAmC,QAAAA,IAAI,EAAEA,IAAI;AACVgB,QAAAA,GAAG,EAAEf,YAAY;AACjBd,QAAAA,SAAS,EAAEe,GAAG;AACdd,QAAAA,KAAK,EAAEA,KAAK;AACZC,QAAAA,OAAO,EAAEA,OAAO;AAChBH,QAAAA,QAAQ,EAAEA,QAAQ;AAClBI,QAAAA,YAAY,EAAEgB,aAAa;AAC3Bf,QAAAA,UAAU,EAAEmB,WAAW;AACvBX,QAAAA,OAAO,EAAEA,OAAO,CAACkB,QAAQ,EAAE;AAC3BlC,QAAAA,KAAK,EAAEA,KAAK,CAACkC,QAAQ,EAAE;OAAA,CAAA,EAEtB,CAAC,CAAClB,OAAO,IAAIY;AAAGxB,QAAAA,SAAS,EAAC,cAAA;OAAiB,CAAA,EAC3CH,QAAQ,CACF,CAAA;AAEb,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAxB,MAAA,CAAA;AAAA,CA3FkBmD,CAAAA,KAAK,CAACO,SAAyB,CAAA,CAAA;AA8FpD,YAAeC,yBAAyB,CAAC3D,MAAM,CAAC;;;;"}
@@ -0,0 +1,4 @@
1
+ var undefined$1 = undefined;
2
+
3
+ export { undefined$1 as default };
4
+ //# sourceMappingURL=index.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,30 @@
1
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
+ import './style/index.scss.js';
3
+ import classNames from 'classnames';
4
+ import React from 'react';
5
+ import { omit, createForwardRefComponent } from '../../utils/index.js';
6
+
7
+ var Icon = function Icon(props) {
8
+ var type = props.type,
9
+ _props$className = props.className,
10
+ className = _props$className === void 0 ? '' : _props$className,
11
+ _props$size = props.size,
12
+ size = _props$size === void 0 ? '23' : _props$size,
13
+ color = props.color,
14
+ forwardedRef = props.forwardedRef;
15
+ if (type) type = type.replace(/_/g, '-');
16
+ var cls = classNames(_defineProperty({}, "weui-icon-".concat(type), true), className);
17
+ var style = {
18
+ 'font-size': size + 'px',
19
+ color: color
20
+ };
21
+ return React.createElement("i", Object.assign({}, omit(props, ['type', 'className', 'forwardedRef']), {
22
+ className: cls,
23
+ style: style,
24
+ ref: forwardedRef
25
+ }));
26
+ };
27
+ var index = createForwardRefComponent(Icon);
28
+
29
+ export { index as default };
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/icon/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n forwardedRef?: React.MutableRefObject<HTMLLIElement>\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color, forwardedRef } = props\n if (type) type = type.replace(/_/g, '-')\n const cls = classNames(\n {\n [`weui-icon-${type}`]: true\n },\n className\n )\n const style = { 'font-size': size + 'px', color: color }\n\n return (\n <i {...omit(props, ['type', 'className', 'forwardedRef'])} className={cls} style={style} ref={forwardedRef} />\n )\n}\nexport default createForwardRefComponent(Icon)\n"],"names":["Icon","props","type","_props$className","className","_props$size","size","color","forwardedRef","replace","cls","classNames","_defineProperty","concat","style","React","createElement","Object","assign","omit","ref","createForwardRefComponent"],"mappings":";;;;;;AAgBA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAIC,KAAa,EAAI;AAC7B,EAAA,IAAMC,IAAI,GAAuDD,KAAK,CAAhEC,IAAI;IAAAC,gBAAA,GAAuDF,KAAK,CAA1DG,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,gBAAA;IAAAE,WAAA,GAAuCJ,KAAK,CAA1CK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,WAAA;IAAEE,KAAK,GAAmBN,KAAK,CAA7BM,KAAK;IAAEC,YAAY,GAAKP,KAAK,CAAtBO,YAAY,CAAA;EAC5D,IAAIN,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACO,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACxC,EAAA,IAAMC,GAAG,GAAGC,UAAU,CAAAC,eAAA,CAAA,EAAA,EAAA,YAAA,CAAAC,MAAA,CAEJX,IAAI,CAAA,EAAK,IAAI,CAAA,EAE7BE,SAAS,CACV,CAAA;AACD,EAAA,IAAMU,KAAK,GAAG;IAAE,WAAW,EAAER,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA,KAAAA;GAAO,CAAA;EAExD,OACEQ,KAAA,CAAAC,aAAA,CAAA,GAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EAAOC,IAAI,CAAClB,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC,EAAE;AAAAG,IAAAA,SAAS,EAAEM,GAAG;AAAEI,IAAAA,KAAK,EAAEA,KAAK;AAAEM,IAAAA,GAAG,EAAEZ,YAAAA;AAAgB,GAAA,CAAA,CAAA,CAAA;AAElH,CAAC,CAAA;AACD,YAAea,yBAAyB,CAACrB,IAAI,CAAC;;;;"}
@@ -0,0 +1,4 @@
1
+ var undefined$1 = undefined;
2
+
3
+ export { undefined$1 as default };
4
+ //# sourceMappingURL=index.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -3,12 +3,12 @@ import _createClass from '@babel/runtime/helpers/createClass';
3
3
  import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
4
4
  import _inherits from '@babel/runtime/helpers/inherits';
5
5
  import _createSuper from '@babel/runtime/helpers/createSuper';
6
- import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
7
- import 'weui';
6
+ import { __rest } from 'tslib';
7
+ import './style/index.css.js';
8
8
  import classNames from 'classnames';
9
9
  import React from 'react';
10
+ import { createForwardRefComponent } from '../../utils/index.js';
10
11
 
11
- require('intersection-observer');
12
12
  var Image = /*#__PURE__*/function (_React$Component) {
13
13
  _inherits(Image, _React$Component);
14
14
  var _super = _createSuper(Image);
@@ -78,14 +78,16 @@ var Image = /*#__PURE__*/function (_React$Component) {
78
78
  onError = _a.onError,
79
79
  lazyLoad = _a.lazyLoad,
80
80
  imgProps = _a.imgProps,
81
- reset = __rest(_a, ["className", "style", "src", "mode", "onError", "lazyLoad", "imgProps"]);
81
+ forwardedRef = _a.forwardedRef,
82
+ reset = __rest(_a, ["className", "style", "src", "mode", "onError", "lazyLoad", "imgProps", "forwardedRef"]);
82
83
  var cls = classNames('taro-img', {
83
84
  'taro-img__widthfix': mode === 'widthFix'
84
85
  }, className);
85
86
  var imgCls = classNames('taro-img__mode-' + (mode || 'scaleToFill').toLowerCase().replace(/\s/g, ''));
86
87
  return React.createElement("div", Object.assign({
87
88
  className: cls,
88
- style: style
89
+ style: style,
90
+ ref: forwardedRef
89
91
  }, reset), lazyLoad ? React.createElement("img", Object.assign({
90
92
  ref: function ref(img) {
91
93
  return _this3.imgRef = img;
@@ -107,6 +109,7 @@ var Image = /*#__PURE__*/function (_React$Component) {
107
109
  }]);
108
110
  return Image;
109
111
  }(React.Component);
112
+ var index = createForwardRefComponent(Image);
110
113
 
111
- export { Image as default };
114
+ export { index as default };
112
115
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/image/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nrequire('intersection-observer')\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n src: string\n mode: string\n onError: () => void\n onLoad: (e) => void\n lazyLoad?: boolean\n imgProps?: Record<string, any>\n}\n\nclass Image extends React.Component<IProps> {\n constructor (props) {\n super(props)\n this.state = {\n isLoaded: false\n }\n this.imageOnLoad = this.imageOnLoad.bind(this)\n // this.observer = {}\n }\n\n observer: any = {}\n imgRef: any = null\n\n componentDidMount () {\n if (this.props.lazyLoad) {\n this.observer = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n this.setState({ isLoaded: true }, () => {\n // findDOMNode(this).children[0].src = this.props.src\n this.imgRef.src = this.props.src\n })\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n this.observer.observe(this.imgRef)\n }\n }\n\n componentWillUnmount () {\n this.observer.disconnect && this.observer.disconnect()\n }\n\n imageOnLoad (e) {\n const { onLoad } = this.props\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n width: e.target.width,\n height: e.target.height\n }\n })\n\n onLoad && onLoad(e)\n }\n\n render () {\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n ...reset\n } = this.props\n const cls = classNames(\n 'taro-img',\n {\n 'taro-img__widthfix': mode === 'widthFix'\n },\n className\n )\n const imgCls = classNames(\n 'taro-img__mode-' +\n (mode || 'scaleToFill').toLowerCase().replace(/\\s/g, '')\n )\n\n return (\n <div className={cls} style={style} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n data-src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n }\n}\n\nexport default Image\n"],"names":["require","Image","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","observer","imgRef","state","isLoaded","imageOnLoad","bind","_assertThisInitialized","_createClass","key","value","componentDidMount","_this2","lazyLoad","IntersectionObserver","entries","length","isIntersecting","setState","src","rootMargin","observe","componentWillUnmount","disconnect","e","onLoad","Object","defineProperty","enumerable","writable","width","target","height","render","_this3","_a","className","_a$style","style","mode","onError","imgProps","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","React","createElement","assign","ref","img","Component"],"mappings":";;;;;;;;;;AAMAA,OAAO,CAAC,uBAAuB,CAAC,CAAA;AAW1BC,IAAAA,KAAM,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,KAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,KAAA,CAAA,CAAA;EACV,SAAAA,KAAAA,CAAaK,KAAK,EAAA;AAAA,IAAA,IAAAC,KAAA,CAAA;AAAAC,IAAAA,eAAA,OAAAP,KAAA,CAAA,CAAA;AAChBM,IAAAA,KAAA,GAAAH,MAAA,CAAAK,IAAA,OAAMH,KAAK,CAAA,CAAA;AAQbC,IAAAA,KAAA,CAAQG,QAAA,GAAQ,EAAE,CAAA;IAClBH,KAAA,CAAMI,MAAA,GAAQ,IAAI,CAAA;IARhBJ,KAAA,CAAKK,KAAK,GAAG;AACXC,MAAAA,QAAQ,EAAE,KAAA;KACX,CAAA;AACDN,IAAAA,KAAA,CAAKO,WAAW,GAAGP,KAAA,CAAKO,WAAW,CAACC,IAAI,CAAAC,sBAAA,CAAAT,KAAA,CAAK,CAAC,CAAA;AAC9C;AAAA,IAAA,OAAAA,KAAA,CAAA;AACF,GAAA;AAACU,EAAAA,YAAA,CAAAhB,KAAA,EAAA,CAAA;IAAAiB,GAAA,EAAA,mBAAA;IAAAC,KAAA,EAKD,SAAAC,iBAAAA,GAAiB;AAAA,MAAA,IAAAC,MAAA,GAAA,IAAA,CAAA;AACf,MAAA,IAAI,IAAI,CAACf,KAAK,CAACgB,QAAQ,EAAE;QACvB,IAAI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,EAAA;AAAA,UAAA,OAAKnB,MAAI,CAAChC,MAAM,GAAGmD,GAAG,CAAA;SAAC;AAC/BjB,QAAAA,SAAS,EAAEU,MAAM;AACP,QAAA,UAAA,EAAA3B,GAAG;QACbM,MAAM,EAAE,IAAI,CAACpB,WAAW;AACxBmC,QAAAA,OAAO,EAAEA,OAAAA;AACL,OAAA,EAAAC,QAAQ,EACZ,GAEFQ;QACEG,GAAG,EAAE,SAAAA,GAAAA,CAAAC,GAAG,EAAA;AAAA,UAAA,OAAKnB,MAAI,CAAChC,MAAM,GAAGmD,GAAG,CAAA;SAAC;AAC/BjB,QAAAA,SAAS,EAAEU,MAAM;AACjB3B,QAAAA,GAAG,EAAEA,GAAG;QACRM,MAAM,EAAE,IAAI,CAACpB,WAAW;AACxBmC,QAAAA,OAAO,EAAEA,OAAAA;AAAO,OAAA,EACZC,QAAQ,CACZ,CACH,CACG,CAAA;AAEV,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAjD,KAAA,CAAA;AAAA,CAjGiByD,CAAAA,KAAK,CAACK,SAAiB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/image/index.tsx"],"sourcesContent":["import './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent } from '../../utils/index'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n src: string\n mode: string\n onError: () => void\n onLoad: (e) => void\n lazyLoad?: boolean\n imgProps?: Record<string, any>\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\n}\n\nclass Image extends React.Component<IProps> {\n constructor (props) {\n super(props)\n this.state = {\n isLoaded: false\n }\n this.imageOnLoad = this.imageOnLoad.bind(this)\n // this.observer = {}\n }\n\n observer: any = {}\n imgRef: any = null\n\n componentDidMount () {\n if (this.props.lazyLoad) {\n this.observer = new IntersectionObserver(\n entries => {\n // 异步 api 关系\n if (entries[entries.length - 1].isIntersecting) {\n this.setState({ isLoaded: true }, () => {\n // findDOMNode(this).children[0].src = this.props.src\n this.imgRef.src = this.props.src\n })\n }\n },\n {\n rootMargin: '300px 0px'\n }\n )\n this.observer.observe(this.imgRef)\n }\n }\n\n componentWillUnmount () {\n this.observer.disconnect && this.observer.disconnect()\n }\n\n imageOnLoad (e) {\n const { onLoad } = this.props\n Object.defineProperty(e, 'detail', {\n enumerable: true,\n writable: true,\n value: {\n width: e.target.width,\n height: e.target.height\n }\n })\n\n onLoad && onLoad(e)\n }\n\n render () {\n const {\n className,\n style = {},\n src,\n mode,\n onError,\n lazyLoad,\n imgProps,\n forwardedRef,\n ...reset\n } = this.props\n const cls = classNames(\n 'taro-img',\n {\n 'taro-img__widthfix': mode === 'widthFix'\n },\n className\n )\n const imgCls = classNames(\n 'taro-img__mode-' +\n (mode || 'scaleToFill').toLowerCase().replace(/\\s/g, '')\n )\n\n return (\n <div className={cls} style={style} ref={forwardedRef} {...reset}>\n {lazyLoad ? (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n data-src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n ) : (\n <img\n ref={img => (this.imgRef = img)}\n className={imgCls}\n src={src}\n onLoad={this.imageOnLoad}\n onError={onError}\n {...imgProps}\n />\n )}\n </div>\n )\n }\n}\n\nexport default createForwardRefComponent(Image)\n"],"names":["Image","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","observer","imgRef","state","isLoaded","imageOnLoad","bind","_assertThisInitialized","_createClass","key","value","componentDidMount","_this2","lazyLoad","IntersectionObserver","entries","length","isIntersecting","setState","src","rootMargin","observe","componentWillUnmount","disconnect","e","onLoad","Object","defineProperty","enumerable","writable","width","target","height","render","_this3","_a","className","_a$style","style","mode","onError","imgProps","forwardedRef","reset","__rest","cls","classNames","imgCls","toLowerCase","replace","React","ref","createElement","assign","img","Component","createForwardRefComponent"],"mappings":";;;;;;;;;;;AAK6D,IAYvDA,KAAM,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAA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AA;QACEF,GAAG,EAAE,SAAAA,GAAAA,CAAAG,GAAG,EAAA;AAAA,UAAA,OAAKpB,MAAI,CAAChC,MAAM,GAAGoD,GAAG,CAAA;SAAC;AAC/BlB,QAAAA,SAAS,EAAEW,MAAM;AACjB5B,QAAAA,GAAG,EAAEA,GAAG;QACRM,MAAM,EAAE,IAAI,CAACpB,WAAW;AACxBmC,QAAAA,OAAO,EAAEA,OAAAA;AAAO,OAAA,EACZC,QAAQ,CACZ,CACH,CACG,CAAA;AAEV,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAjD,KAAA,CAAA;AAAA,CAlGiB0D,CAAAA,KAAK,CAACK,SAAiB,CAAA,CAAA;AAqG3C,YAAeC,yBAAyB,CAAChE,KAAK,CAAC;;;;"}
@@ -0,0 +1,4 @@
1
+ var undefined$1 = undefined;
2
+
3
+ export { undefined$1 as default };
4
+ //# sourceMappingURL=index.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,260 @@
1
+ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
2
+ import _createClass from '@babel/runtime/helpers/createClass';
3
+ import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
4
+ import _inherits from '@babel/runtime/helpers/inherits';
5
+ import _createSuper from '@babel/runtime/helpers/createSuper';
6
+ import './style/index.scss.js';
7
+ import classNames from 'classnames';
8
+ import React from 'react';
9
+ import { omit, createForwardRefComponent } from '../../utils/index.js';
10
+
11
+ function getTrueType(type, confirmType, password) {
12
+ if (confirmType === 'search') type = 'search';
13
+ if (password) type = 'password';
14
+ if (typeof type === 'undefined') {
15
+ return 'text';
16
+ }
17
+ if (!type) {
18
+ throw new Error('unexpected type');
19
+ }
20
+ if (type === 'digit') type = 'number';
21
+ return type;
22
+ }
23
+ function fixControlledValue(value) {
24
+ return value !== null && value !== void 0 ? value : '';
25
+ }
26
+ var Input = /*#__PURE__*/function (_React$Component) {
27
+ _inherits(Input, _React$Component);
28
+ var _super = _createSuper(Input);
29
+ function Input(props) {
30
+ var _this;
31
+ _classCallCheck(this, Input);
32
+ _this = _super.call(this, props);
33
+ _this.handleBeforeInput = function (e) {
34
+ if (!e.data) return;
35
+ var isNumber = e.data && /[0-9]/.test(e.data);
36
+ if (_this.props.type === 'number' && !isNumber) {
37
+ e.preventDefault();
38
+ }
39
+ if (_this.props.type === 'digit' && !isNumber) {
40
+ if (e.data !== '.' || e.data === '.' && e.target.value.indexOf('.') > -1) {
41
+ e.preventDefault();
42
+ }
43
+ }
44
+ };
45
+ _this.handleInput = _this.handleInput.bind(_assertThisInitialized(_this));
46
+ _this.handlePaste = _this.handlePaste.bind(_assertThisInitialized(_this));
47
+ _this.handleFocus = _this.handleFocus.bind(_assertThisInitialized(_this));
48
+ _this.handleBlur = _this.handleBlur.bind(_assertThisInitialized(_this));
49
+ _this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));
50
+ _this.handleComposition = _this.handleComposition.bind(_assertThisInitialized(_this));
51
+ _this.handleBeforeInput = _this.handleBeforeInput.bind(_assertThisInitialized(_this));
52
+ _this.isOnComposition = false;
53
+ _this.onInputExcuted = false;
54
+ return _this;
55
+ }
56
+ _createClass(Input, [{
57
+ key: "componentDidMount",
58
+ value: function componentDidMount() {
59
+ var _a, _b;
60
+ // 修复无法选择文件
61
+ if (this.props.type === 'file') {
62
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.addEventListener('change', this.handleInput);
63
+ } else {
64
+ (_b = this.inputRef) === null || _b === void 0 ? void 0 : _b.addEventListener('textInput', this.handleBeforeInput);
65
+ }
66
+ // 处理初始化是否 focus
67
+ if (this.props.focus && this.inputRef) this.inputRef.focus();
68
+ }
69
+ }, {
70
+ key: "componentWillUnmount",
71
+ value: function componentWillUnmount() {
72
+ var _a;
73
+ // 修复无法选择文件
74
+ if (this.props.type === 'file') {
75
+ this.inputRef.removeEventListener('change', this.handleInput);
76
+ } else {
77
+ (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('textInput', this.handleBeforeInput);
78
+ }
79
+ }
80
+ }, {
81
+ key: "UNSAFE_componentWillReceiveProps",
82
+ value: function UNSAFE_componentWillReceiveProps(nextProps) {
83
+ if (!this.props.focus && nextProps.focus && this.inputRef) this.inputRef.focus();
84
+ }
85
+ }, {
86
+ key: "handleInput",
87
+ value: function handleInput(e) {
88
+ e.stopPropagation();
89
+ var _this$props = this.props,
90
+ type = _this$props.type,
91
+ _this$props$maxlength = _this$props.maxlength,
92
+ maxlength = _this$props$maxlength === void 0 ? 140 : _this$props$maxlength,
93
+ _this$props$confirmTy = _this$props.confirmType,
94
+ confirmType = _this$props$confirmTy === void 0 ? 'done' : _this$props$confirmTy,
95
+ _this$props$password = _this$props.password,
96
+ password = _this$props$password === void 0 ? false : _this$props$password,
97
+ onInput = _this$props.onInput;
98
+ if (!this.isOnComposition && !this.onInputExcuted) {
99
+ var value = e.target.value;
100
+ var inputType = getTrueType(type, confirmType, password);
101
+ this.onInputExcuted = true;
102
+ /* 修复 number 类型 maxLength 无效 */
103
+ if (inputType === 'number' && value && maxlength <= value.length) {
104
+ value = value.substring(0, maxlength);
105
+ e.target.value = value;
106
+ }
107
+ Object.defineProperty(e, 'detail', {
108
+ value: {
109
+ value: value,
110
+ cursor: value.length
111
+ }
112
+ });
113
+ // // 修复 IOS 光标跳转问题
114
+ // if (!(['number', 'file'].indexOf(inputType) >= 0)) {
115
+ // const pos = e.target.selectionEnd
116
+ // setTimeout(
117
+ // () => {
118
+ // e.target.selectionStart = pos
119
+ // e.target.selectionEnd = pos
120
+ // }
121
+ // )
122
+ // }
123
+ typeof onInput === 'function' && onInput(e);
124
+ this.onInputExcuted = false;
125
+ }
126
+ }
127
+ }, {
128
+ key: "handlePaste",
129
+ value: function handlePaste(e) {
130
+ e.stopPropagation();
131
+ var onPaste = this.props.onPaste;
132
+ this.onInputExcuted = false;
133
+ Object.defineProperty(e, 'detail', {
134
+ value: {
135
+ value: e.target.value
136
+ }
137
+ });
138
+ typeof onPaste === 'function' && onPaste(e);
139
+ }
140
+ }, {
141
+ key: "handleFocus",
142
+ value: function handleFocus(e) {
143
+ e.stopPropagation();
144
+ var onFocus = this.props.onFocus;
145
+ this.onInputExcuted = false;
146
+ Object.defineProperty(e, 'detail', {
147
+ value: {
148
+ value: e.target.value
149
+ }
150
+ });
151
+ onFocus && onFocus(e);
152
+ }
153
+ }, {
154
+ key: "handleBlur",
155
+ value: function handleBlur(e) {
156
+ e.stopPropagation();
157
+ var onBlur = this.props.onBlur;
158
+ Object.defineProperty(e, 'detail', {
159
+ value: {
160
+ value: e.target.value
161
+ }
162
+ });
163
+ onBlur && onBlur(e);
164
+ }
165
+ }, {
166
+ key: "handleKeyDown",
167
+ value: function handleKeyDown(e) {
168
+ e.stopPropagation();
169
+ var _this$props2 = this.props,
170
+ onConfirm = _this$props2.onConfirm,
171
+ onKeyDown = _this$props2.onKeyDown;
172
+ var value = e.target.value;
173
+ var keyCode = e.keyCode || e.code;
174
+ this.onInputExcuted = false;
175
+ if (typeof onKeyDown === 'function') {
176
+ Object.defineProperty(e, 'detail', {
177
+ value: {
178
+ value: value,
179
+ cursor: value.length,
180
+ keyCode: keyCode
181
+ }
182
+ });
183
+ onKeyDown(e);
184
+ }
185
+ if (e.keyCode === 13 && typeof onConfirm === 'function') {
186
+ Object.defineProperty(e, 'detail', {
187
+ value: {
188
+ value: value
189
+ }
190
+ });
191
+ onConfirm(e);
192
+ }
193
+ }
194
+ }, {
195
+ key: "handleComposition",
196
+ value: function handleComposition(e) {
197
+ e.stopPropagation();
198
+ if (!(e.target instanceof HTMLInputElement)) return;
199
+ if (e.type === 'compositionend') {
200
+ this.isOnComposition = false;
201
+ this.handleInput(e);
202
+ } else {
203
+ this.isOnComposition = true;
204
+ }
205
+ }
206
+ }, {
207
+ key: "render",
208
+ value: function render() {
209
+ var _this2 = this;
210
+ var _this$props3 = this.props,
211
+ _this$props3$classNam = _this$props3.className,
212
+ className = _this$props3$classNam === void 0 ? '' : _this$props3$classNam,
213
+ placeholder = _this$props3.placeholder,
214
+ type = _this$props3.type,
215
+ _this$props3$password = _this$props3.password,
216
+ password = _this$props3$password === void 0 ? false : _this$props3$password,
217
+ _this$props3$disabled = _this$props3.disabled,
218
+ disabled = _this$props3$disabled === void 0 ? false : _this$props3$disabled,
219
+ _this$props3$maxlengt = _this$props3.maxlength,
220
+ maxlength = _this$props3$maxlengt === void 0 ? 140 : _this$props3$maxlengt,
221
+ _this$props3$confirmT = _this$props3.confirmType,
222
+ confirmType = _this$props3$confirmT === void 0 ? 'done' : _this$props3$confirmT,
223
+ name = _this$props3.name,
224
+ value = _this$props3.value;
225
+ var cls = classNames('taro-input-core', 'weui-input', className);
226
+ var otherProps = omit(this.props, ['className', 'placeholder', 'disabled', 'password', 'type', 'maxlength', 'confirmType', 'focus', 'name']);
227
+ if ('value' in this.props) {
228
+ otherProps.value = fixControlledValue(value);
229
+ }
230
+ return React.createElement("input", Object.assign({
231
+ ref: function ref(input) {
232
+ _this2.inputRef = input;
233
+ if (_this2.props.forwardedRef) {
234
+ _this2.props.forwardedRef.current = input;
235
+ }
236
+ }
237
+ }, otherProps, {
238
+ className: cls,
239
+ type: getTrueType(type, confirmType, password),
240
+ placeholder: placeholder,
241
+ disabled: disabled,
242
+ maxLength: maxlength,
243
+ name: name,
244
+ onInput: this.handleInput,
245
+ onPaste: this.handlePaste,
246
+ onFocus: this.handleFocus,
247
+ onBlur: this.handleBlur,
248
+ onKeyDown: this.handleKeyDown,
249
+ onCompositionStart: this.handleComposition,
250
+ onCompositionEnd: this.handleComposition,
251
+ onBeforeInput: this.handleBeforeInput
252
+ }));
253
+ }
254
+ }]);
255
+ return Input;
256
+ }(React.Component);
257
+ var index = createForwardRefComponent(Input);
258
+
259
+ export { index as default };
260
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/input/index.tsx"],"sourcesContent":["import './style/index.scss'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport { createForwardRefComponent, omit } from '../../utils'\n\nfunction getTrueType (type: string | undefined, confirmType: string, password: boolean) {\n if (confirmType === 'search') type = 'search'\n if (password) type = 'password'\n if (typeof type === 'undefined') {\n return 'text'\n }\n if (!type) {\n throw new Error('unexpected type')\n }\n if (type === 'digit') type = 'number'\n\n return type\n}\n\nfunction fixControlledValue (value) {\n return value ?? ''\n}\n\ninterface IProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n password?: boolean\n disabled?: boolean\n maxlength?: number\n placeholder?: string\n value?: string\n focus?: boolean\n confirmType?: string\n name?: string\n type?: string\n forwardedRef?: React.MutableRefObject<HTMLInputElement>\n onConfirm?: (e) => void\n}\n\nclass Input extends React.Component<IProps, null> {\n constructor (props) {\n super(props)\n this.handleInput = this.handleInput.bind(this)\n this.handlePaste = this.handlePaste.bind(this)\n this.handleFocus = this.handleFocus.bind(this)\n this.handleBlur = this.handleBlur.bind(this)\n this.handleKeyDown = this.handleKeyDown.bind(this)\n this.handleComposition = this.handleComposition.bind(this)\n this.handleBeforeInput = this.handleBeforeInput.bind(this)\n this.isOnComposition = false\n this.onInputExcuted = false\n }\n\n inputRef: HTMLInputElement\n isOnComposition: boolean\n onInputExcuted: boolean\n\n componentDidMount () {\n // 修复无法选择文件\n if (this.props.type === 'file') {\n this.inputRef?.addEventListener('change', this.handleInput)\n } else {\n this.inputRef?.addEventListener('textInput', this.handleBeforeInput)\n }\n\n // 处理初始化是否 focus\n if (this.props.focus && this.inputRef) this.inputRef.focus()\n }\n\n\n componentWillUnmount () {\n // 修复无法选择文件\n if (this.props.type === 'file') {\n this.inputRef.removeEventListener('change', this.handleInput)\n } else {\n this.inputRef?.removeEventListener('textInput', this.handleBeforeInput)\n }\n }\n\n UNSAFE_componentWillReceiveProps (nextProps: Readonly<IProps>) {\n if (!this.props.focus && nextProps.focus && this.inputRef) this.inputRef.focus()\n }\n\n\n handleInput (e) {\n e.stopPropagation()\n const {\n type,\n maxlength = 140,\n confirmType = 'done',\n password = false,\n onInput\n } = this.props\n\n if (!this.isOnComposition && !this.onInputExcuted) {\n let { value } = e.target\n const inputType = getTrueType(type, confirmType, password)\n this.onInputExcuted = true\n /* 修复 number 类型 maxLength 无效 */\n if (inputType === 'number' && value && maxlength <= value.length) {\n value = value.substring(0, maxlength)\n e.target.value = value\n }\n\n Object.defineProperty(e, 'detail', {\n value: { value, cursor: value.length }\n })\n // // 修复 IOS 光标跳转问题\n // if (!(['number', 'file'].indexOf(inputType) >= 0)) {\n // const pos = e.target.selectionEnd\n // setTimeout(\n // () => {\n // e.target.selectionStart = pos\n // e.target.selectionEnd = pos\n // }\n // )\n // }\n\n typeof onInput === 'function' && onInput(e)\n this.onInputExcuted = false\n }\n }\n\n\n handlePaste (e) {\n e.stopPropagation()\n const { onPaste } = this.props\n this.onInputExcuted = false\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n typeof onPaste === 'function' && onPaste(e)\n }\n\n handleFocus (e) {\n e.stopPropagation()\n const { onFocus } = this.props\n this.onInputExcuted = false\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n onFocus && onFocus(e)\n }\n\n handleBlur (e) {\n e.stopPropagation()\n const { onBlur } = this.props\n Object.defineProperty(e, 'detail', {\n value: {\n value: e.target.value\n }\n })\n onBlur && onBlur(e)\n }\n\n handleKeyDown (e) {\n e.stopPropagation()\n const { onConfirm, onKeyDown } = this.props\n const { value } = e.target\n const keyCode = e.keyCode || e.code\n this.onInputExcuted = false\n\n if (typeof onKeyDown === 'function') {\n Object.defineProperty(e, 'detail', {\n value: {\n value,\n cursor: value.length,\n keyCode\n }\n })\n onKeyDown(e)\n }\n\n if (e.keyCode === 13 && typeof onConfirm === 'function') {\n Object.defineProperty(e, 'detail', {\n value: {\n value\n }\n })\n onConfirm(e)\n }\n }\n\n handleComposition (e) {\n e.stopPropagation()\n if (!(e.target instanceof HTMLInputElement)) return\n\n if (e.type === 'compositionend') {\n this.isOnComposition = false\n this.handleInput(e)\n } else {\n this.isOnComposition = true\n }\n }\n\n handleBeforeInput = (e) => {\n if (!e.data) return\n const isNumber = e.data && /[0-9]/.test(e.data)\n if (this.props.type === 'number' && !isNumber) {\n e.preventDefault()\n }\n if (this.props.type === 'digit' && !isNumber) {\n if (e.data !== '.' || (e.data === '.' && e.target.value.indexOf('.') > -1)) {\n e.preventDefault()\n }\n }\n }\n\n render () {\n const {\n className = '',\n placeholder,\n type,\n password = false,\n disabled = false,\n maxlength = 140,\n confirmType = 'done',\n name,\n value\n } = this.props\n const cls = classNames('taro-input-core', 'weui-input', className)\n\n const otherProps = omit(this.props, [\n 'className',\n 'placeholder',\n 'disabled',\n 'password',\n 'type',\n 'maxlength',\n 'confirmType',\n 'focus',\n 'name'\n ])\n\n if ('value' in this.props) {\n otherProps.value = fixControlledValue(value)\n }\n\n return (\n <input\n ref={(input: HTMLInputElement) => {\n this.inputRef = input\n if (this.props.forwardedRef) {\n this.props.forwardedRef.current = input\n }\n }}\n {...otherProps}\n className={cls}\n type={getTrueType(type, confirmType, password)}\n placeholder={placeholder}\n disabled={disabled}\n maxLength={maxlength}\n name={name}\n onInput={this.handleInput}\n onPaste={this.handlePaste}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onKeyDown={this.handleKeyDown}\n onCompositionStart={this.handleComposition}\n onCompositionEnd={this.handleComposition}\n onBeforeInput={this.handleBeforeInput}\n />\n )\n }\n}\n\nexport default createForwardRefComponent(Input)\n"],"names":["getTrueType","type","confirmType","password","Error","fixControlledValue","value","Input","_React$Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","handleBeforeInput","e","data","isNumber","test","preventDefault","target","indexOf","handleInput","bind","_assertThisInitialized","handlePaste","handleFocus","handleBlur","handleKeyDown","handleComposition","isOnComposition","onInputExcuted","_createClass","key","componentDidMount","_a","inputRef","addEventListener","_b","focus","componentWillUnmount","removeEventListener","UNSAFE_componentWillReceiveProps","nextProps","stopPropagation","_this$props","_this$props$maxlength","maxlength","_this$props$confirmTy","_this$props$password","onInput","inputType","length","substring","Object","defineProperty","cursor","onPaste","onFocus","onBlur","_this$props2","onConfirm","onKeyDown","keyCode","code","HTMLInputElement","render","_this2","_this$props3","_this$props3$classNam","className","placeholder","_this$props3$password","_this$props3$disabled","disabled","_this$props3$maxlengt","_this$props3$confirmT","name","cls","classNames","otherProps","omit","React","createElement","assign","ref","input","forwardedRef","current","maxLength","onCompositionStart","onCompositionEnd","onBeforeInput","Component","createForwardRefComponent"],"mappings":";;;;;;;;;;AAOA,SAASA,WAAWA,CAAEC,IAAwB,EAAEC,WAAmB,EAAEC,QAAiB,EAAA;AACpF,EAAA,IAAID,WAAW,KAAK,QAAQ,EAAED,IAAI,GAAG,QAAQ,CAAA;AAC7C,EAAA,IAAIE,QAAQ,EAAEF,IAAI,GAAG,UAAU,CAAA;AAC/B,EAAA,IAAI,OAAOA,IAAI,KAAK,WAAW,EAAE;AAC/B,IAAA,OAAO,MAAM,CAAA;AACd,GAAA;EACD,IAAI,CAACA,IAAI,EAAE;AACT,IAAA,MAAM,IAAIG,KAAK,CAAC,iBAAiB,CAAC,CAAA;AACnC,GAAA;AACD,EAAA,IAAIH,IAAI,KAAK,OAAO,EAAEA,IAAI,GAAG,QAAQ,CAAA;AAErC,EAAA,OAAOA,IAAI,CAAA;AACb,CAAA;AAEA,SAASI,kBAAkBA,CAAEC,KAAK,EAAA;EAChC,OAAOA,KAAK,KAAL,IAAA,IAAAA,KAAK,cAALA,KAAK,GAAI,EAAE,CAAA;AACpB,CAAA;AAAC,IAgBKC,KAAM,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,KAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,KAAA,CAAA,CAAA;EACV,SAAAA,KAAAA,CAAaK,KAAK,EAAA;AAAA,IAAA,IAAAC,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C9CsE,QAAAA,WAAW,EAAEA,WAAW;AACxBG,QAAAA,QAAQ,EAAEA,QAAQ;AAClBe,QAAAA,SAAS,EAAE1C,SAAS;AACpB8B,QAAAA,IAAI,EAAEA,IAAI;QACV3B,OAAO,EAAE,IAAI,CAAC5B,WAAW;QACzBmC,OAAO,EAAE,IAAI,CAAChC,WAAW;QACzBiC,OAAO,EAAE,IAAI,CAAChC,WAAW;QACzBiC,MAAM,EAAE,IAAI,CAAChC,UAAU;QACvBmC,SAAS,EAAE,IAAI,CAAClC,aAAa;QAC7B8D,kBAAkB,EAAE,IAAI,CAAC7D,iBAAiB;QAC1C8D,gBAAgB,EAAE,IAAI,CAAC9D,iBAAiB;QACxC+D,aAAa,EAAE,IAAI,CAAC9E,iBAAAA;AAAiB,OAAA,CAAA,CACrC,CAAA;AAEN,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAT,KAAA,CAAA;AAAA,CApOiB6E,CAAAA,KAAK,CAACW,SAAuB,CAAA,CAAA;AAuOjD,YAAeC,yBAAyB,CAACzF,KAAK,CAAC;;;;"}
@@ -0,0 +1,4 @@
1
+ var undefined$1 = undefined;
2
+
3
+ export { undefined$1 as default };
4
+ //# sourceMappingURL=index.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}