@tarojs/components-react 3.6.24-nightly.0 → 3.6.24-nightly.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.
- package/dist/components/button/index.js +112 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/button/style/index.scss.js +4 -0
- package/dist/components/button/style/index.scss.js.map +1 -0
- package/dist/components/icon/index.js +27 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/components/icon/style/index.scss.js +4 -0
- package/dist/components/icon/style/index.scss.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/index.js +9 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,112 @@
|
|
|
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 } 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
|
+
var cls = classNames(className, 'taro-button-core', _defineProperty({}, "".concat(hoverClass), this.state.hover && !disabled));
|
|
55
|
+
var _onTouchStart = function _onTouchStart(e) {
|
|
56
|
+
_this2.setState(function () {
|
|
57
|
+
return {
|
|
58
|
+
touch: true
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
if (hoverClass && hoverClass !== 'none' && !disabled) {
|
|
62
|
+
_this2.startTimer = setTimeout(function () {
|
|
63
|
+
if (_this2.state.touch) {
|
|
64
|
+
_this2.setState(function () {
|
|
65
|
+
return {
|
|
66
|
+
hover: true
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}, hoverStartTime);
|
|
71
|
+
}
|
|
72
|
+
onTouchStart && onTouchStart(e);
|
|
73
|
+
};
|
|
74
|
+
var _onTouchEnd = function _onTouchEnd(e) {
|
|
75
|
+
_this2.setState(function () {
|
|
76
|
+
return {
|
|
77
|
+
touch: false
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
if (hoverClass && hoverClass !== 'none' && !disabled) {
|
|
81
|
+
_this2.endTimer = setTimeout(function () {
|
|
82
|
+
if (!_this2.state.touch) {
|
|
83
|
+
_this2.setState(function () {
|
|
84
|
+
return {
|
|
85
|
+
hover: false
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}, hoverStayTime);
|
|
90
|
+
}
|
|
91
|
+
onTouchEnd && onTouchEnd(e);
|
|
92
|
+
};
|
|
93
|
+
return React.createElement("button", Object.assign({}, omit(this.props, ['hoverClass', 'onTouchStart', 'onTouchEnd', 'type', 'loading']), {
|
|
94
|
+
type: type,
|
|
95
|
+
className: cls,
|
|
96
|
+
style: style,
|
|
97
|
+
onClick: onClick,
|
|
98
|
+
disabled: disabled,
|
|
99
|
+
onTouchStart: _onTouchStart,
|
|
100
|
+
onTouchEnd: _onTouchEnd,
|
|
101
|
+
loading: loading.toString(),
|
|
102
|
+
plain: plain.toString()
|
|
103
|
+
}), loading && React.createElement("i", {
|
|
104
|
+
className: 'weui-loading'
|
|
105
|
+
}), children);
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
return Button;
|
|
109
|
+
}(React.Component);
|
|
110
|
+
|
|
111
|
+
export { Button as default };
|
|
112
|
+
//# 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 { 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}\n \ninterface IState {\n hover:boolean\n touch: boolean\n}\n\nclass Button extends React.Component<IProps, IState> {\n \n constructor (props) {\n super(props)\n this.state = {\n hover: false,\n touch: false\n }\n }\n \n startTimer\n endTimer\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 } = 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'])}\n type={type}\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 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","cls","classNames","_defineProperty","concat","_onTouchStart","e","setState","setTimeout","_onTouchEnd","React","createElement","Object","assign","omit","toString","Component"],"mappings":";;;;;;;;;;AAwBMA,IAAAA,MAAO,0BAAAC,gBAAA,EAAA;EAAAC,SAAA,CAAAF,MAAA,EAAAC,gBAAA,CAAA,CAAA;AAAA,EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,MAAA,CAAA,CAAA;EAEX,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,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EAAE2B,aAAa,CAAC,CAAA;AAClB,SAAA;AACDN,QAAAA,UAAU,IAAIA,UAAU,CAACe,CAAC,CAAC,CAAA;OAC5B,CAAA;AAED,MAAA,OACEI,KAAA,CAAAC,aAAA,CAAA,QAAA,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EACMC,IAAI,CAAC,IAAI,CAACjD,KAAK,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC,EACrF;AAAAmC,QAAAA,IAAI,EAAEA,IAAI;AACVb,QAAAA,SAAS,EAAEc,GAAG;AACdb,QAAAA,KAAK,EAAEA,KAAK;AACZC,QAAAA,OAAO,EAAEA,OAAO;AAChBH,QAAAA,QAAQ,EAAEA,QAAQ;AAClBI,QAAAA,YAAY,EAAEe,aAAa;AAC3Bd,QAAAA,UAAU,EAAEkB,WAAW;AACvBV,QAAAA,OAAO,EAAEA,OAAO,CAACgB,QAAQ,EAAE;AAC3BhC,QAAAA,KAAK,EAAEA,KAAK,CAACgC,QAAQ,EAAE;OAAA,CAAA,EAEtBhB,OAAO,IAAIW,KAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGxB,QAAAA,SAAS,EAAC,cAAA;OAAiB,CAAA,EACzCH,QAAQ,CACF,CAAA;AAEb,KAAA;AAAC,GAAA,CAAA,CAAA,CAAA;AAAA,EAAA,OAAAxB,MAAA,CAAA;AAAA,CA1FmBkD,CAAAA,KAAK,CAACM,SAAyB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 } 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
|
+
if (type) type = type.replace(/_/g, '-');
|
|
15
|
+
var cls = classNames(_defineProperty({}, "weui-icon-".concat(type), true), className);
|
|
16
|
+
var style = {
|
|
17
|
+
'font-size': size + 'px',
|
|
18
|
+
color: color
|
|
19
|
+
};
|
|
20
|
+
return React.createElement("i", Object.assign({}, omit(props, ['type', 'className']), {
|
|
21
|
+
className: cls,
|
|
22
|
+
style: style
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { Icon as default };
|
|
27
|
+
//# 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 { omit } from '../../utils'\n\n\ninterface IProps {\n type: string\n color: string\n size?: number | string\n className?: string\n}\n\nconst Icon = (props: IProps) => {\n let { type, className = '', size = '23', color } = 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'])} className={cls} style={style} />\n )\n}\nexport default Icon\n"],"names":["Icon","props","type","_props$className","className","_props$size","size","color","replace","cls","classNames","_defineProperty","concat","style","React","omit"],"mappings":";;;;;;AAeA,IAAMA,IAAI,GAAG,SAAPA,IAAIA,CAAIC,KAAa,EAAI;AAC7B,EAAA,IAAMC,IAAI,GAAyCD,KAAK,CAAlDC,IAAI;IAAAC,gBAAA,GAAyCF,KAAK,CAA5CG,SAAS;AAATA,IAAAA,SAAS,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,gBAAA;IAAAE,WAAA,GAAyBJ,KAAK,CAA5BK,IAAI;AAAJA,IAAAA,IAAI,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,WAAA;IAAEE,KAAK,GAAKN,KAAK,CAAfM,KAAK,CAAA;EAC9C,IAAIL,IAAI,EAAEA,IAAI,GAAGA,IAAI,CAACM,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;AACxC,EAAA,IAAMC,GAAG,GAAGC,UAAU,CAAAC,eAAA,CAAA,EAAA,EAAA,YAAA,CAAAC,MAAA,CAEJV,IAAI,CAAA,EAAK,IAAI,CAAA,EAE7BE,SAAS,CACV,CAAA;AACD,EAAA,IAAMS,KAAK,GAAG;IAAE,WAAW,EAAEP,IAAI,GAAG,IAAI;AAAEC,IAAAA,KAAK,EAAEA,KAAAA;GAAO,CAAA;EAExD,OACEO,2CAAOC,IAAI,CAACd,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,EAAE;AAAAG,IAAAA,SAAS,EAAEK,GAAG;AAAEI,IAAAA,KAAK,EAAEA,KAAAA;AAAS,GAAA,CAAA,CAAA,CAAA;AAE/E;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
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}.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}
|
|
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}.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,4 +1,6 @@
|
|
|
1
|
-
export { Ad, AdCustom, AnimationVideo, AnimationView, ArCamera, Audio, AwemeData, Block,
|
|
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, 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';
|
|
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';
|
|
3
5
|
export { default as PullDownRefresh } from './components/pull-down-refresh/index.js';
|
|
4
6
|
export { default as ScrollView } from './components/scroll-view/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 '
|
|
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 { 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"}
|
package/dist/utils/index.js
CHANGED
|
@@ -36,6 +36,14 @@ function debounce(fn) {
|
|
|
36
36
|
}, ms);
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
+
function omit(obj, fields) {
|
|
40
|
+
var shallowCopy = Object.assign({}, obj);
|
|
41
|
+
for (var i = 0; i < fields.length; i += 1) {
|
|
42
|
+
var key = fields[i];
|
|
43
|
+
delete shallowCopy[key];
|
|
44
|
+
}
|
|
45
|
+
return shallowCopy;
|
|
46
|
+
}
|
|
39
47
|
|
|
40
|
-
export { debounce, throttle };
|
|
48
|
+
export { debounce, omit, throttle };
|
|
41
49
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -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","clear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ACd,KAAA;GACF,CAAA;AACH,CAAA;AAEM,SAAUiB,QAAQA,CAAElB,EAAE,EAAkB;AAAA,EAAA,IAAhBmB,EAAE,GAAAjB,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;AAC5C,EAAA,IAAIgB,KAAoC,CAAA;AAExC,EAAA,OAAO,YAAiB;AAAA,IAAA,KAAA,IAAAC,KAAA,GAAAnB,SAAA,CAAAC,MAAA,EAAJM,IAAI,GAAAC,IAAAA,KAAA,CAAAW,KAAA,GAAAC,KAAA,GAAA,CAAA,EAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA,EAAA,EAAA;AAAJb,MAAAA,IAAI,CAAAa,KAAA,CAAApB,GAAAA,SAAA,CAAAoB,KAAA,CAAA,CAAA;AAAA,KAAA;AACtB,IAAA,IAAMV,OAAO,GAAGP,KAAK,IAAI,IAAI,CAAA;IAC7BW,YAAY,CAACI,KAAK,CAAC,CAAA;IACnBA,KAAK,GAAGH,UAAU,CAAC,YAAA;AACjBjB,MAAAA,EAAE,CAACe,KAAK,CAACH,OAAO,EAAEH,IAAI,CAAC,CAAA;KACxB,EAAEU,EAAE,CAAC,CAAA;GACP,CAAA;AACH;;;;"}
|
|
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\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"],"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"],"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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,EAAE,CAAC,CAAA;GACP,CAAA;AACH,CAAA;AAEgB,SAAAI,IAAIA,CAAEC,GAAG,EAAEC,MAAM,EAAA;EAC/B,IAAMC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAAC,EAAE,EAAEJ,GAAG,CAAC,CAAA;AAC1C,EAAA,KAAK,IAAIK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,CAACtB,MAAM,EAAE0B,CAAC,IAAI,CAAC,EAAE;AACzC,IAAA,IAAMC,GAAG,GAAGL,MAAM,CAACI,CAAC,CAAC,CAAA;IACrB,OAAOH,WAAW,CAACI,GAAG,CAAC,CAAA;AACxB,GAAA;AACD,EAAA,OAAOJ,WAAW,CAAA;AACpB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "3.6.24-nightly.
|
|
3
|
+
"version": "3.6.24-nightly.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "src/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"classnames": "^2.2.5",
|
|
29
29
|
"swiper": "6.8.0",
|
|
30
30
|
"tslib": "^2.6.2",
|
|
31
|
-
"@tarojs/
|
|
32
|
-
"@tarojs/
|
|
31
|
+
"@tarojs/components": "3.6.24-nightly.1",
|
|
32
|
+
"@tarojs/taro": "3.6.24-nightly.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.14.5",
|