taro-react-uilib 1.0.4 → 1.0.23
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/Animated/Animated.js +2 -0
- package/dist/components/Animated/Animated.js.map +1 -0
- package/dist/components/Animated/Fade/index.js +2 -0
- package/dist/components/Animated/Fade/index.js.map +1 -0
- package/dist/components/Animated/Slide/index.js +2 -0
- package/dist/components/Animated/Slide/index.js.map +1 -0
- package/dist/components/BankIcon/bank.js +2 -0
- package/dist/components/BankIcon/bank.js.map +1 -0
- package/dist/components/BankIcon/images/102.png.js +2 -0
- package/dist/components/BankIcon/images/102.png.js.map +1 -0
- package/dist/components/BankIcon/images/103.png.js +2 -0
- package/dist/components/BankIcon/images/103.png.js.map +1 -0
- package/dist/components/BankIcon/images/104.png.js +2 -0
- package/dist/components/BankIcon/images/104.png.js.map +1 -0
- package/dist/components/BankIcon/images/105.png.js +2 -0
- package/dist/components/BankIcon/images/105.png.js.map +1 -0
- package/dist/components/BankIcon/images/301.png.js +2 -0
- package/dist/components/BankIcon/images/301.png.js.map +1 -0
- package/dist/components/BankIcon/images/302.png.js +2 -0
- package/dist/components/BankIcon/images/302.png.js.map +1 -0
- package/dist/components/BankIcon/images/303.png.js +2 -0
- package/dist/components/BankIcon/images/303.png.js.map +1 -0
- package/dist/components/BankIcon/images/304.png.js +2 -0
- package/dist/components/BankIcon/images/304.png.js.map +1 -0
- package/dist/components/BankIcon/images/305.png.js +2 -0
- package/dist/components/BankIcon/images/305.png.js.map +1 -0
- package/dist/components/BankIcon/images/306.png.js +2 -0
- package/dist/components/BankIcon/images/306.png.js.map +1 -0
- package/dist/components/BankIcon/images/307.png.js +2 -0
- package/dist/components/BankIcon/images/307.png.js.map +1 -0
- package/dist/components/BankIcon/images/308.png.js +2 -0
- package/dist/components/BankIcon/images/308.png.js.map +1 -0
- package/dist/components/BankIcon/images/309.png.js +2 -0
- package/dist/components/BankIcon/images/309.png.js.map +1 -0
- package/dist/components/BankIcon/images/310.png.js +2 -0
- package/dist/components/BankIcon/images/310.png.js.map +1 -0
- package/dist/components/BankIcon/images/403.png.js +2 -0
- package/dist/components/BankIcon/images/403.png.js.map +1 -0
- package/dist/components/BankIcon/index.js +2 -0
- package/dist/components/BankIcon/index.js.map +1 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Captcha/index.js +2 -0
- package/dist/components/Captcha/index.js.map +1 -0
- package/dist/components/Dialog/Alert/index.js +2 -0
- package/dist/components/Dialog/Alert/index.js.map +1 -0
- package/dist/components/Dialog/Confirm/index.js +2 -0
- package/dist/components/Dialog/Confirm/index.js.map +1 -0
- package/dist/components/Dialog/index.js +2 -0
- package/dist/components/Dialog/index.js.map +1 -0
- package/dist/components/DialogComponent/index.js +2 -0
- package/dist/components/DialogComponent/index.js.map +1 -0
- package/dist/components/DialogRef/index.js +2 -0
- package/dist/components/DialogRef/index.js.map +1 -0
- package/dist/components/FormInput/index.js +2 -0
- package/dist/components/FormInput/index.js.map +1 -0
- package/dist/components/Image/index.js +2 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/List/index.js +2 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/Loading/index.js +2 -0
- package/dist/components/Loading/index.js.map +1 -0
- package/dist/components/Mask/index.js +2 -0
- package/dist/components/Mask/index.js.map +1 -0
- package/dist/components/NumberKeyboard/index.js +2 -0
- package/dist/components/NumberKeyboard/index.js.map +1 -0
- package/dist/components/Page/index.js +2 -0
- package/dist/components/Page/index.js.map +1 -0
- package/dist/components/PasswordInput/index.js +2 -0
- package/dist/components/PasswordInput/index.js.map +1 -0
- package/dist/components/Picker/Picker.js +2 -0
- package/dist/components/Picker/Picker.js.map +1 -0
- package/dist/components/Picker/index.js +2 -0
- package/dist/components/Picker/index.js.map +1 -0
- package/dist/components/Popup/index.js +2 -0
- package/dist/components/Popup/index.js.map +1 -0
- package/dist/components/Progress/index.js +2 -0
- package/dist/components/Progress/index.js.map +1 -0
- package/dist/components/Tabbar/index.js +2 -0
- package/dist/components/Tabbar/index.js.map +1 -0
- package/dist/components/Tabbar/tabbar/TabItem.js +2 -0
- package/dist/components/Tabbar/tabbar/TabItem.js.map +1 -0
- package/dist/components/Tabbar/tabbar/Tabbar.js +2 -0
- package/dist/components/Tabbar/tabbar/Tabbar.js.map +1 -0
- package/dist/components/Toast/Toast.js +2 -0
- package/dist/components/Toast/Toast.js.map +1 -0
- package/dist/components/Toast/index.js +2 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/_virtual/ReactPropTypesSecret.js +2 -0
- package/dist/components/_virtual/ReactPropTypesSecret.js.map +1 -0
- package/dist/components/_virtual/_commonjsHelpers.js +2 -0
- package/dist/components/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/components/_virtual/checkPropTypes.js +2 -0
- package/dist/components/_virtual/checkPropTypes.js.map +1 -0
- package/dist/components/_virtual/factoryWithThrowingShims.js +2 -0
- package/dist/components/_virtual/factoryWithThrowingShims.js.map +1 -0
- package/dist/components/_virtual/factoryWithTypeCheckers.js +2 -0
- package/dist/components/_virtual/factoryWithTypeCheckers.js.map +1 -0
- package/dist/components/_virtual/has.js +2 -0
- package/dist/components/_virtual/has.js.map +1 -0
- package/dist/components/_virtual/index.js +2 -0
- package/dist/components/_virtual/index.js.map +1 -0
- package/dist/components/_virtual/index2.js +2 -0
- package/dist/components/_virtual/index2.js.map +1 -0
- package/dist/components/_virtual/react-is.development.js +2 -0
- package/dist/components/_virtual/react-is.development.js.map +1 -0
- package/dist/components/_virtual/react-is.production.min.js +2 -0
- package/dist/components/_virtual/react-is.production.min.js.map +1 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/extends.js +2 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +2 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js.map +1 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +2 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +2 -0
- package/dist/components/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js.map +1 -0
- package/dist/components/node_modules/dom-helpers/esm/addClass.js +2 -0
- package/dist/components/node_modules/dom-helpers/esm/addClass.js.map +1 -0
- package/dist/components/node_modules/dom-helpers/esm/hasClass.js +2 -0
- package/dist/components/node_modules/dom-helpers/esm/hasClass.js.map +1 -0
- package/dist/components/node_modules/dom-helpers/esm/removeClass.js +2 -0
- package/dist/components/node_modules/dom-helpers/esm/removeClass.js.map +1 -0
- package/dist/components/node_modules/object-assign/index.js +7 -0
- package/dist/components/node_modules/object-assign/index.js.map +1 -0
- package/dist/components/node_modules/prop-types/checkPropTypes.js +2 -0
- package/dist/components/node_modules/prop-types/checkPropTypes.js.map +1 -0
- package/dist/components/node_modules/prop-types/factoryWithThrowingShims.js +2 -0
- package/dist/components/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
- package/dist/components/node_modules/prop-types/factoryWithTypeCheckers.js +2 -0
- package/dist/components/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
- package/dist/components/node_modules/prop-types/index.js +2 -0
- package/dist/components/node_modules/prop-types/index.js.map +1 -0
- package/dist/components/node_modules/prop-types/lib/ReactPropTypesSecret.js +2 -0
- package/dist/components/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
- package/dist/components/node_modules/prop-types/lib/has.js +2 -0
- package/dist/components/node_modules/prop-types/lib/has.js.map +1 -0
- package/dist/components/node_modules/react-is/cjs/react-is.development.js +2 -0
- package/dist/components/node_modules/react-is/cjs/react-is.development.js.map +1 -0
- package/dist/components/node_modules/react-is/cjs/react-is.production.min.js +10 -0
- package/dist/components/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
- package/dist/components/node_modules/react-is/index.js +2 -0
- package/dist/components/node_modules/react-is/index.js.map +1 -0
- package/dist/components/node_modules/react-transition-group/esm/CSSTransition.js +2 -0
- package/dist/components/node_modules/react-transition-group/esm/CSSTransition.js.map +1 -0
- package/dist/components/node_modules/react-transition-group/esm/Transition.js +2 -0
- package/dist/components/node_modules/react-transition-group/esm/Transition.js.map +1 -0
- package/dist/components/node_modules/react-transition-group/esm/TransitionGroupContext.js +2 -0
- package/dist/components/node_modules/react-transition-group/esm/TransitionGroupContext.js.map +1 -0
- package/dist/components/node_modules/react-transition-group/esm/config.js +2 -0
- package/dist/components/node_modules/react-transition-group/esm/config.js.map +1 -0
- package/dist/components/node_modules/react-transition-group/esm/utils/PropTypes.js +2 -0
- package/dist/components/node_modules/react-transition-group/esm/utils/PropTypes.js.map +1 -0
- package/dist/components/node_modules/tslib/tslib.es6.js +2 -0
- package/dist/components/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/components/src/hooks/index.js +2 -0
- package/dist/components/src/hooks/index.js.map +1 -0
- package/dist/components/src/index.js +2 -0
- package/dist/components/src/index.js.map +1 -0
- package/dist/components/src/utils/index.js +2 -0
- package/dist/components/src/utils/index.js.map +1 -0
- package/dist/index.js +2 -3010
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +9 -3018
- package/dist/index.umd.js.map +1 -1
- package/dist/styles/components/alert.scss +9 -4
- package/dist/styles/components/animated.scss +152 -0
- package/dist/styles/components/bankicon.scss +3 -1
- package/dist/styles/components/button.scss +23 -12
- package/dist/styles/components/captcha.scss +14 -2
- package/dist/styles/components/confirm.scss +16 -7
- package/dist/styles/components/dialog.scss +224 -0
- package/dist/styles/components/dialogref.scss +45 -168
- package/dist/styles/components/fade.scss +22 -0
- package/dist/styles/components/font/iconfont.ttf +0 -0
- package/dist/styles/components/font/iconfont.woff +0 -0
- package/dist/styles/components/font/iconfont.woff2 +0 -0
- package/dist/styles/components/forminput.scss +93 -57
- package/dist/styles/components/image.scss +1 -1
- package/dist/styles/components/images/backspace.png +0 -0
- package/dist/styles/components/images/loading.png +0 -0
- package/dist/styles/components/index.scss +9 -2
- package/dist/styles/components/list.scss +21 -18
- package/dist/styles/components/loading.scss +50 -9
- package/dist/styles/components/mask.scss +3 -2
- package/dist/styles/components/numberkeyboard.scss +48 -20
- package/dist/styles/components/page.scss +5 -4
- package/dist/styles/components/passwordinput.scss +2 -0
- package/dist/styles/components/picker.scss +147 -0
- package/dist/styles/components/popup.scss +77 -0
- package/dist/styles/components/scale.scss +27 -0
- package/dist/styles/components/scrollview.scss +4 -0
- package/dist/styles/components/slide.scss +105 -0
- package/dist/styles/components/tabbar.scss +42 -0
- package/dist/styles/components/toast.scss +9 -13
- package/dist/styles/index.scss +5 -5
- package/dist/styles/{components/dialogcomponent.scss → themes/animation.scss} +33 -74
- package/dist/styles/themes/default.scss +2 -2
- package/dist/styles/themes/variable.scss +3 -4
- package/lib/components/Animated/Animated.js +20 -0
- package/lib/components/Animated/Animated.js.map +1 -0
- package/lib/components/Animated/Fade/index.js +19 -0
- package/lib/components/Animated/Fade/index.js.map +1 -0
- package/lib/components/Animated/Scale/index.js +19 -0
- package/lib/components/Animated/Scale/index.js.map +1 -0
- package/lib/components/Animated/Slide/index.js +19 -0
- package/lib/components/Animated/Slide/index.js.map +1 -0
- package/lib/components/Animated/index.js +5 -0
- package/lib/components/Animated/index.js.map +1 -0
- package/lib/components/Button/index.js +27 -5
- package/lib/components/Button/index.js.map +1 -1
- package/lib/components/Captcha/index.js +17 -5
- package/lib/components/Captcha/index.js.map +1 -1
- package/lib/components/Dialog/Alert/index.js +3 -3
- package/lib/components/Dialog/Alert/index.js.map +1 -1
- package/lib/components/Dialog/Confirm/index.js +4 -4
- package/lib/components/Dialog/Confirm/index.js.map +1 -1
- package/lib/components/Dialog/index.js +1 -1
- package/lib/components/Dialog/index.js.map +1 -1
- package/lib/components/{Dialog/DialogComponent → DialogComponent}/index.js +1 -1
- package/lib/components/DialogComponent/index.js.map +1 -0
- package/lib/components/DialogRef/index.js +8 -7
- package/lib/components/DialogRef/index.js.map +1 -1
- package/lib/components/FormInput/index.js +32 -21
- package/lib/components/FormInput/index.js.map +1 -1
- package/lib/components/List/index.js +18 -15
- package/lib/components/List/index.js.map +1 -1
- package/lib/components/Loading/index.js +12 -10
- package/lib/components/Loading/index.js.map +1 -1
- package/lib/components/Mask/index.js +8 -8
- package/lib/components/Mask/index.js.map +1 -1
- package/lib/components/NumberKeyboard/index.js +12 -7
- package/lib/components/NumberKeyboard/index.js.map +1 -1
- package/lib/components/Page/index.js +7 -7
- package/lib/components/Page/index.js.map +1 -1
- package/lib/components/Picker/Picker.js +109 -0
- package/lib/components/Picker/Picker.js.map +1 -0
- package/lib/components/Picker/index.js +35 -0
- package/lib/components/Picker/index.js.map +1 -0
- package/lib/components/Popup/index.js +61 -0
- package/lib/components/Popup/index.js.map +1 -0
- package/lib/components/ScrollView/index.js +34 -0
- package/lib/components/ScrollView/index.js.map +1 -0
- package/lib/components/Tabbar/index.js +6 -0
- package/lib/components/Tabbar/index.js.map +1 -0
- package/lib/components/Tabbar/tabbar/TabItem.js +10 -0
- package/lib/components/Tabbar/tabbar/TabItem.js.map +1 -0
- package/lib/components/Tabbar/tabbar/Tabbar.js +74 -0
- package/lib/components/Tabbar/tabbar/Tabbar.js.map +1 -0
- package/lib/components/Toast/index.js +11 -3
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/hooks/index.js +42 -1
- package/lib/hooks/index.js.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/utils/index.js +18 -2
- package/lib/utils/index.js.map +1 -1
- package/package.json +134 -131
- package/types/components/Animated/Animated.d.ts +12 -0
- package/types/components/Animated/Fade/index.d.ts +9 -0
- package/types/components/Animated/Scale/index.d.ts +9 -0
- package/types/components/Animated/Slide/index.d.ts +11 -0
- package/types/components/Animated/index.d.ts +3 -0
- package/types/components/Button/index.d.ts +3 -2
- package/types/components/Captcha/index.d.ts +5 -3
- package/types/components/Dialog/index.d.ts +1 -1
- package/types/components/DialogComponent/index.d.ts +19 -0
- package/types/components/DialogRef/index.d.ts +4 -2
- package/types/components/FormInput/index.d.ts +9 -1
- package/types/components/List/index.d.ts +14 -6
- package/types/components/Loading/index.d.ts +6 -4
- package/types/components/Mask/index.d.ts +4 -4
- package/types/components/Page/index.d.ts +7 -5
- package/types/components/Picker/Picker.d.ts +23 -0
- package/types/components/Picker/index.d.ts +15 -0
- package/types/components/Popup/index.d.ts +10 -0
- package/types/components/ScrollView/index.d.ts +11 -0
- package/types/components/Tabbar/components/TabItem.d.ts +9 -0
- package/types/components/Tabbar/components/Tabbar.d.ts +30 -0
- package/types/components/Tabbar/index.d.ts +8 -0
- package/types/components/Tabbar/tabbar/TabItem.d.ts +9 -0
- package/types/components/Tabbar/tabbar/Tabbar.d.ts +30 -0
- package/types/hooks/index.d.ts +23 -0
- package/types/index.d.ts +3 -0
- package/types/utils/index.d.ts +1 -0
- package/dist/index.esm.js +0 -2995
- package/dist/index.esm.js.map +0 -1
- package/dist/styles/components/key.scss +0 -27
- package/lib/components/Dialog/DialogComponent/index.js.map +0 -1
- package/lib/components/NumberKeyboard/Key/index.js +0 -9
- package/lib/components/NumberKeyboard/Key/index.js.map +0 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
const ScrolllView = props => {
|
|
4
|
+
const { children, direction = "y", onScroll, lowerThreshold = 50, onScrollToLower, className, } = props;
|
|
5
|
+
console.log(direction);
|
|
6
|
+
const handleScroll = evt => {
|
|
7
|
+
console.log(evt);
|
|
8
|
+
console.log("evt");
|
|
9
|
+
onScroll && onScroll(evt);
|
|
10
|
+
const scrollTop = evt.target.scrollTop;
|
|
11
|
+
const scrollHeight = evt.target.scrollHeight;
|
|
12
|
+
const offsetHeight = evt.target.offsetHeight;
|
|
13
|
+
if (scrollHeight - (scrollTop + offsetHeight) <= lowerThreshold) {
|
|
14
|
+
onScrollToLower && onScrollToLower();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
const debounce = (fn, delay, ...args) => {
|
|
18
|
+
console.log(args);
|
|
19
|
+
let timer = 0;
|
|
20
|
+
return function (evt) {
|
|
21
|
+
if (timer) {
|
|
22
|
+
clearTimeout(timer);
|
|
23
|
+
timer = null;
|
|
24
|
+
}
|
|
25
|
+
timer = window.setTimeout(() => {
|
|
26
|
+
fn.call(window, evt);
|
|
27
|
+
}, delay);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
const scrollView = classNames("xh-scroll-view", className);
|
|
31
|
+
return (React.createElement("div", { onScroll: debounce(handleScroll, 1000), className: scrollView }, children));
|
|
32
|
+
};
|
|
33
|
+
export default ScrolllView;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ScrollView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAC9C,OAAO,UAAU,MAAM,YAAY,CAAC;AAYpC,MAAM,WAAW,GAA+B,KAAK,CAAC,EAAE;IACtD,MAAM,EACJ,QAAQ,EACR,SAAS,GAAG,GAAG,EACf,QAAQ,EACR,cAAc,GAAG,EAAE,EACnB,eAAe,EACf,SAAS,GACV,GAAG,KAAK,CAAC;IACV,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAEvB,MAAM,YAAY,GAAmC,GAAG,CAAC,EAAE;QACzD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACnB,QAAQ,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC1B,MAAM,SAAS,GAAI,GAAG,CAAC,MAAsB,CAAC,SAAS,CAAC;QACxD,MAAM,YAAY,GAAI,GAAG,CAAC,MAAsB,CAAC,YAAY,CAAC;QAC9D,MAA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
+
import React from "react";
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
const TabItem = (props) => {
|
|
4
|
+
const { children, title, TabItemComponent } = props;
|
|
5
|
+
return (React.createElement("div", { className: "xh-tabbar-item" },
|
|
6
|
+
TabItemComponent ? TabItemComponent : title,
|
|
7
|
+
children));
|
|
8
|
+
};
|
|
9
|
+
export default TabItem;
|
|
10
|
+
//# sourceMappingURL=TabItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabItem.js","sourceRoot":"","sources":["../../../../src/components/Tabbar/tabbar/TabItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D,OAAO,cAAc,CAAC;AAQtB,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACtC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,KAAK,CAAC;IAEpD,OAAO,CACL,6BAAK,SAAS,EAAC,gBAAgB;QAC5B,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK;QAC3C,QAAQ,CACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import { createSelectorQuery } from "@tarojs/taro";
|
|
3
|
+
import { View } from "@tarojs/components";
|
|
4
|
+
import classNames from "classnames";
|
|
5
|
+
import Item from "./TabItem";
|
|
6
|
+
import "./index.scss";
|
|
7
|
+
const XHTabs = props => {
|
|
8
|
+
const { children = [], animated = false, initIndex = 0, lineColor = "#F6AB00", titleActiveColor = "#333", titleInctiveColor = "#999", onChange, } = props;
|
|
9
|
+
const [selectIndex, setSelectIndex] = useState(initIndex);
|
|
10
|
+
const [tabWdith, setTabWdith] = useState(0);
|
|
11
|
+
const [tabContentHeight, setTabContentHeight] = useState(0);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const timer = setTimeout(() => {
|
|
14
|
+
const query = createSelectorQuery();
|
|
15
|
+
query.selectAll(".xh-tabbar-nav-item").boundingClientRect();
|
|
16
|
+
query.selectAll(".xh-tabbar-content-item").boundingClientRect();
|
|
17
|
+
query.exec(res => {
|
|
18
|
+
if (!res[0][selectIndex])
|
|
19
|
+
return;
|
|
20
|
+
const width = res[0][selectIndex].width;
|
|
21
|
+
setTabWdith(width);
|
|
22
|
+
if (!res[1][selectIndex])
|
|
23
|
+
return;
|
|
24
|
+
const height = res[1][selectIndex].height;
|
|
25
|
+
setTabContentHeight(height);
|
|
26
|
+
clearTimeout(timer);
|
|
27
|
+
});
|
|
28
|
+
}, 300);
|
|
29
|
+
console.log(children.length);
|
|
30
|
+
}, [selectIndex, children]);
|
|
31
|
+
const handleClick = (index) => {
|
|
32
|
+
setSelectIndex(index);
|
|
33
|
+
const query = createSelectorQuery();
|
|
34
|
+
query.selectAll(".xh-tabbar-content-item").boundingClientRect();
|
|
35
|
+
query.exec(res => {
|
|
36
|
+
if (!res[0][index])
|
|
37
|
+
return;
|
|
38
|
+
const height = res[0][index].height;
|
|
39
|
+
setTabContentHeight(height);
|
|
40
|
+
});
|
|
41
|
+
onChange && onChange(index);
|
|
42
|
+
};
|
|
43
|
+
function renderLine() {
|
|
44
|
+
const left = tabWdith / 2 + selectIndex * tabWdith;
|
|
45
|
+
return (React.createElement("div", { className: classNames("xh-tabbar-nav-line", {
|
|
46
|
+
"xh-tabbar-nav-line-active": animated,
|
|
47
|
+
}), style: {
|
|
48
|
+
background: `${lineColor}`,
|
|
49
|
+
transform: `translateX(${left}px) translate(-50%, -50%)`,
|
|
50
|
+
WebkitTransform: `translateX(${left}px) translate(-50%, -50%)`,
|
|
51
|
+
} }));
|
|
52
|
+
}
|
|
53
|
+
return (React.createElement(View, { className: "xh-tabbar" },
|
|
54
|
+
React.createElement(View, { className: "xh-tabbar-nav" },
|
|
55
|
+
children.map((child, index) => (React.createElement(View, { key: index, className: "xh-tabbar-nav-item", style: {
|
|
56
|
+
color: selectIndex === index ? titleActiveColor : titleInctiveColor,
|
|
57
|
+
}, onClick: () => handleClick(index) }, child.props.TabItemComponent
|
|
58
|
+
? child.props.TabItemComponent
|
|
59
|
+
: child.props.title))),
|
|
60
|
+
renderLine()),
|
|
61
|
+
React.createElement(View, { className: "xh-tabbar-content", style: {
|
|
62
|
+
width: `${children.length * 100}%`,
|
|
63
|
+
height: tabContentHeight ? `${tabContentHeight}px` : "auto",
|
|
64
|
+
} }, children.map((child, index) => (React.createElement(View, { key: index, className: classNames("xh-tabbar-content-item", {
|
|
65
|
+
"xh-tabbar-content-item-dispaly": selectIndex !== index && !animated,
|
|
66
|
+
"xh-tabbar-content-item-active": selectIndex === index,
|
|
67
|
+
}), style: {
|
|
68
|
+
transform: animated ? `translateX(-${selectIndex * 100}%)` : "",
|
|
69
|
+
} }, child.props.children))))));
|
|
70
|
+
};
|
|
71
|
+
XHTabs.Item = Item;
|
|
72
|
+
export default XHTabs;
|
|
73
|
+
export const TabItem = Item;
|
|
74
|
+
//# sourceMappingURL=Tabbar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabbar.js","sourceRoot":"","sources":["../../../../src/components/Tabbar/tabbar/Tabbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,cAAc,CAAC;AA6BtB,MAAM,MAAM,GAA4B,KAAK,CAAC,EAAE;IAC9C,MAAM,EACJ,QAAQ,GAAG,EAAE,EACb,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,CAAC,EACb,SAAS,GAAG,SAAS,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}, defalutParam), arg);
|
|
31
31
|
}
|
|
32
|
-
return new Promise(
|
|
32
|
+
return new Promise(resolve => {
|
|
33
33
|
if (process.env.TARO_ENV === "h5") {
|
|
34
34
|
const div = document.createElement("div");
|
|
35
35
|
const timer = setTimeout(() => {
|
|
36
|
-
|
|
36
|
+
ReactDOM.unmountComponentAtNode(div);
|
|
37
37
|
clearTimeout(timer);
|
|
38
|
+
resolve();
|
|
38
39
|
}, defalutParam.duration);
|
|
39
40
|
const { title } = defalutParam, other = __rest(defalutParam, ["title"]);
|
|
40
41
|
ReactDOM.render(React.createElement(ToastComponent, Object.assign({ title: title }, other)), div);
|
|
41
42
|
}
|
|
42
43
|
else {
|
|
43
|
-
showToast(Object.assign({ icon: "none" }, defalutParam))
|
|
44
|
+
showToast(Object.assign({ icon: "none" }, defalutParam)).then(res => {
|
|
45
|
+
if (res.errMsg === "showToast:ok") {
|
|
46
|
+
const timer = setTimeout(() => {
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
resolve();
|
|
49
|
+
}, defalutParam.duration);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
44
52
|
}
|
|
45
53
|
});
|
|
46
54
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Toast/index.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,cAA8B,MAAM,SAAS,CAAC;AACrD,OAAO,cAAc,CAAC;AAOtB,KAAK,UAAU,KAAK,CAClB,GAAiC,EACjC,GAAG,IAAI;IAEP,IAAI,YAAY,GAAG;QACjB,KAAK,EAAE,EAAE;QACT,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,IAAI;KACX,CAAC;IACF,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,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BAC5B,QAAQ,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC;gBACrC,YAAY,CAAC,KAAK,CAAC,CAAC;gBACpB,OAAO,EAAE,CAAC;YACZ,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;YAC1B,MAAM,EAAE,KAAK,KAAe,YAAY,EAAtB,KAAK,UAAK,YAAY,EAAlC,SAAmB,CAAe,CAAC;YACzC,QAAQ,CAAC,MAAM,CAAC,oBAAC,cAAc,kBAAC,KAAK,EAAE,KAAK,IAAM,KAAK,EAAI,EAAE,GAAG,CAAC,CAAC;SACnE;aAAM;YACL,SAAS,iBACP,IAAI,EAAE,MAAM,IACT,YAAY,EACf,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBACZ,IAAI,GAAG,CAAC,MAAM,KAAK,cAAc,EAAE;oBACjC,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,EAAE;wBAC5B,YAAY,CAAC,KAAK,CAAC,CAAC;wBACpB,OAAO,EAAE,CAAC;oBACZ,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;iBAC3B;YACH,CAAC,CAAC,CAAC;SACJ;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,eAAe,KAAK,CAAC"}
|
package/lib/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
|
-
import { getEnv } from
|
|
2
|
+
import { getEnv } from "@tarojs/taro";
|
|
3
3
|
export const useTaroEnv = () => {
|
|
4
4
|
const [taroEnv, setTaroEnv] = useState("");
|
|
5
5
|
useEffect(() => {
|
|
@@ -7,4 +7,45 @@ export const useTaroEnv = () => {
|
|
|
7
7
|
}, []);
|
|
8
8
|
return taroEnv;
|
|
9
9
|
};
|
|
10
|
+
export const useTouch = () => {
|
|
11
|
+
const [startPoint, setStartPoint] = useState({ x: 0, y: 0 }); // touch start的point
|
|
12
|
+
const [touchMoveDistance, setTouchMoveDistance] = useState({ x: 0, y: 0 }); // touch的距离
|
|
13
|
+
// const touchMoveDistance = useRef({ x: 0, y: 0 });
|
|
14
|
+
const [touchEndPoint, setTouchEndPoint] = useState({ x: 0, y: 0 }); // touch end的point
|
|
15
|
+
const formatPos = (num) => {
|
|
16
|
+
return Math.floor(num);
|
|
17
|
+
};
|
|
18
|
+
const touchstart = (e) => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
const { clientX, clientY } = e.touches[0];
|
|
21
|
+
setStartPoint({ x: formatPos(clientX), y: formatPos(clientY) });
|
|
22
|
+
};
|
|
23
|
+
const touchmove = (e) => {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
const { pageX, pageY } = e.touches[0];
|
|
26
|
+
let distanceX, distanceY;
|
|
27
|
+
distanceX = formatPos(pageX - startPoint.x);
|
|
28
|
+
distanceY = formatPos(pageY - startPoint.y);
|
|
29
|
+
setTouchMoveDistance({ x: distanceX, y: distanceY });
|
|
30
|
+
};
|
|
31
|
+
const touchend = (e) => {
|
|
32
|
+
const { pageX, pageY } = e.changedTouches[0];
|
|
33
|
+
setTouchEndPoint({ x: formatPos(pageX), y: formatPos(pageY) });
|
|
34
|
+
};
|
|
35
|
+
return {
|
|
36
|
+
touchstart,
|
|
37
|
+
touchend,
|
|
38
|
+
touchmove,
|
|
39
|
+
startPoint: startPoint,
|
|
40
|
+
touchMoveDistance: touchMoveDistance,
|
|
41
|
+
touchEndPoint,
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export const useAsyncEffect = async (fn, deps) => {
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
fn().catch(err => {
|
|
47
|
+
console.log(err);
|
|
48
|
+
});
|
|
49
|
+
}, [deps]);
|
|
50
|
+
};
|
|
10
51
|
//# sourceMappingURL=index.js.map
|
package/lib/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA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AAC,GAAG,EAAE;QACb,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACb,CAAC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -13,4 +13,7 @@ export { default as XHPasswordInput } from "./components/PasswordInput";
|
|
|
13
13
|
export { default as XHProgress } from "./components/Progress";
|
|
14
14
|
export { default as XHToast } from "./components/Toast";
|
|
15
15
|
export { default as XHDialogRef } from "./components/DialogRef";
|
|
16
|
+
export { default as XHTabbar } from "./components/Tabbar";
|
|
17
|
+
export { default as XHPopup } from "./components/Popup";
|
|
18
|
+
export { default as XHPicker } from "./components/Picker";
|
|
16
19
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,E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,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC"}
|
package/lib/utils/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export const inputRange = (val) => {
|
|
7
7
|
let iconRule1 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi;
|
|
8
|
-
return val.replace(iconRule1,
|
|
8
|
+
return val.replace(iconRule1, "");
|
|
9
9
|
};
|
|
10
10
|
// function Handler(fn) {
|
|
11
11
|
// this.handler = fn;
|
|
@@ -38,7 +38,7 @@ export const inputRange = (val) => {
|
|
|
38
38
|
// return callback
|
|
39
39
|
// }
|
|
40
40
|
// public checkPass(...arg) {
|
|
41
|
-
// const result = this.hander.apply(this, arg)
|
|
41
|
+
// const result = this.hander.apply(this, arg)
|
|
42
42
|
// if (!result) {
|
|
43
43
|
// return result
|
|
44
44
|
// }
|
|
@@ -48,4 +48,20 @@ export const inputRange = (val) => {
|
|
|
48
48
|
// return result
|
|
49
49
|
// }
|
|
50
50
|
// }
|
|
51
|
+
export const throtte = (fn, delay = 1500) => {
|
|
52
|
+
let timer;
|
|
53
|
+
let canCall = true;
|
|
54
|
+
return function (arg) {
|
|
55
|
+
if (canCall) {
|
|
56
|
+
canCall = false;
|
|
57
|
+
console.log(arg);
|
|
58
|
+
console.log("arg");
|
|
59
|
+
fn(arg);
|
|
60
|
+
}
|
|
61
|
+
timer = setTimeout(() => {
|
|
62
|
+
canCall = true;
|
|
63
|
+
clearTimeout(timer);
|
|
64
|
+
}, delay);
|
|
65
|
+
};
|
|
66
|
+
};
|
|
51
67
|
//# sourceMappingURL=index.js.map
|
package/lib/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE;IAChD,IAAI,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAW,EAAU,EAAE;IAChD,IAAI,SAAS,GACX,4OAA4O,CAAC;IAC/O,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,yBAAyB;AACzB,uBAAuB;AACvB,sBAAsB;AACtB,IAAI;AAEJ,oDAAoD;AACpD,mBAAmB;AACnB,cAAc;AACd,KAAK;AAEL,gDAAgD;AAChD,qDAAqD;AACrD,YAAY;AACZ,gBAAgB;AAChB,kBAAkB;AAClB,MAAM;AAEN,WAAW;AACX,qBAAqB;AACrB,gEAAgE;AAChE,MAAM;AACN,gBAAgB;AAChB,KAAK;AAEL,6BAA6B;AAC7B,0CAA0C;AAC1C,gBAAgB;AAChB,gDAAgD;AAChD,uBAAuB;AACvB,MAAM;AACN,8CAA8C;AAC9C,2BAA2B;AAC3B,sBAAsB;AACtB,MAAM;AACN,+BAA+B;AAC/B,kDAAkD;AAClD,qBAAqB;AACrB,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-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
2
|
+
"name": "taro-react-uilib",
|
|
3
|
+
"version": "1.0.23",
|
|
4
|
+
"description": "基于taro的跨端组件库",
|
|
5
|
+
"templateInfo": {
|
|
6
|
+
"name": "default",
|
|
7
|
+
"typescript": true,
|
|
8
|
+
"css": "sass"
|
|
9
|
+
},
|
|
10
|
+
"browser": "dist/index.umd.js",
|
|
11
|
+
"module": "dist/index.esm.js",
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"source": "src/index.ts",
|
|
14
|
+
"types": "types/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"lib",
|
|
17
|
+
"dist",
|
|
18
|
+
"types"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build:weapp": "taro build --type weapp",
|
|
22
|
+
"build:h5": "taro build --type h5",
|
|
23
|
+
"build:tt": "taro build --type tt",
|
|
24
|
+
"dev:weapp": "npm run build:weapp -- --watch",
|
|
25
|
+
"dev:h5": "npm run build:h5 -- --watch",
|
|
26
|
+
"dev:tt": "npm run build:tt -- --watch",
|
|
27
|
+
"dev": "yarn run dev:lib",
|
|
28
|
+
"dev:lib": "tsc --project ./tsconfig.build.json --watch --incremental",
|
|
29
|
+
"build": "rimraf dist && yarn run build:rollup && yarn run build:lib",
|
|
30
|
+
"build:lib": "tsc --project ./tsconfig.build.json --declaration --declarationDir types",
|
|
31
|
+
"build:rollup": "rollup --config ./rollup.config.js",
|
|
32
|
+
"prepublishOnly": "yarn run clean && yarn run build",
|
|
33
|
+
"lint": "lint-staged",
|
|
34
|
+
"lint:style": "stylelint \"src/**/*.scss\" --syntax scss",
|
|
35
|
+
"lint:style-fix": "stylelint \"src/**/*.scss\" --syntax scss --fix",
|
|
36
|
+
"test": "cross-env NODE_ENV=test && jest --coverage",
|
|
37
|
+
"test:ci": "yarn run build:h5 && yarn run test",
|
|
38
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md",
|
|
39
|
+
"clean": "rimraf .temp dist lib coverage",
|
|
40
|
+
"prepare": "husky install"
|
|
41
|
+
},
|
|
42
|
+
"husky": {
|
|
43
|
+
"hooks": {
|
|
44
|
+
"pre-commit": "lint-staged"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"lint-staged": {
|
|
48
|
+
"(src|example)/**/*.{ts,tsx}": [
|
|
49
|
+
"eslint --fix",
|
|
50
|
+
"prettier --write --ignore-unknown"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"keywords": [
|
|
54
|
+
"taro",
|
|
55
|
+
"跨端组件库"
|
|
56
|
+
],
|
|
57
|
+
"author": "xiongshiji",
|
|
58
|
+
"license": "MIT",
|
|
59
|
+
"browserslist": [
|
|
60
|
+
"last 3 versions",
|
|
61
|
+
"Android >= 4.1",
|
|
62
|
+
"ios >= 8"
|
|
63
|
+
],
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@babel/core": "^7.8.0",
|
|
66
|
+
"@babel/runtime": "^7.7.7",
|
|
67
|
+
"@commitlint/cli": "16.3.0",
|
|
68
|
+
"@commitlint/config-conventional": "16.2.4",
|
|
69
|
+
"@rollup/plugin-alias": "^3.1.9",
|
|
70
|
+
"@rollup/plugin-commonjs": "^13.0.0",
|
|
71
|
+
"@rollup/plugin-image": "^2.1.1",
|
|
72
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
73
|
+
"@rollup/plugin-node-resolve": "^8.0.1",
|
|
74
|
+
"@tarojs/cli": "3.5.6",
|
|
75
|
+
"@tarojs/components": "3.4.2",
|
|
76
|
+
"@tarojs/mini-runner": "3.4.2",
|
|
77
|
+
"@tarojs/plugin-framework-react": "^3.4.6",
|
|
78
|
+
"@tarojs/plugin-html": "^3.4.13",
|
|
79
|
+
"@tarojs/react": "3.4.2",
|
|
80
|
+
"@tarojs/runtime": "3.4.2",
|
|
81
|
+
"@tarojs/taro": "3.4.2",
|
|
82
|
+
"@tarojs/webpack-runner": "3.4.2",
|
|
83
|
+
"@types/react": "^17.0.2",
|
|
84
|
+
"@types/webpack-env": "^1.13.6",
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^5.24.0",
|
|
86
|
+
"@typescript-eslint/parser": "^5.24.0",
|
|
87
|
+
"babel-preset-taro": "3.4.2",
|
|
88
|
+
"commitizen": "^4.2.4",
|
|
89
|
+
"conventional-changelog-cli": "^2.2.2",
|
|
90
|
+
"cross-env": "^7.0.2",
|
|
91
|
+
"cz-conventional-changelog": "3.3.0",
|
|
92
|
+
"eslint": "^7.2.0",
|
|
93
|
+
"eslint-config-taro": "3.4.2",
|
|
94
|
+
"eslint-plugin-import": "^2.21.2",
|
|
95
|
+
"eslint-plugin-react": "^7.20.0",
|
|
96
|
+
"eslint-plugin-react-hooks": "^4.2.0",
|
|
97
|
+
"husky": "7",
|
|
98
|
+
"jest": "26",
|
|
99
|
+
"lint-staged": "^12.4.1",
|
|
100
|
+
"postcss": "^8.4.12",
|
|
101
|
+
"prettier": "^2.6.2",
|
|
102
|
+
"react": "^17.0.0",
|
|
103
|
+
"react-dom": "^17.0.0",
|
|
104
|
+
"rimraf": "3.0.2",
|
|
105
|
+
"rollup": "^2.70.2",
|
|
106
|
+
"rollup-plugin-copy": "^3.3.0",
|
|
107
|
+
"rollup-plugin-ignore-import": "^1.3.2",
|
|
108
|
+
"rollup-plugin-postcss": "^4.0.2",
|
|
109
|
+
"rollup-plugin-serve": "^1.1.0",
|
|
110
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
111
|
+
"rollup-plugin-typescript2": "^0.27.1",
|
|
112
|
+
"rollup-plugin-visualizer": "^4.0.4",
|
|
113
|
+
"sass": "^1.50.0",
|
|
114
|
+
"stylelint": "13.6.0",
|
|
115
|
+
"stylelint-config-standard": "20.0.0",
|
|
116
|
+
"stylelint-scss": "3.17.2",
|
|
117
|
+
"ts-jest": "26",
|
|
118
|
+
"tslib": "^2.4.0",
|
|
119
|
+
"typescript": "^4.1.0"
|
|
120
|
+
},
|
|
121
|
+
"peerDependencies": {
|
|
122
|
+
"@tarojs/components": "^3.0.8",
|
|
123
|
+
"@tarojs/react": "^3.0.8",
|
|
124
|
+
"@types/node": "^14.0.13",
|
|
125
|
+
"react": ">=16.13.0",
|
|
126
|
+
"react-dom": ">=16.13.0"
|
|
127
|
+
},
|
|
128
|
+
"config": {
|
|
129
|
+
"commitizen": {
|
|
130
|
+
"path": "./node_modules/cz-conventional-changelog"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"dependencies": {
|
|
134
|
+
"react-transition-group": "^4.4.2"
|
|
135
|
+
}
|
|
133
136
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC, PropsWithChildren } from "react";
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
export interface AnimatedProps extends PropsWithChildren<{}> {
|
|
4
|
+
in: boolean;
|
|
5
|
+
appear?: boolean;
|
|
6
|
+
timeout?: number;
|
|
7
|
+
name?: string;
|
|
8
|
+
onExited?: () => void;
|
|
9
|
+
unmountOnExit?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const Animated: FC<AnimatedProps>;
|
|
12
|
+
export default Animated;
|