@tarojs/components-react 3.7.0-canary.6 → 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 (60) 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 -7
  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 -3
  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 +5 -4
  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 -21
  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 -6
  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 -5
  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 +4 -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 +21 -16
  44. package/dist/components/image/style/index.js +0 -8
  45. package/dist/components/image/style/index.js.map +0 -1
  46. package/dist/components/pull-down-refresh/style/index.js +0 -8
  47. package/dist/components/pull-down-refresh/style/index.js.map +0 -1
  48. package/dist/components/scroll-view/style/index.js +0 -8
  49. package/dist/components/scroll-view/style/index.js.map +0 -1
  50. package/dist/components/swiper/style/index.js +0 -8
  51. package/dist/components/swiper/style/index.js.map +0 -1
  52. package/dist/components/text/style/index.js +0 -8
  53. package/dist/components/text/style/index.js.map +0 -1
  54. package/dist/components/view/style/index.js +0 -8
  55. package/dist/components/view/style/index.js.map +0 -1
  56. package/dist/node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +0 -27
  57. package/dist/node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js.map +0 -1
  58. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js +0 -446
  59. package/dist/node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js.map +0 -1
  60. package/types/index.d.ts +0 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/text/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLSpanElement> {\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","_React$Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_a","props","className","_a$selectable","selectable","restProps","__rest","cls","classNames","React","createElement","Object","assign","children","Component"],"mappings":";;;;;;;;;;AAUMA,IAAAA,IAAK,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA,CAAA,CAAA;AAAA,EAAA,SAAAA,IAAA,GAAA;AAAAK,IAAAA,eAAA,OAAAL,IAAA,CAAA,CAAA;AAAA,IAAA,OAAAG,MAAA,CAAAG,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA,GAAA;AAAAC,EAAAA,YAAA,CAAAR,IAAA,EAAA,CAAA;IAAAS,GAAA,EAAA,QAAA;IAAAC,KAAA,EACT,SAAAC,MAAAA,GAAM;AACE,MAAA,IAAAC,KAAkD,IAAI,CAACC,KAAK;QAA1DC,SAAS,GAAiDF,EAAA,CAA1DE,SAAS;QAAAC,aAAA,GAAiDH,EAAA,CAA/CI,UAAU;AAAVA,QAAAA,UAAU,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;QAAKE,SAAS,GAA7CC,MAAA,CAAAN,EAAA,EAAA,CAAA,WAAA,EAAA,YAAA,CAA+C,CAAa,CAAA;AAClE,MAAA,IAAMO,GAAG,GAAGC,UAAU,CACpB,WAAW,EACX;AACE,QAAA,uBAAuB,EAAEJ,UAAAA;OAC1B,EACDF,SAAS,CACV,CAAA;AACD,MAAA,OACEO,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EAAUP,SAAS,EAAA;AAAEH,QAAAA,SAAS,EAAEK,GAAAA;AAC7B,OAAA,CAAA,EAAA,IAAI,CAACN,KAAK,CAACY,QAAQ,CACf,CAAA;AAEX,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAzB,IAAA,CAAA;AAAA,CAfgBqB,CAAAA,KAAK,CAACK,SAA0C;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/text/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<HTMLSpanElement> {\n selectable?: boolean\n forwardedRef?: React.MutableRefObject<HTMLSpanElement>\n}\n\nclass Text extends React.Component<IProps, Record<string, unknown>> {\n render () {\n const { className, forwardedRef, 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} ref={forwardedRef}>\n {this.props.children}\n </span>\n )\n }\n}\n\nexport default createForwardRefComponent(Text)\n"],"names":["Text","_React$Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","render","_a","props","className","forwardedRef","_a$selectable","selectable","restProps","__rest","cls","classNames","React","createElement","Object","assign","ref","children","Component","createForwardRefComponent"],"mappings":";;;;;;;;;;AAK6D,IAOvDA,IAAK,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA,CAAA,CAAA;AAAA,EAAA,SAAAA,IAAA,GAAA;AAAAK,IAAAA,eAAA,OAAAL,IAAA,CAAA,CAAA;AAAA,IAAA,OAAAG,MAAA,CAAAG,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA,CAAA;AAAA,GAAA;AAAAC,EAAAA,YAAA,CAAAR,IAAA,EAAA,CAAA;IAAAS,GAAA,EAAA,QAAA;IAAAC,KAAA,EACT,SAAAC,MAAAA,GAAM;AACE,MAAA,IAAAC,KAAgE,IAAI,CAACC,KAAK;QAAxEC,SAAS,GAA+DF,EAAA,CAAxEE,SAAS;QAAEC,YAAY,GAAiDH,EAAA,CAA7DG,YAAY;QAAAC,aAAA,GAAiDJ,EAAA,CAA/CK,UAAU;AAAVA,QAAAA,UAAU,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,aAAA;AAAKE,QAAAA,SAAS,GAA3DC,MAAA,CAAAP,EAAA,EAAA,CAAA,WAAA,EAAA,cAAA,EAAA,YAAA,CAA6D,CAAa,CAAA;AAChF,MAAA,IAAMQ,GAAG,GAAGC,UAAU,CACpB,WAAW,EACX;AACE,QAAA,uBAAuB,EAAEJ,UAAAA;OAC1B,EACDH,SAAS,CACV,CAAA;AACD,MAAA,OACEQ,KAAU,CAAAC,aAAA,CAAA,MAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EAAAP,SAAS;AAAEJ,QAAAA,SAAS,EAAEM,GAAG;AAAEM,QAAAA,GAAG,EAAEX,YAAAA;AAAY,OAAA,CAAA,EACnD,IAAI,CAACF,KAAK,CAACc,QAAQ,CACf,CAAA;AAEX,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAA3B,IAAA,CAAA;AAAA,CAfgBsB,CAAAA,KAAK,CAACM,SAA0C,CAAA,CAAA;AAkBnE,YAAeC,yBAAyB,CAAC7B,IAAI,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":";;;;"}
