@tarojs/components-react 3.3.14 → 3.5.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image/index.js +3 -8
- package/dist/image/index.js.map +1 -1
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/dist/pull-down-refresh/index.js +6 -11
- package/dist/pull-down-refresh/index.js.map +1 -1
- package/dist/scroll-view/index.js +3 -8
- package/dist/scroll-view/index.js.map +1 -1
- package/dist/swiper/index.js +153 -158
- package/dist/swiper/index.js.map +1 -1
- package/dist/text/index.js +3 -8
- package/dist/text/index.js.map +1 -1
- package/dist/view/index.js +3 -8
- package/dist/view/index.js.map +1 -1
- package/package.json +5 -5
package/dist/text/index.js
CHANGED
|
@@ -3,11 +3,10 @@ import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProper
|
|
|
3
3
|
import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
4
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
5
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
6
|
-
import
|
|
7
|
-
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
8
|
-
import { s as styleInject, c as classNames } from '../index.js';
|
|
6
|
+
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
9
7
|
import '../weui.js';
|
|
10
8
|
import React from 'react';
|
|
9
|
+
import { s as styleInject, c as classNames } from '../index.js';
|
|
11
10
|
import '@babel/runtime/helpers/typeof';
|
|
12
11
|
|
|
13
12
|
var css_248z = ".taro-text {\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.taro-text__selectable {\n -moz-user-select: text;\n -webkit-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n";
|
|
@@ -15,10 +14,6 @@ styleInject(css_248z,{"insertAt":"top"});
|
|
|
15
14
|
|
|
16
15
|
var _excluded = ["className", "selectable"];
|
|
17
16
|
|
|
18
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
-
|
|
20
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
|
-
|
|
22
17
|
var Text = /*#__PURE__*/function (_React$Component) {
|
|
23
18
|
_inherits(Text, _React$Component);
|
|
24
19
|
|
|
@@ -51,5 +46,5 @@ var Text = /*#__PURE__*/function (_React$Component) {
|
|
|
51
46
|
return Text;
|
|
52
47
|
}(React.Component);
|
|
53
48
|
|
|
54
|
-
export default
|
|
49
|
+
export { Text as default };
|
|
55
50
|
//# sourceMappingURL=index.js.map
|
package/dist/text/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/text/index.tsx"],"sourcesContent":["import 'weui'\nimport React from 'react'\nimport classNames from 'classnames'\nimport './style/index.css'\n\ninterface IProps {\n className?: string\n selectable?: boolean\n}\n\nclass Text extends React.Component<IProps, Record<string, unknown>> {\n render () {\n const { className, selectable = false, ...restProps } = this.props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls}>\n {this.props.children}\n </span>\n )\n }\n}\n\nexport default Text\n"],"names":["Text","props","className","selectable","restProps","cls","classNames","React","children","Component"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/text/index.tsx"],"sourcesContent":["import 'weui'\nimport React from 'react'\nimport classNames from 'classnames'\nimport './style/index.css'\n\ninterface IProps {\n className?: string\n selectable?: boolean\n}\n\nclass Text extends React.Component<IProps, Record<string, unknown>> {\n render () {\n const { className, selectable = false, ...restProps } = this.props\n const cls = classNames(\n 'taro-text',\n {\n 'taro-text__selectable': selectable\n },\n className\n )\n return (\n <span {...restProps} className={cls}>\n {this.props.children}\n </span>\n )\n }\n}\n\nexport default Text\n"],"names":["Text","props","className","selectable","restProps","cls","classNames","React","children","Component"],"mappings":";;;;;;;;;;;;;;;;IAUMA;;;;;;;;;;;;;WACJ;AACE,wBAAwD,KAAKC,KAA7D;AAAA,UAAQC,SAAR,eAAQA,SAAR;AAAA,8CAAmBC,UAAnB;AAAA,UAAmBA,UAAnB,sCAAgC,KAAhC;AAAA,UAA0CC,SAA1C;;AACA,UAAMC,GAAG,GAAGC,UAAU,CACpB,WADoB,EAEpB;AACE,iCAAyBH;AAD3B,OAFoB,EAKpBD,SALoB,CAAtB;AAOA,aACEK,mBAAA,OAAA,kCAAUH,SAAV;AAAqBF,QAAAA,SAAS,EAAEG;AAAhC,UACG,KAAKJ,KAAL,CAAWO,QADd,CADF;AAKD;;;;EAfgBD,KAAK,CAACE;;;;"}
|
package/dist/view/index.js
CHANGED
|
@@ -4,12 +4,11 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
|
|
|
4
4
|
import _createClass from '@babel/runtime/helpers/createClass';
|
|
5
5
|
import _assertThisInitialized from '@babel/runtime/helpers/assertThisInitialized';
|
|
6
6
|
import _inherits from '@babel/runtime/helpers/inherits';
|
|
7
|
-
import
|
|
8
|
-
import _getPrototypeOf from '@babel/runtime/helpers/getPrototypeOf';
|
|
7
|
+
import _createSuper from '@babel/runtime/helpers/createSuper';
|
|
9
8
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
10
|
-
import { s as styleInject, c as classNames } from '../index.js';
|
|
11
9
|
import '../weui.js';
|
|
12
10
|
import React from 'react';
|
|
11
|
+
import { s as styleInject, c as classNames } from '../index.js';
|
|
13
12
|
import '@babel/runtime/helpers/typeof';
|
|
14
13
|
|
|
15
14
|
var css_248z = "body, html{\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n";
|
|
@@ -17,10 +16,6 @@ styleInject(css_248z,{"insertAt":"top"});
|
|
|
17
16
|
|
|
18
17
|
var _excluded = ["hoverClass", "onTouchStart", "onTouchEnd", "onTouchMove", "className", "hoverStartTime", "hoverStayTime"];
|
|
19
18
|
|
|
20
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
21
|
-
|
|
22
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
-
|
|
24
19
|
var View = /*#__PURE__*/function (_React$Component) {
|
|
25
20
|
_inherits(View, _React$Component);
|
|
26
21
|
|
|
@@ -142,5 +137,5 @@ var View = /*#__PURE__*/function (_React$Component) {
|
|
|
142
137
|
return View;
|
|
143
138
|
}(React.Component);
|
|
144
139
|
|
|
145
|
-
export default
|
|
140
|
+
export { View as default };
|
|
146
141
|
//# sourceMappingURL=index.js.map
|
package/dist/view/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/view/index.tsx"],"sourcesContent":["import 'weui'\nimport React from 'react'\nimport classNames from 'classnames'\nimport './style/index.css'\n\ninterface IProps {\n hoverClass?: string\n className?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart? (e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd? (e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove? (e: React.TouchEvent<HTMLDivElement>): void\n onLongPress? (): void\n}\n\ninterface IState {\n hover: boolean\n touch: boolean\n}\n\nclass View extends React.Component<IProps, IState> {\n state = {\n hover: false,\n touch: false\n }\n\n timeoutEvent:
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/view/index.tsx"],"sourcesContent":["import 'weui'\nimport React from 'react'\nimport classNames from 'classnames'\nimport './style/index.css'\n\ninterface IProps {\n hoverClass?: string\n className?: string\n hoverStartTime?: number\n hoverStayTime?: number\n onTouchStart? (e: React.TouchEvent<HTMLDivElement>): void\n onTouchEnd? (e: React.TouchEvent<HTMLDivElement>): void\n onTouchMove? (e: React.TouchEvent<HTMLDivElement>): void\n onLongPress? (): void\n}\n\ninterface IState {\n hover: boolean\n touch: boolean\n}\n\nclass View extends React.Component<IProps, IState> {\n state = {\n hover: false,\n touch: false\n }\n\n timeoutEvent: number;\n startTime = 0;\n\n render () {\n const {\n hoverClass,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n className,\n hoverStartTime = 50,\n hoverStayTime = 400,\n ...other\n } = this.props\n\n const cls = classNames(\n '',\n {\n [`${hoverClass}`]: this.state.hover\n },\n className\n )\n\n const _onTouchStart = e => {\n if (hoverClass) {\n this.setState(() => ({\n touch: true\n }))\n setTimeout(() => {\n if (this.state.touch) {\n this.setState(() => ({\n hover: true\n }))\n }\n }, hoverStartTime)\n }\n onTouchStart && onTouchStart(e)\n if (this.props.onLongPress) {\n this.timeoutEvent = setTimeout(() => {\n this.props.onLongPress!()\n }, 350)\n this.startTime = (new Date()).getTime()\n }\n }\n\n const _onTouchMove = e => {\n clearTimeout(this.timeoutEvent)\n onTouchMove && onTouchMove(e)\n }\n\n const _onTouchEnd = e => {\n const spanTime = (new Date().getTime()) - this.startTime\n if (spanTime < 350) {\n clearTimeout(this.timeoutEvent)\n }\n if (hoverClass) {\n this.setState(() => ({\n touch: false\n }))\n 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 <div\n {...other}\n className={cls}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default View\n"],"names":["View","hover","touch","props","hoverClass","onTouchStart","onTouchEnd","onTouchMove","className","hoverStartTime","hoverStayTime","other","cls","classNames","state","_onTouchStart","e","setState","setTimeout","onLongPress","timeoutEvent","startTime","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","React","children","Component"],"mappings":";;;;;;;;;;;;;;;;;;IAqBMA;;;;;;;;;;;;;;;;4DACI;AACNC,MAAAA,KAAK,EAAE,KADD;AAENC,MAAAA,KAAK,EAAE;AAFD;;;;gEAMI;;;;;;;WAEZ;;;AACE,wBASI,KAAKC,KATT;AAAA,UACEC,UADF,eACEA,UADF;AAAA,UAEEC,YAFF,eAEEA,YAFF;AAAA,UAGEC,UAHF,eAGEA,UAHF;AAAA,UAIEC,WAJF,eAIEA,WAJF;AAAA,UAKEC,SALF,eAKEA,SALF;AAAA,8CAMEC,cANF;AAAA,UAMEA,cANF,sCAMmB,EANnB;AAAA,8CAOEC,aAPF;AAAA,UAOEA,aAPF,sCAOkB,GAPlB;AAAA,UAQKC,KARL;;AAWA,UAAMC,GAAG,GAAGC,UAAU,CACpB,EADoB,gCAGdT,UAHc,GAGC,KAAKU,KAAL,CAAWb,KAHZ,GAKpBO,SALoB,CAAtB;;AAQA,UAAMO,aAAa,GAAG,SAAhBA,aAAgB,CAAAC,CAAC;AACrB,YAAIZ,UAAJ,EAAgB;AACd,UAAA,MAAI,CAACa,QAAL,CAAc;AAAA,mBAAO;AACnBf,cAAAA,KAAK,EAAE;AADY,aAAP;AAAA,WAAd;;AAGAgB,UAAAA,UAAU,CAAC;AACT,gBAAI,MAAI,CAACJ,KAAL,CAAWZ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S,aANO,CAAV;AAOD;;AACDJ,QAAAA,UAAU,IAAIA,UAAU,CAACU,CAAD,CAAxB;AACD,OAlBD;;AAoBA,aACEY,mBAAA,MAAA,kCACMjB,KADN;AAEEH,QAAAA,SAAS,EAAEI,GAFb;AAGEP,QAAAA,YAAY,EAAEU,aAHhB;AAIET,QAAAA,UAAU,EAAEoB,WAJd;AAKEnB,QAAAA,WAAW,EAAEiB;AALf,UAOG,KAAKrB,KAAL,CAAW0B,QAPd,CADF;AAWD;;;;EAvFgBD,KAAK,CAACE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-canary.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"author": "",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "^7.
|
|
27
|
-
"@tarojs/taro": "3.
|
|
28
|
-
"@tarojs/taro-h5": "3.
|
|
26
|
+
"@babel/runtime": "^7.14.5",
|
|
27
|
+
"@tarojs/taro": "3.5.0-canary.0",
|
|
28
|
+
"@tarojs/taro-h5": "3.5.0-canary.0",
|
|
29
29
|
"better-scroll": "^1.14.1",
|
|
30
30
|
"classnames": "^2.2.5",
|
|
31
31
|
"intersection-observer": "^0.7.0",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"swiper": "6.8.0",
|
|
34
34
|
"weui": "^1.1.2"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "a0222bc41bc05b0e34413d6db3de963d777a5015"
|
|
37
37
|
}
|