@@ -3,11 +3,11 @@ import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
3
3
  import _createClass from '@babel/runtime/helpers/createClass';
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';
8
- import './style/index.js';
6
+ import { __rest } from 'tslib';
7
+ import './style/index.css.js';
9
8
  import classNames from 'classnames';
10
9
  import React from 'react';
10
+ import { createForwardRefComponent } from '../../utils/index.js';
11
11
 
12
12
  var View = /*#__PURE__*/function (_React$Component) {
13
13
  _inherits(View, _React$Component);
@@ -37,7 +37,8 @@ var View = /*#__PURE__*/function (_React$Component) {
37
37
  hoverStartTime = _a$hoverStartTime === void 0 ? 50 : _a$hoverStartTime,
38
38
  _a$hoverStayTime = _a.hoverStayTime,
39
39
  hoverStayTime = _a$hoverStayTime === void 0 ? 400 : _a$hoverStayTime,
40
- other = __rest(_a, ["className", "hoverClass", "onTouchStart", "onTouchEnd", "onTouchMove", "hoverStartTime", "hoverStayTime"]);
40
+ forwardedRef = _a.forwardedRef,
41
+ other = __rest(_a, ["className", "hoverClass", "onTouchStart", "onTouchEnd", "onTouchMove", "hoverStartTime", "hoverStayTime", "forwardedRef"]);
41
42
  var cls = classNames('', _defineProperty({}, "".concat(hoverClass), this.state.hover), className);
42
43
  var _onTouchStart = function _onTouchStart(e) {
43
44
  if (hoverClass) {
@@ -92,6 +93,7 @@ var View = /*#__PURE__*/function (_React$Component) {
92
93
  onTouchEnd && onTouchEnd(e);
93
94
  };
94
95
  return React.createElement("div", Object.assign({
96
+ ref: forwardedRef,
95
97
  className: cls,
96
98
  onTouchStart: _onTouchStart,
97
99
  onTouchEnd: _onTouchEnd,
@@ -101,6 +103,7 @@ var View = /*#__PURE__*/function (_React$Component) {
101
103
  }]);
102
104
  return View;
103
105
  }(React.Component);
106
+ var index = createForwardRefComponent(View);
104
107
 
105
- export { View as default };
108
+ export { index as default };
106
109
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/view/index.tsx"],"sourcesContent":["import 'weui'\nimport './style/index.css'\n\nimport classNames from 'classnames'\nimport React from 'react'\n\ninterface IProps extends React.HTMLAttributes<HTMLDivElement> {\n hoverClass?: 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: ReturnType<typeof setTimeout>\n startTime = 0\n\n render () {\n const {\n className,\n hoverClass,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\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 className={cls}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default View\n"],"names":["View","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","state","hover","touch","startTime","_createClass","key","value","render","_this2","_a","props","className","hoverClass","onTouchStart","onTouchEnd","onTouchMove","_a$hoverStartTime","hoverStartTime","_a$hoverStayTime","hoverStayTime","other","__rest","cls","classNames","_defineProperty","concat","_onTouchStart","e","setState","setTimeout","onLongPress","timeoutEvent","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","React","createElement","Object","assign","children","Component"],"mappings":";;;;;;;;;;;AAqBMA,IAAAA,IAAK,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA,CAAA,CAAA;AAAX,EAAA,SAAAA,OAAA;AAAA,IAAA,IAAAK,KAAA,CAAA;AAAAC,IAAAA,eAAA,OAAAN,IAAA,CAAA,CAAA;;IACEK,KAAA,CAAAE,KAAK,GAAG;AACNC,MAAAA,KAAK,EAAE,KAAK;AACZC,MAAAA,KAAK,EAAE,KAAA;KACR,CAAA;IAGDJ,KAAA,CAASK,SAAA,GAAG,CAAC,CAAA;AAAA,IAAA,OAAAL,KAAA,CAAA;AAiFf,GAAA;AAACM,EAAAA,YAAA,CAAAX,IAAA,EAAA,CAAA;IAAAY,GAAA,EAAA,QAAA;IAAAC,KAAA,EA/EC,SAAAC,MAAAA,GAAM;AAAA,MAAA,IAAAC,MAAA,GAAA,IAAA,CAAA;AACE,MAAA,IAAAC,EASF,GAAA,IAAI,CAACC,KAAK;QARZC,SAAS,GAMUF,EAEP,CARZE,SAAS;QACTC,UAAU,GAKSH,EAEP,CAPZG,UAAU;QACVC,YAAY,GAIOJ,EAEP,CANZI,YAAY;QACZC,UAAU,GAGSL,EAEP,CALZK,UAAU;QACVC,WAAW,GAEQN,EAEP,CAJZM,WAAW;QAAAC,iBAAA,GAEQP,EAEP,CAHZQ,cAAc;AAAdA,QAAAA,cAAc,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,iBAAA;QAAAE,gBAAA,GACAT,EAEP,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A;OACT,EAAAd,KAAK,CAER,EAAA,IAAI,CAACV,KAAK,CAACgC,QAAQ,CAChB,CAAA;AAEV,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAjD,IAAA,CAAA;AAAA,CAvFgB6C,CAAAA,KAAK,CAACK,SAAyB;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/view/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 hoverClass?: string\n hoverStartTime?: number\n hoverStayTime?: number\n forwardedRef?: React.MutableRefObject<HTMLDivElement>\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: ReturnType<typeof setTimeout>\n startTime = 0\n\n render () {\n const {\n className,\n hoverClass,\n onTouchStart,\n onTouchEnd,\n onTouchMove,\n hoverStartTime = 50,\n hoverStayTime = 400,\n forwardedRef,\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 ref={forwardedRef}\n className={cls}\n onTouchStart={_onTouchStart}\n onTouchEnd={_onTouchEnd}\n onTouchMove={_onTouchMove}\n {...other}\n >\n {this.props.children}\n </div>\n )\n }\n}\n\nexport default createForwardRefComponent(View)\n"],"names":["View","_React$Component","_inherits","_super","_createSuper","_this","_classCallCheck","state","hover","touch","startTime","_createClass","key","value","render","_this2","_a","props","className","hoverClass","onTouchStart","onTouchEnd","onTouchMove","_a$hoverStartTime","hoverStartTime","_a$hoverStayTime","hoverStayTime","forwardedRef","other","__rest","cls","classNames","_defineProperty","concat","_onTouchStart","e","setState","setTimeout","onLongPress","timeoutEvent","Date","getTime","_onTouchMove","clearTimeout","_onTouchEnd","spanTime","React","createElement","Object","assign","ref","children","Component","createForwardRefComponent"],"mappings":";;;;;;;;;;;AAK6D,IAkBvDA,IAAK,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,IAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,IAAA,CAAA,CAAA;AAAX,EAAA,SAAAA,OAAA;AAAA,IAAA,IAAAK,KAAA,CAAA;AAAAC,IAAAA,eAAA,OAAAN,IAAA,CAAA,CAAA;;IACEK,KAAA,CAAAE,KAAK,GAAG;AACNC,MAAAA,KAAK,EAAE,KAAK;AACZC,MAAAA,KAAK,EAAE,KAAA;KACR,CAAA;IAGDJ,KAAA,CAASK,SAAA,GAAG,CAAC,CAAA;AAAA,IAAA,OAAAL,KAAA,CAAA;AAmFf,GAAA;AAACM,EAAAA,YAAA,CAAAX,IAAA,EAAA,CAAA;IAAAY,GAAA,EAAA,QAAA;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AACd,YAAA,IAAI,CAACtB,MAAI,CAACR,KAAK,CAACE,KAAK,EAAE;cACrBM,MAAI,CAACqB,QAAQ,CAAC,YAAA;gBAAA,OAAO;AACnB5B,kBAAAA,KAAK,EAAE,KAAA;iBACR,CAAA;AAAA,eAAC,CAAC,CAAA;AACJ,aAAA;WACF,EAAEkB,aAAa,CAAC,CAAA;AAClB,SAAA;AACDL,QAAAA,UAAU,IAAIA,UAAU,CAACc,CAAC,CAAC,CAAA;OAC5B,CAAA;MAED,OACEW,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACEC,QAAAA,GAAG,EAAEvB,YAAY;AACjBT,QAAAA,SAAS,EAAEY,GAAG;AACdV,QAAAA,YAAY,EAAEc,aAAa;AAC3Bb,QAAAA,UAAU,EAAEuB,WAAW;AACvBtB,QAAAA,WAAW,EAAEoB,YAAAA;SACTd,KAAK,CAAA,EAER,IAAI,CAACX,KAAK,CAACkC,QAAQ,CAChB,CAAA;AAEV,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAnD,IAAA,CAAA;AAAA,CAzFgB8C,CAAAA,KAAK,CAACM,SAAyB,CAAA,CAAA;AA4FlD,YAAeC,yBAAyB,CAACrD,IAAI,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":";;;;"}
package/dist/index.css ADDED
@@ -0,0 +1 @@
1
+ @-webkit-keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes weuiLoading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.taro-button-core[loading]>.weui-loading{animation:weuiLoading 1s steps(12) infinite;background:transparent url("data:image/svg+xml;charset=utf8, %3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 100 100'%3E%3Cpath fill='none' d='M0 0h100v100H0z'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E9E9E9' rx='5' ry='5' transform='translate(0 -30)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23989697' rx='5' ry='5' transform='rotate(30 105.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%239B999A' rx='5' ry='5' transform='rotate(60 75.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23A3A1A2' rx='5' ry='5' transform='rotate(90 65 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23ABA9AA' rx='5' ry='5' transform='rotate(120 58.66 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23B2B2B2' rx='5' ry='5' transform='rotate(150 54.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23BAB8B9' rx='5' ry='5' transform='rotate(180 50 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23C2C0C1' rx='5' ry='5' transform='rotate(-150 45.98 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23CBCBCB' rx='5' ry='5' transform='rotate(-120 41.34 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23D2D2D2' rx='5' ry='5' transform='rotate(-90 35 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23DADADA' rx='5' ry='5' transform='rotate(-60 24.02 65)'/%3E%3Crect width='7' height='20' x='46.5' y='40' fill='%23E2E2E2' rx='5' ry='5' transform='rotate(-30 -5.98 65)'/%3E%3C/svg%3E") no-repeat;background-size:100%;display:inline-block;height:20px;vertical-align:middle;width:20px}.taro-button-core[loading]>.weui-loading.weui-btn_primary,.taro-button-core[loading]>.weui-loading.weui-btn_warn{color:hsla(0,0%,100%,.6)}.taro-button-core[loading]>.weui-loading.weui-btn_primary{background-color:#179b16}.taro-button-core[loading]>.weui-loading.weui-btn_warn{background-color:#ce3c39}.taro-button-core{-webkit-tap-highlight-color:rgba(0,0,0,0);appearance:none;background-color:#f8f8f8;border-radius:5px;border-width:0;box-sizing:border-box;color:#000;display:block;font-size:18px;line-height:2.55555556;margin-left:auto;margin-right:auto;outline:0;overflow:hidden;padding-left:14px;padding-right:14px;position:relative;text-align:center;text-decoration:none;width:100%}.taro-button-core:focus{outline:0}.taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core:after{border:1px solid rgba(0,0,0,.2);border-radius:10px;box-sizing:border-box;content:" ";height:200%;left:0;position:absolute;top:0;transform:scale(.5);transform-origin:0 0;width:200%}.taro-button-core+.taro-button-core{margin-top:15px}.taro-button-core[type=default]{background-color:#f8f8f8;color:#000}.taro-button-core[type=default]:not([disabled]):visited{color:#000}.taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0,0,0,.6)}.taro-button-core[size=mini]{display:inline-block;font-size:13px;line-height:2.3;padding:0 1.32em;width:auto}.taro-button-core[plain],.taro-button-core[plain][type=default],.taro-button-core[plain][type=primary]{background-color:transparent;border-width:1px}.taro-button-core[disabled]{color:hsla(0,0%,100%,.6)}.taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0,0,0,.3)}.taro-button-core[disabled][type=primary]{background-color:#9ed99d}.taro-button-core[disabled][type=warn]{background-color:#ec8b89}.taro-button-core[loading] .weui-loading{margin:-.2em .34em 0 0}.taro-button-core[loading][type=primary],.taro-button-core[loading][type=warn]{color:hsla(0,0%,100%,.6)}.taro-button-core[loading][type=primary]{background-color:#179b16}.taro-button-core[loading][type=warn]{background-color:#ce3c39}.taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}.taro-button-core[plain][type=primary]:not([disabled]):active{background-color:transparent;border-color:rgba(26,173,25,.6);color:rgba(26,173,25,.6)}.taro-button-core[plain][type=primary]:after{border-width:0}.taro-button-core[plain][type=warn]{border:1px solid #e64340;color:#e64340}.taro-button-core[plain][type=warn]:not([disabled]):active{background-color:transparent;border-color:rgba(230,67,64,.6);color:rgba(230,67,64,.6)}.taro-button-core[plain][type=warn]:after{border-width:0}.taro-button-core[plain],.taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}.taro-button-core[plain]:not([disabled]):active,.taro-button-core[plain][type=default]:not([disabled]):active{background-color:transparent;border-color:rgba(53,53,53,.6);color:rgba(53,53,53,.6)}.taro-button-core[plain]:after,.taro-button-core[plain][type=default]:after{border-width:0}.taro-button-core[type=primary]{background-color:#1aad19;color:#fff}.taro-button-core[type=primary]:not([disabled]):visited{color:#fff}.taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:hsla(0,0%,100%,.6)}.taro-button-core[type=warn]{background-color:#e64340;color:#fff}.taro-button-core[type=warn]:not([disabled]):visited{color:#fff}.taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:hsla(0,0%,100%,.6)}.taro-button-core[plain][disabled],.taro-button-core[plain][disabled][type=primary]{background-color:#f7f7f7;border:1px solid rgba(0,0,0,.2);color:rgba(0,0,0,.3)}.weui-icon-circle:before{content:"\ea01"}.weui-icon-download:before{content:"\ea02"}.weui-icon-info:before{content:"\ea03"}.weui-icon-safe-success:before{content:"\ea04"}.weui-icon-safe-warn:before{content:"\ea05"}.weui-icon-success:before{content:"\ea06"}.weui-icon-success-circle:before{content:"\ea07"}.weui-icon-success-no-circle:before{content:"\ea08"}.weui-icon-waiting:before{content:"\ea09"}.weui-icon-waiting-circle:before{content:"\ea0a"}.weui-icon-warn:before{content:"\ea0b"}.weui-icon-info-circle:before{content:"\ea0c"}.weui-icon-cancel:before{content:"\ea0d"}.weui-icon-search:before{content:"\ea0e"}.weui-icon-clear:before{content:"\ea0f"}.weui-icon-back:before{content:"\ea10"}.weui-icon-delete:before{content:"\ea11"}.weui-icon-success{color:#09bb07;font-size:23px}.weui-icon-waiting{color:#10aeff;font-size:23px}.weui-icon-warn{color:#f43530;font-size:23px}.weui-icon-info{color:#10aeff;font-size:23px}.weui-icon-success-circle,.weui-icon-success-no-circle{color:#09bb07;font-size:23px}.weui-icon-waiting-circle{color:#10aeff;font-size:23px}.weui-icon-circle{color:#c9c9c9;font-size:23px}.weui-icon-download,.weui-icon-info-circle{color:#09bb07;font-size:23px}.weui-icon-safe-success{color:#09bb07}.weui-icon-safe-warn{color:#ffbe00}.weui-icon-cancel{color:#f43530;font-size:22px}.weui-icon-clear,.weui-icon-search{color:#b2b2b2;font-size:14px}.weui-icon-delete.weui-icon_gallery-delete{color:#fff;font-size:22px}.weui-icon_msg{font-size:93px}.weui-icon_msg.weui-icon-warn{color:#f76260}.weui-icon_msg-primary{font-size:93px}.weui-icon_msg-primary.weui-icon-warn{color:#ffbe00}img[src=""]{opacity:0}.taro-img{display:inline-block;font-size:0;height:240px;overflow:hidden;position:relative;width:320px}.taro-img.taro-img__widthfix{height:100%}.taro-img__mode-aspectfit,.taro-img__mode-scaletofill{height:100%;object-fit:contain;width:100%}.taro-img__mode-aspectfill{height:100%;object-fit:cover;width:100%}.taro-img__mode-top,.taro-img__mode-widthfix{width:100%}.taro-img__mode-bottom{bottom:0;position:absolute;width:100%}.taro-img__mode-left{height:100%}.taro-img__mode-right{height:100%}.taro-img__mode-right,.taro-img__mode-topright{position:absolute;right:0}.taro-img__mode-bottomleft{bottom:0;position:absolute}.taro-img__mode-bottomright{bottom:0;position:absolute;right:0}.taro-input-core,input{display:block}input{height:1.4rem;overflow:hidden;text-align:inherit;text-overflow:clip;white-space:nowrap}.weui-input{-webkit-appearance:none;background-color:transparent;border:0;color:inherit;font-size:inherit;height:1.4705882353em;line-height:1.4705882353;outline:0;width:100%}.weui-input::-webkit-inner-spin-button,.weui-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.rmc-pull-to-refresh-content{transform-origin:left top 0}.rmc-pull-to-refresh-content-wrapper{min-height:100%}.rmc-pull-to-refresh-transition{transition:transform .3s}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:.2}to{opacity:1}}.rmc-pull-to-refresh-indicator{height:30px;line-height:10px;text-align:center}.rmc-pull-to-refresh-indicator>div{animation-fill-mode:both;animation:rmc-pull-to-refresh-indicator .5s linear 0s infinite;background-color:grey;border-radius:100%;display:inline-block;height:6px;margin:3px;width:6px}.rmc-pull-to-refresh-indicator>div:nth-child(0){animation-delay:-.1s!important}.rmc-pull-to-refresh-indicator>div:first-child{animation-delay:-.2s!important}.rmc-pull-to-refresh-indicator>div:nth-child(2){animation-delay:-.3s!important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}.taro-scroll{-webkit-overflow-scrolling:auto}.taro-scroll::-webkit-scrollbar{display:none}.taro-scroll-view{overflow:hidden}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}.swiper-container-wrapper{height:150px}.swiper-container{height:100%}.swiper-pagination{font-size:0}.swiper-pagination-bullet{opacity:1}.taro-text{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.taro-text__selectable{-moz-user-select:text;-webkit-user-select:text;-ms-user-select:text;user-select:text}body,html{-webkit-tap-highlight-color:rgba(0,0,0,0);user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}
package/dist/index.js CHANGED
@@ -1,5 +1,8 @@
1
- export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Button, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, Editor, FollowSwan, Form, FunctionalPageNavigator, Icon, InlinePaymentPanel, Input, KeyboardAccessory, Label, Lifestyle, Like, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, Picker, PickerGroup, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, ShareElement, Slider, Slot, Switch, TabItem, Tabbar, Tabs, Textarea, Video, VideoControl, VideoDanmu, VoipRoom, WebView } from '@tarojs/components/lib/react';
1
+ export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block, Camera, Canvas, ChannelLive, ChannelVideo, Checkbox, CheckboxGroup, CommentDetail, CommentList, ContactButton, CoverImage, CoverView, CustomWrapper, Editor, FollowSwan, Form, FunctionalPageNavigator, InlinePaymentPanel, KeyboardAccessory, Label, Lifestyle, Like, LivePlayer, LivePusher, Login, Lottie, Map, MatchMedia, MovableArea, MovableView, NativeSlot, NavigationBar, Navigator, OfficialAccount, OpenData, PageContainer, PageMeta, Picker, PickerGroup, PickerView, PickerViewColumn, Progress, Radio, RadioGroup, RichText, RootPortal, RtcRoom, RtcRoomItem, ShareElement, Slider, Slot, Switch, TabItem, Tabbar, Tabs, Textarea, Video, VideoControl, VideoDanmu, VoipRoom, WebView } from '@tarojs/components/lib/react';
2
+ export { default as Button } from './components/button/index.js';
3
+ export { default as Icon } from './components/icon/index.js';
2
4
  export { default as Image } from './components/image/index.js';
5
+ export { default as Input } from './components/input/index.js';
3
6
  export { default as PullDownRefresh } from './components/pull-down-refresh/index.js';
4
7
  export { default as ScrollView } from './components/scroll-view/index.js';
5
8
  export { Swiper, SwiperItem } from './components/swiper/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { Button } from '@tarojs/components/lib/react'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { Icon } from '@tarojs/components/lib/react'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { Input } from '@tarojs/components/lib/react'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { Map } from '@tarojs/components/lib/react'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { Picker, PickerGroup } from '@tarojs/components/lib/react'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabbar, TabItem } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video, VideoControl, VideoDanmu } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;AAAA"}
1
+ {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["/* eslint-disable simple-import-sort/exports */\nexport { Ad } from '@tarojs/components/lib/react'\nexport { AdCustom } from '@tarojs/components/lib/react'\nexport { AnimationVideo } from '@tarojs/components/lib/react'\nexport { AnimationView } from '@tarojs/components/lib/react'\nexport { ArCamera } from '@tarojs/components/lib/react'\nexport { Audio } from '@tarojs/components/lib/react'\nexport { AwemeData } from '@tarojs/components/lib/react'\nexport { Block } from '@tarojs/components/lib/react'\nexport { default as Button } from './components/button'\nexport { Camera } from '@tarojs/components/lib/react'\nexport { Canvas } from '@tarojs/components/lib/react'\nexport { ChannelLive } from '@tarojs/components/lib/react'\nexport { ChannelVideo } from '@tarojs/components/lib/react'\nexport { Checkbox, CheckboxGroup } from '@tarojs/components/lib/react'\nexport { CommentDetail, CommentList } from '@tarojs/components/lib/react'\nexport { ContactButton } from '@tarojs/components/lib/react'\nexport { CoverImage } from '@tarojs/components/lib/react'\nexport { CoverView } from '@tarojs/components/lib/react'\nexport { CustomWrapper } from '@tarojs/components/lib/react'\nexport { Editor } from '@tarojs/components/lib/react'\nexport { FollowSwan } from '@tarojs/components/lib/react'\nexport { Form } from '@tarojs/components/lib/react'\nexport { FunctionalPageNavigator } from '@tarojs/components/lib/react'\nexport { default as Icon } from './components/icon'\nexport { default as Image } from './components/image'\nexport { InlinePaymentPanel } from '@tarojs/components/lib/react'\nexport { default as Input } from './components/input'\nexport { KeyboardAccessory } from '@tarojs/components/lib/react'\nexport { Label } from '@tarojs/components/lib/react'\nexport { Lifestyle } from '@tarojs/components/lib/react'\nexport { Like } from '@tarojs/components/lib/react'\nexport { LivePlayer } from '@tarojs/components/lib/react'\nexport { LivePusher } from '@tarojs/components/lib/react'\nexport { Login } from '@tarojs/components/lib/react'\nexport { Lottie } from '@tarojs/components/lib/react'\nexport { Map } from '@tarojs/components/lib/react'\nexport { MatchMedia } from '@tarojs/components/lib/react'\nexport { MovableArea, MovableView } from '@tarojs/components/lib/react'\nexport { NavigationBar } from '@tarojs/components/lib/react'\nexport { Navigator } from '@tarojs/components/lib/react'\nexport { OfficialAccount } from '@tarojs/components/lib/react'\nexport { OpenData } from '@tarojs/components/lib/react'\nexport { PageContainer } from '@tarojs/components/lib/react'\nexport { PageMeta } from '@tarojs/components/lib/react'\nexport { Picker, PickerGroup } from '@tarojs/components/lib/react'\nexport { PickerView, PickerViewColumn } from '@tarojs/components/lib/react'\nexport { Progress } from '@tarojs/components/lib/react'\nexport { default as PullDownRefresh } from './components/pull-down-refresh'\n// export { PullToRefresh } from '@tarojs/components/lib/react'\nexport { Radio, RadioGroup } from '@tarojs/components/lib/react'\nexport { RichText } from '@tarojs/components/lib/react'\nexport { RootPortal } from '@tarojs/components/lib/react'\nexport { RtcRoom, RtcRoomItem } from '@tarojs/components/lib/react'\nexport { default as ScrollView } from './components/scroll-view'\nexport { ShareElement } from '@tarojs/components/lib/react'\nexport { Slider } from '@tarojs/components/lib/react'\nexport { NativeSlot, Slot } from '@tarojs/components/lib/react'\nexport { Swiper, SwiperItem } from './components/swiper'\nexport { Switch } from '@tarojs/components/lib/react'\nexport { Tabbar, TabItem } from '@tarojs/components/lib/react'\nexport { Tabs } from '@tarojs/components/lib/react'\nexport { default as Text } from './components/text'\nexport { Textarea } from '@tarojs/components/lib/react'\nexport { Video, VideoControl, VideoDanmu } from '@tarojs/components/lib/react'\nexport { default as View } from './components/view'\nexport { VoipRoom } from '@tarojs/components/lib/react'\nexport { WebView } from '@tarojs/components/lib/react'\n"],"names":[],"mappings":";;;;;;;;;;;AAAA"}
@@ -1,3 +1,5 @@
1
+ import React, { forwardRef } from 'react';
2
+
1
3
  function throttle(fn) {
2
4
  var threshold = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 250;
3
5
  var scope = arguments.length > 2 ? arguments[2] : undefined;
@@ -36,6 +38,22 @@ function debounce(fn) {
36
38
  }, ms);
37
39
  };
38
40
  }
41
+ function omit(obj, fields) {
42
+ var shallowCopy = Object.assign({}, obj);
43
+ for (var i = 0; i < fields.length; i += 1) {
44
+ var key = fields[i];
45
+ delete shallowCopy[key];
46
+ }
47
+ return shallowCopy;
48
+ }
49
+ var createForwardRefComponent = function createForwardRefComponent(ReactComponent) {
50
+ var forwardRefComponent = function forwardRefComponent(props, ref) {
51
+ return React.createElement(ReactComponent, Object.assign({}, props, {
52
+ forwardedRef: ref
53
+ }));
54
+ };
55
+ return forwardRef(forwardRefComponent);
56
+ };
39
57
 
40
- export { debounce, throttle };
58
+ export { createForwardRefComponent, debounce, omit, throttle };
41
59
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["export function throttle (fn, threshold = 250, scope?) {\n let lastTime = 0\n let deferTimer: ReturnType<typeof setTimeout>\n return function (...args) {\n const context = scope || this\n const now = Date.now()\n if (now - lastTime > threshold) {\n fn.apply(this, args)\n lastTime = now\n } else {\n clearTimeout(deferTimer)\n deferTimer = setTimeout(() => {\n lastTime = now\n fn.apply(context, args)\n }, threshold)\n }\n }\n}\n\nexport function debounce (fn, ms = 250, scope?) {\n let timer: ReturnType<typeof setTimeout>\n\n return function (...args) {\n const context = scope || this\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn.apply(context, args)\n }, ms)\n }\n}\n"],"names":["throttle","fn","threshold","arguments","length","undefined","scope","lastTime","deferTimer","_len","args","Array","_key","context","now","Date","apply","clearTimeout","setTimeout","debounce","ms","timer","_len2","_key2"],"mappings":"AAAM,SAAUA,QAAQA,CAAEC,EAAE,EAAyB;AAAA,EAAA,IAAvBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG,CAAA;EAAA,IAAEG,KAAM,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,GAAAA,SAAA,MAAAE,SAAA,CAAA;EACnD,IAAIE,QAAQ,GAAG,CAAC,CAAA;AAChB,EAAA,IAAIC,UAAyC,CAAA;AAC7C,EAAA,OAAO,YAAiB;AAAA,IAAA,KAAA,IAAAC,IAAA,GAAAN,SAAA,CAAAC,MAAA,EAAJM,IAAI,GAAAC,IAAAA,KAAA,CAAAF,IAAA,GAAAG,IAAA,GAAA,CAAA,EAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA,EAAA,EAAA;AAAJF,MAAAA,IAAI,CAAAE,IAAA,CAAAT,GAAAA,SAAA,CAAAS,IAAA,CAAA,CAAA;AAAA,KAAA;AACtB,IAAA,IAAMC,OAAO,GAAGP,KAAK,IAAI,IAAI,CAAA;AAC7B,IAAA,IAAMQ,GAAG,GAAGC,IAAI,CAACD,GAAG,EAAE,CAAA;AACtB,IAAA,IAAIA,GAAG,GAAGP,QAAQ,GAAGL,SAAS,EAAE;AAC9BD,MAAAA,EAAE,CAACe,KAAK,CAAC,IAAI,EAAEN,IAAI,CAAC,CAAA;AACpBH,MAAAA,QAAQ,GA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wardRef } from 'react'\n\nexport function throttle (fn, threshold = 250, scope?) {\n let lastTime = 0\n let deferTimer: ReturnType<typeof setTimeout>\n return function (...args) {\n const context = scope || this\n const now = Date.now()\n if (now - lastTime > threshold) {\n fn.apply(this, args)\n lastTime = now\n } else {\n clearTimeout(deferTimer)\n deferTimer = setTimeout(() => {\n lastTime = now\n fn.apply(context, args)\n }, threshold)\n }\n }\n}\n\nexport function debounce (fn, ms = 250, scope?) {\n let timer: ReturnType<typeof setTimeout>\n\n return function (...args) {\n const context = scope || this\n clearTimeout(timer)\n timer = setTimeout(function () {\n fn.apply(context, args)\n }, ms)\n }\n}\n\nexport function omit (obj, fields) {\n const shallowCopy = Object.assign({}, obj)\n for (let i = 0; i < fields.length; i += 1) {\n const key = fields[i]\n delete shallowCopy[key]\n }\n return shallowCopy\n}\n\nexport const createForwardRefComponent = (ReactComponent: any) => {\n const forwardRefComponent = (\n props,\n ref\n ) => <ReactComponent {...props} forwardedRef={ref} />\n\n return forwardRef(forwardRefComponent)\n}\n"],"names":["throttle","fn","threshold","arguments","length","undefined","scope","lastTime","deferTimer","_len","args","Array","_key","context","now","Date","apply","clearTimeout","setTimeout","debounce","ms","timer","_len2","_key2","omit","obj","fields","shallowCopy","Object","assign","i","key","createForwardRefComponent","ReactComponent","forwardRefComponent","props","ref","React","createElement","forwardedRef","forwardRef"],"mappings":";;AAEM,SAAUA,QAAQA,CAAEC,EAAE,EAAyB;AAAA,EAAA,IAAvBC,SAAS,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,GAAG,CAAA;EAAA,IAAEG,KAAM,GAAAH,SAAA,CAAAC,MAAA,GAAAD,CAAAA,GAAAA,SAAA,MAAAE,SAAA,CAAA;EACnD,IAAIE,QAAQ,GAAG,CAAC,CAAA;AAChB,EAAA,IAAIC,UAAyC,CAAA;AAC7C,EAAA,OAAO,YAA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A;AACxC;;;;"}
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@tarojs/components-react",
3
- "version": "3.7.0-canary.6",
3
+ "version": "3.8.0-canary.1",
4
4
  "description": "",
5
- "main:h5": "dist/index.js",
5
+ "main:h5": "src/index.js",
6
6
  "main": "dist/index.js",
7
- "module": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
8
  "types": "types/index.d.ts",
9
9
  "sideEffects": [
10
10
  "./dist/components/**/loader.js",
11
- "**/style/*.js"
11
+ "**/style/*.js",
12
+ "*.scss",
13
+ "*.css"
12
14
  ],
13
15
  "files": [
14
16
  "dist",
@@ -24,26 +26,29 @@
24
26
  "dependencies": {
25
27
  "@babel/runtime": "^7.14.5",
26
28
  "classnames": "^2.2.5",
27
- "intersection-observer": "^0.7.0",
28
- "resolve-pathname": "^3.0.0",
29
29
  "swiper": "6.8.0",
30
- "weui": "^1.1.2",
31
- "@tarojs/components": "3.7.0-canary.6",
32
- "@tarojs/taro": "3.7.0-canary.6"
30
+ "tslib": "^2.6.2",
31
+ "@tarojs/components": "3.8.0-canary.1",
32
+ "@tarojs/taro": "3.8.0-canary.1"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@babel/core": "^7.14.5",
36
- "@rollup/plugin-babel": "^6.0.3",
37
- "@rollup/plugin-commonjs": "^25.0.7",
38
- "@rollup/plugin-node-resolve": "^15.2.3",
39
- "rollup": "^2.79.0",
36
+ "@rollup/plugin-babel": "^6.0.4",
37
+ "@rollup/plugin-commonjs": "^24.0.0",
38
+ "@rollup/plugin-node-resolve": "^15.0.0",
39
+ "@rollup/plugin-typescript": "^11.1.0",
40
+ "postcss": "^8.4.18",
41
+ "rollup": "^3.8.1",
40
42
  "rollup-plugin-node-externals": "^5.0.0",
41
- "rollup-plugin-postcss": "^3.1.8",
43
+ "rollup-plugin-postcss": "^4.0.2",
42
44
  "rollup-plugin-ts": "^3.0.2",
43
45
  "typescript": "^4.7.4"
44
46
  },
45
47
  "scripts": {
46
- "build": "rollup -c",
47
- "dev": "rollup -c -w"
48
+ "prebuild": "pnpm run clean",
49
+ "build": "pnpm run rollup --environment NODE_ENV:production",
50
+ "clean": "rimraf ./dist",
51
+ "dev": "pnpm run rollup --environment NODE_ENV:development -w",
52
+ "rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript --bundleConfigAsCjs"
48
53
  }
49
54
  }
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = "img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfill {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n width: 100%;\n}\n\n.taro-img__mode-bottom {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-left {\n height: 100%;\n}\n\n.taro-img__mode-right {\n position: absolute;\n height: 100%;\n right: 0;\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n";
4
- var stylesheet="img[src=\"\"] {\n opacity: 0;\n}\n\n.taro-img {\n display: inline-block;\n overflow: hidden;\n position: relative;\n font-size: 0;\n width: 320px;\n height: 240px;\n}\n\n.taro-img.taro-img__widthfix {\n height: 100%;\n}\n\n.taro-img__mode-scaletofill {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfit {\n object-fit: contain;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-aspectfill {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n\n.taro-img__mode-widthfix {\n width: 100%;\n}\n\n.taro-img__mode-top {\n width: 100%;\n}\n\n.taro-img__mode-bottom {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-left {\n height: 100%;\n}\n\n.taro-img__mode-right {\n position: absolute;\n height: 100%;\n right: 0;\n}\n\n.taro-img__mode-topright {\n position: absolute;\n right: 0;\n}\n\n.taro-img__mode-bottomleft {\n position: absolute;\n bottom: 0;\n}\n\n.taro-img__mode-bottomright {\n position: absolute;\n right: 0;\n bottom: 0;\n}\n";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = ".rmc-pull-to-refresh-content {\r\n transform-origin: left top 0px;\r\n}\r\n.rmc-pull-to-refresh-content-wrapper {\r\n min-height: 100%;\r\n}\r\n\r\n.rmc-pull-to-refresh-transition {\r\n transition: transform 0.3s;\r\n}\r\n\r\n@keyframes rmc-pull-to-refresh-indicator {\r\n 50% {\r\n opacity: 0.2;\r\n }\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator {\r\n text-align: center;\r\n height: 30px;\r\n line-height: 10px;\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator > div {\r\n background-color: grey;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 100%;\r\n margin: 3px;\r\n animation-fill-mode: both;\r\n display: inline-block;\r\n animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(0) {\r\n animation-delay: -0.1s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(1) {\r\n animation-delay: -0.2s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(2) {\r\n animation-delay: -0.3s !important;\r\n}\r\n.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {\r\n margin-top: -25px;\r\n}\r\n";
4
- var stylesheet=".rmc-pull-to-refresh-content {\r\n transform-origin: left top 0px;\r\n}\r\n.rmc-pull-to-refresh-content-wrapper {\r\n min-height: 100%;\r\n}\r\n\r\n.rmc-pull-to-refresh-transition {\r\n transition: transform 0.3s;\r\n}\r\n\r\n@keyframes rmc-pull-to-refresh-indicator {\r\n 50% {\r\n opacity: 0.2;\r\n }\r\n 100% {\r\n opacity: 1;\r\n }\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator {\r\n text-align: center;\r\n height: 30px;\r\n line-height: 10px;\r\n}\r\n\r\n.rmc-pull-to-refresh-indicator > div {\r\n background-color: grey;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 100%;\r\n margin: 3px;\r\n animation-fill-mode: both;\r\n display: inline-block;\r\n animation: rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(0) {\r\n animation-delay: -0.1s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(1) {\r\n animation-delay: -0.2s !important;\r\n}\r\n.rmc-pull-to-refresh-indicator > div:nth-child(2) {\r\n animation-delay: -0.3s !important;\r\n}\r\n.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator {\r\n margin-top: -25px;\r\n}\r\n";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = ".taro-scroll {\n -webkit-overflow-scrolling: auto;\n}\n\n.taro-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.taro-scroll-view {\n overflow: hidden;\n}\n\n.taro-scroll-view__scroll-x {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.taro-scroll-view__scroll-y {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n";
4
- var stylesheet=".taro-scroll {\n -webkit-overflow-scrolling: auto;\n}\n\n.taro-scroll::-webkit-scrollbar {\n display: none;\n}\n\n.taro-scroll-view {\n overflow: hidden;\n}\n\n.taro-scroll-view__scroll-x {\n overflow-x: scroll;\n overflow-y: hidden;\n}\n\n.taro-scroll-view__scroll-y {\n overflow-x: hidden;\n overflow-y: scroll;\n}\n";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- var css_248z = ".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
4
- var stylesheet=".swiper-container-wrapper {\n height: 150px;\n}\n\n.swiper-container {\n height: 100%;\n}\n\n.swiper-pagination {\n font-size: 0;\n}\n\n.swiper-pagination-bullet {\n opacity: 1\n}\n";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- 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";
4
- var stylesheet=".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";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,8 +0,0 @@
1
- import styleInject from '../../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
-
3
- 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";
4
- var stylesheet="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";
5
- styleInject(css_248z,{"insertAt":"top"});
6
-
7
- export { css_248z as default, stylesheet };
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,27 +0,0 @@
1
- function styleInject(css, ref) {
2
- if (ref === void 0) ref = {};
3
- var insertAt = ref.insertAt;
4
- if (!css || typeof document === 'undefined') {
5
- return;
6
- }
7
- var head = document.head || document.getElementsByTagName('head')[0];
8
- var style = document.createElement('style');
9
- style.type = 'text/css';
10
- if (insertAt === 'top') {
11
- if (head.firstChild) {
12
- head.insertBefore(style, head.firstChild);
13
- } else {
14
- head.appendChild(style);
15
- }
16
- } else {
17
- head.appendChild(style);
18
- }
19
- if (style.styleSheet) {
20
- style.styleSheet.cssText = css;
21
- } else {
22
- style.appendChild(document.createTextNode(css));
23
- }
24
- }
25
-
26
- export { styleInject as default };
27
- //# sourceMappingURL=style-inject.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style-inject.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}