taro-ui 3.1.1 → 3.2.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.esm.js +702 -767
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +702 -767
- package/dist/index.js.map +1 -1
- package/lib/common/component.js.map +1 -1
- package/lib/common/utils.js +14 -1
- package/lib/common/utils.js.map +1 -1
- package/lib/components/accordion/index.js +6 -3
- package/lib/components/accordion/index.js.map +1 -1
- package/lib/components/action-sheet/body/index.js.map +1 -1
- package/lib/components/action-sheet/body/item/index.js.map +1 -1
- package/lib/components/action-sheet/footer/index.js.map +1 -1
- package/lib/components/action-sheet/header/index.js.map +1 -1
- package/lib/components/activity-indicator/index.js.map +1 -1
- package/lib/components/calendar/body/index.js +1 -1
- package/lib/components/calendar/body/index.js.map +1 -1
- package/lib/components/calendar/common/helper.js +4 -2
- package/lib/components/calendar/common/helper.js.map +1 -1
- package/lib/components/calendar/common/plugins.js +4 -3
- package/lib/components/calendar/common/plugins.js.map +1 -1
- package/lib/components/calendar/controller/index.js.map +1 -1
- package/lib/components/card/index.js +2 -3
- package/lib/components/card/index.js.map +1 -1
- package/lib/components/countdown/index.js +12 -6
- package/lib/components/countdown/index.js.map +1 -1
- package/lib/components/countdown/item/index.js.map +1 -1
- package/lib/components/divider/index.js +1 -1
- package/lib/components/divider/index.js.map +1 -1
- package/lib/components/float-layout/index.js +5 -17
- package/lib/components/float-layout/index.js.map +1 -1
- package/lib/components/grid/index.js +1 -2
- package/lib/components/grid/index.js.map +1 -1
- package/lib/components/image-picker/index.js +4 -3
- package/lib/components/image-picker/index.js.map +1 -1
- package/lib/components/input/index.js +1 -4
- package/lib/components/input/index.js.map +1 -1
- package/lib/components/input-number/index.js +4 -4
- package/lib/components/input-number/index.js.map +1 -1
- package/lib/components/list/item/index.js +25 -17
- package/lib/components/list/item/index.js.map +1 -1
- package/lib/components/modal/content/index.js.map +1 -1
- package/lib/components/modal/index.js +1 -7
- package/lib/components/modal/index.js.map +1 -1
- package/lib/components/noticebar/index.js +0 -4
- package/lib/components/noticebar/index.js.map +1 -1
- package/lib/components/range/index.js +6 -5
- package/lib/components/range/index.js.map +1 -1
- package/lib/components/search-bar/index.js +3 -1
- package/lib/components/search-bar/index.js.map +1 -1
- package/lib/components/segmented-control/index.js.map +1 -1
- package/lib/components/swipe-action/options/index.js.map +1 -1
- package/lib/components/switch/index.js.map +1 -1
- package/lib/components/tab-bar/index.js +1 -1
- package/lib/components/tab-bar/index.js.map +1 -1
- package/lib/components/tabs/index.js +1 -3
- package/lib/components/tabs/index.js.map +1 -1
- package/lib/components/timeline/index.js +5 -2
- package/lib/components/timeline/index.js.map +1 -1
- package/lib/components/toast/index.js +0 -2
- package/lib/components/toast/index.js.map +1 -1
- package/package.json +46 -35
- package/rn/components/float-layout/index.tsx +13 -22
- package/rn/components/input/index.tsx +0 -2
- package/rn/components/list/item/index.tsx +35 -27
- package/rn/components/modal/index.tsx +1 -3
- package/rn/components/timeline/index.tsx +5 -1
- package/types/accordion.d.ts +2 -1
- package/types/card.d.ts +2 -2
- package/types/list.d.ts +7 -1
- package/types/tab-bar.d.ts +5 -5
- package/types/timeline.d.ts +7 -0
- package/README.md +0 -87
- package/dist/style/common.scss +0 -10
- package/lib/tsconfig.build.tsbuildinfo +0 -39858
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/timeline/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,SAAyB,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAG/C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,SAA0B;IAI/D,MAAM;QACX,MAAM,EAAE,OAAO,EAAE,KAA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AU,CAAC,SAAS,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;IAC1C,WAAW,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACvE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/toast/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,SAAyB,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAG1C;IAMC,YAAmB,KAAmB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/toast/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,SAAyB,MAAM,YAAY,CAAA;AAClD,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAGtD,OAAO,SAAS,MAAM,YAAY,CAAA;AAElC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAG1C;IAMC,YAAmB,KAAmB;QACpC,KAAK,CAAC,KAAK,CAAC,CAAA;QAgDN,gBAAW,GAAG,CAAC,KAAkB,EAAQ,EAAE;YACjD,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;YACtC,IA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AAE,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAC5D,OAAO,EAAE,SAAS,CAAC,IAAI;IACvB,OAAO,EAAE,SAAS,CAAC,IAAI;CACxB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taro-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-beta.0",
|
|
4
4
|
"description": "UI KIT for Taro",
|
|
5
5
|
"module": "dist/index.esm.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,31 +23,12 @@
|
|
|
23
23
|
"rn"
|
|
24
24
|
],
|
|
25
25
|
"author": "O2Team <aotu.io>",
|
|
26
|
-
"homepage": "https://taro-ui.
|
|
26
|
+
"homepage": "https://taro-ui.taro.zone",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
29
|
"url": "git@github.com:nervjs/taro-ui.git"
|
|
30
30
|
},
|
|
31
31
|
"license": "MIT",
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"tag": "next"
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"dev": "yarn run dev:lib",
|
|
37
|
-
"dev:lib": "tsc --project ./tsconfig.build.json --watch --incremental",
|
|
38
|
-
"dev:rollup": "rollup --config ./config/rollup.config.js --watch",
|
|
39
|
-
"build": "yarn run build:rollup && yarn run build:lib",
|
|
40
|
-
"build:lib": "tsc --project ./tsconfig.build.json",
|
|
41
|
-
"build:rollup": "rollup --config ./config/rollup.config.js",
|
|
42
|
-
"lint": "eslint ./src --fix",
|
|
43
|
-
"lint:style": "stylelint \"src/**/*.scss\" --syntax scss",
|
|
44
|
-
"lint:style-fix": "stylelint \"src/**/*.scss\" --syntax scss --fix",
|
|
45
|
-
"test": "cross-env NODE_ENV=test && jest --coverage",
|
|
46
|
-
"test:ci": "yarn run build:h5 && yarn run test",
|
|
47
|
-
"test:analyze": "rollup --config ./config/rollup.config.analyze.js",
|
|
48
|
-
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
49
|
-
"clean": "rimraf .temp dist lib coverage"
|
|
50
|
-
},
|
|
51
32
|
"dependencies": {
|
|
52
33
|
"classnames": "^2.2.6",
|
|
53
34
|
"dayjs": "^1.7.7",
|
|
@@ -57,33 +38,63 @@
|
|
|
57
38
|
},
|
|
58
39
|
"devDependencies": {
|
|
59
40
|
"@rollup/plugin-commonjs": "^11.0.2",
|
|
41
|
+
"@tarojs/plugin-platform-alipay": "3.6.6",
|
|
42
|
+
"@tarojs/plugin-platform-h5": "3.6.6",
|
|
43
|
+
"@tarojs/plugin-platform-jd": "3.6.6",
|
|
44
|
+
"@tarojs/plugin-platform-qq": "3.6.6",
|
|
45
|
+
"@tarojs/plugin-platform-swan": "3.6.6",
|
|
46
|
+
"@tarojs/plugin-platform-tt": "3.6.6",
|
|
47
|
+
"@tarojs/plugin-platform-weapp": "3.6.6",
|
|
48
|
+
"@tarojs/taro-rn": "3.6.6",
|
|
60
49
|
"@rollup/plugin-json": "^4.0.2",
|
|
61
50
|
"@rollup/plugin-node-resolve": "^7.1.1",
|
|
62
51
|
"@tarojs/components": "3.6.6",
|
|
63
52
|
"@tarojs/react": "3.6.6",
|
|
64
|
-
"@tarojs/taro": "3.6.6",
|
|
65
53
|
"@tarojs/runtime-rn": "3.6.6",
|
|
54
|
+
"@tarojs/taro": "3.6.6",
|
|
66
55
|
"@types/classnames": "^2.2.9",
|
|
67
|
-
"@types/node": "
|
|
68
|
-
"@types/react": "^18.2.0",
|
|
69
|
-
"@types/react-dom": "^18.2.0",
|
|
56
|
+
"@types/node": "~16.6.0",
|
|
70
57
|
"@types/react-native": "^0.64.13",
|
|
71
58
|
"camelize": "^1.0.0",
|
|
72
|
-
"react": "^18.2.0",
|
|
73
|
-
"react-dom": "^18.2.0",
|
|
74
59
|
"react-native": "^0.71.6",
|
|
75
|
-
"rollup": "^2.
|
|
76
|
-
"rollup-plugin-
|
|
77
|
-
"rollup-plugin-
|
|
78
|
-
"rollup-plugin-
|
|
60
|
+
"rollup": "^2.79.0",
|
|
61
|
+
"rollup-plugin-ts": "^3.0.2",
|
|
62
|
+
"rollup-plugin-copy": "^3.4.0",
|
|
63
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
64
|
+
"rollup-plugin-visualizer": "^4.0.2",
|
|
65
|
+
"typescript": "^4.7.4"
|
|
79
66
|
},
|
|
80
67
|
"peerDependencies": {
|
|
81
|
-
"@tarojs/taro": ">=3",
|
|
82
68
|
"@tarojs/components": ">=3",
|
|
83
69
|
"@tarojs/react": ">=3",
|
|
70
|
+
"@tarojs/taro": ">=3",
|
|
84
71
|
"react": ">=16.13.0",
|
|
85
72
|
"react-dom": ">=16.13.0",
|
|
86
|
-
"react-native": ">=0.62.0"
|
|
73
|
+
"react-native": ">=0.62.0",
|
|
74
|
+
"@tarojs/plugin-platform-alipay": "3.6.6",
|
|
75
|
+
"@tarojs/plugin-platform-h5": "3.6.6",
|
|
76
|
+
"@tarojs/plugin-platform-jd": "3.6.6",
|
|
77
|
+
"@tarojs/plugin-platform-qq": "3.6.6",
|
|
78
|
+
"@tarojs/plugin-platform-swan": "3.6.6",
|
|
79
|
+
"@tarojs/plugin-platform-tt": "3.6.6",
|
|
80
|
+
"@tarojs/plugin-platform-weapp": "3.6.6",
|
|
81
|
+
"@tarojs/taro-rn": "3.6.6"
|
|
87
82
|
},
|
|
88
|
-
"gitHead": "c33cc7fbb734f0dbdd6e305dda1bc8300e5adbe2"
|
|
89
|
-
|
|
83
|
+
"gitHead": "c33cc7fbb734f0dbdd6e305dda1bc8300e5adbe2",
|
|
84
|
+
"scripts": {
|
|
85
|
+
"dev": "pnpm run dev:lib",
|
|
86
|
+
"dev:lib": "tsc --project ./tsconfig.build.json --watch --incremental",
|
|
87
|
+
"dev:rollup": "rollup --config ./config/rollup.config.js --watch",
|
|
88
|
+
"build": "pnpm run build:rollup && pnpm run build:lib",
|
|
89
|
+
"build:lib": "tsc --project ./tsconfig.build.json",
|
|
90
|
+
"build:rollup": "rollup --config ./config/rollup.config.js",
|
|
91
|
+
"lint": "eslint ./src --fix",
|
|
92
|
+
"lint:style": "stylelint \"src/**/*.scss\" --syntax scss",
|
|
93
|
+
"lint:style-fix": "stylelint \"src/**/*.scss\" --syntax scss --fix",
|
|
94
|
+
"test": "cross-env NODE_ENV=test && jest --coverage",
|
|
95
|
+
"test:ci": "pnpm run build:h5 && pnpm run test",
|
|
96
|
+
"test:analyze": "rollup --config ./config/rollup.config.analyze.js",
|
|
97
|
+
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
|
98
|
+
"clean": "rimraf .temp dist lib coverage"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -5,7 +5,7 @@ import { ScrollView, Text, View } from '@tarojs/components'
|
|
|
5
5
|
import { Modal, Animated, Dimensions } from 'react-native'
|
|
6
6
|
import {
|
|
7
7
|
AtFloatLayoutProps,
|
|
8
|
-
AtFloatLayoutState
|
|
8
|
+
AtFloatLayoutState
|
|
9
9
|
} from '../../../types/float-layout'
|
|
10
10
|
import { handleTouchScroll } from '../../common/utils'
|
|
11
11
|
import AtIcon from '../icon'
|
|
@@ -25,7 +25,7 @@ export default class AtFloatLayout extends React.Component<
|
|
|
25
25
|
const { isOpened } = props
|
|
26
26
|
this.state = {
|
|
27
27
|
_isOpened: isOpened,
|
|
28
|
-
translateY: 0
|
|
28
|
+
translateY: 0
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -43,7 +43,7 @@ export default class AtFloatLayout extends React.Component<
|
|
|
43
43
|
|
|
44
44
|
animating = false
|
|
45
45
|
|
|
46
|
-
private animateLayout(isOpened: boolean, cb?:
|
|
46
|
+
private animateLayout(isOpened: boolean, cb?: () => void): void {
|
|
47
47
|
this.animating = true
|
|
48
48
|
let fromValue
|
|
49
49
|
let toValue
|
|
@@ -61,36 +61,33 @@ export default class AtFloatLayout extends React.Component<
|
|
|
61
61
|
|
|
62
62
|
this.setState(
|
|
63
63
|
{
|
|
64
|
-
translateY
|
|
64
|
+
translateY
|
|
65
65
|
},
|
|
66
66
|
() => {
|
|
67
67
|
setTimeout(() => {
|
|
68
68
|
this.setState(
|
|
69
69
|
{
|
|
70
|
-
_isOpened: isOpened
|
|
70
|
+
_isOpened: isOpened
|
|
71
71
|
},
|
|
72
72
|
() => {
|
|
73
73
|
cb && cb()
|
|
74
|
-
}
|
|
74
|
+
}
|
|
75
75
|
)
|
|
76
76
|
}, setStateDelay)
|
|
77
77
|
|
|
78
78
|
Animated.timing(this.state.translateY, {
|
|
79
79
|
toValue,
|
|
80
80
|
duration,
|
|
81
|
-
useNativeDriver: true
|
|
81
|
+
useNativeDriver: true
|
|
82
82
|
}).start(() => {
|
|
83
83
|
this.animating = false
|
|
84
84
|
})
|
|
85
|
-
}
|
|
85
|
+
}
|
|
86
86
|
)
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
private handleClose = (): void => {
|
|
90
90
|
if (typeof this.props.onClose === 'function') {
|
|
91
|
-
// TODO: Fix typings
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
93
|
-
// @ts-ignore
|
|
94
91
|
this.props.onClose()
|
|
95
92
|
}
|
|
96
93
|
}
|
|
@@ -112,15 +109,15 @@ export default class AtFloatLayout extends React.Component<
|
|
|
112
109
|
scrollLeft,
|
|
113
110
|
upperThreshold,
|
|
114
111
|
lowerThreshold,
|
|
115
|
-
scrollWithAnimation
|
|
112
|
+
scrollWithAnimation
|
|
116
113
|
} = this.props
|
|
117
114
|
|
|
118
115
|
const rootClass = classNames(
|
|
119
116
|
'at-float-layout',
|
|
120
117
|
{
|
|
121
|
-
'at-float-layout--active': _isOpened
|
|
118
|
+
'at-float-layout--active': _isOpened
|
|
122
119
|
},
|
|
123
|
-
this.props.className
|
|
120
|
+
this.props.className
|
|
124
121
|
)
|
|
125
122
|
|
|
126
123
|
return (
|
|
@@ -162,14 +159,8 @@ export default class AtFloatLayout extends React.Component<
|
|
|
162
159
|
upperThreshold={upperThreshold}
|
|
163
160
|
lowerThreshold={lowerThreshold}
|
|
164
161
|
scrollWithAnimation={scrollWithAnimation}
|
|
165
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
166
|
-
// @ts-ignore // TODO: Fix typings
|
|
167
162
|
onScroll={this.props.onScroll}
|
|
168
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
169
|
-
// @ts-ignore // TODO: Fix typings
|
|
170
163
|
onScrollToLower={this.props.onScrollToLower}
|
|
171
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
172
|
-
// @ts-ignore // TODO: Fix typings
|
|
173
164
|
onScrollToUpper={this.props.onScrollToUpper}
|
|
174
165
|
className='layout-body__content'
|
|
175
166
|
>
|
|
@@ -189,7 +180,7 @@ AtFloatLayout.defaultProps = {
|
|
|
189
180
|
|
|
190
181
|
scrollY: true,
|
|
191
182
|
scrollX: false,
|
|
192
|
-
scrollWithAnimation: false
|
|
183
|
+
scrollWithAnimation: false
|
|
193
184
|
}
|
|
194
185
|
|
|
195
186
|
AtFloatLayout.propTypes = {
|
|
@@ -205,5 +196,5 @@ AtFloatLayout.propTypes = {
|
|
|
205
196
|
onClose: PropTypes.func,
|
|
206
197
|
onScroll: PropTypes.func,
|
|
207
198
|
onScrollToLower: PropTypes.func,
|
|
208
|
-
onScrollToUpper: PropTypes.func
|
|
199
|
+
onScrollToUpper: PropTypes.func
|
|
209
200
|
}
|
|
@@ -194,8 +194,6 @@ export default class AtInput extends React.Component<AtInputProps> {
|
|
|
194
194
|
onFocus={this.handleFocus}
|
|
195
195
|
onBlur={this.handleBlur}
|
|
196
196
|
onConfirm={this.handleConfirm}
|
|
197
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
198
|
-
// @ts-ignore
|
|
199
197
|
onKeyboardHeightChange={this.handleKeyboardHeightChange}
|
|
200
198
|
/>
|
|
201
199
|
{clear && value && (
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/ban-ts-ignore */
|
|
2
1
|
import classNames from 'classnames'
|
|
3
2
|
import PropTypes, { InferProps } from 'prop-types'
|
|
4
3
|
import React from 'react'
|
|
@@ -7,7 +6,6 @@ import { Image, Switch, Text, View } from '@tarojs/components'
|
|
|
7
6
|
import { CommonEvent, ITouchEvent } from '@tarojs/components/types/common'
|
|
8
7
|
import { AtListItemProps } from '../../../../types/list'
|
|
9
8
|
import AtIcon from '../../icon'
|
|
10
|
-
// @ts-ignore
|
|
11
9
|
|
|
12
10
|
export default class AtListItem extends React.Component<AtListItemProps> {
|
|
13
11
|
public static defaultProps: AtListItemProps
|
|
@@ -44,6 +42,7 @@ export default class AtListItem extends React.Component<AtListItemProps> {
|
|
|
44
42
|
extraThumb,
|
|
45
43
|
switchColor,
|
|
46
44
|
switchIsCheck,
|
|
45
|
+
icon
|
|
47
46
|
} = this.props
|
|
48
47
|
|
|
49
48
|
let { extraText, title } = this.props
|
|
@@ -57,9 +56,9 @@ export default class AtListItem extends React.Component<AtListItemProps> {
|
|
|
57
56
|
'at-list__item--thumb': thumb,
|
|
58
57
|
'at-list__item--multiple': note,
|
|
59
58
|
'at-list__item--disabled': disabled,
|
|
60
|
-
'at-list__item--no-border': !hasBorder
|
|
59
|
+
'at-list__item--no-border': !hasBorder
|
|
61
60
|
},
|
|
62
|
-
this.props.className
|
|
61
|
+
this.props.className
|
|
63
62
|
)
|
|
64
63
|
|
|
65
64
|
// const iconClass = classNames(
|
|
@@ -73,11 +72,38 @@ export default class AtListItem extends React.Component<AtListItemProps> {
|
|
|
73
72
|
// )
|
|
74
73
|
|
|
75
74
|
const containerClass = classNames('at-list__item-container', {
|
|
76
|
-
'at-list__item-container--disabled': disabled
|
|
75
|
+
'at-list__item-container--disabled': disabled
|
|
77
76
|
})
|
|
78
77
|
|
|
79
78
|
const TouchView = disabled ? View : TouchableHighlight
|
|
80
79
|
|
|
80
|
+
const renderIcon = () => {
|
|
81
|
+
if (icon) {
|
|
82
|
+
return <View className='item-icon'>{icon}</View>
|
|
83
|
+
} else if (iconInfo?.value) {
|
|
84
|
+
return (
|
|
85
|
+
<View className='at-list__item-icon item-icon'>
|
|
86
|
+
<AtIcon
|
|
87
|
+
value={iconInfo.value}
|
|
88
|
+
size={iconInfo.size}
|
|
89
|
+
color={iconInfo.color}
|
|
90
|
+
customStyle={iconInfo.customStyle}
|
|
91
|
+
/>
|
|
92
|
+
</View>
|
|
93
|
+
)
|
|
94
|
+
} else if (thumb) {
|
|
95
|
+
return (
|
|
96
|
+
<View className='at-list__item--thumb'>
|
|
97
|
+
<Image
|
|
98
|
+
className='at-list__item--thumb__info'
|
|
99
|
+
mode='scaleToFill'
|
|
100
|
+
src={thumb}
|
|
101
|
+
/>
|
|
102
|
+
</View>
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
81
107
|
return (
|
|
82
108
|
<TouchView
|
|
83
109
|
activeOpacity={1}
|
|
@@ -87,25 +113,7 @@ export default class AtListItem extends React.Component<AtListItemProps> {
|
|
|
87
113
|
onPress={this.handleClick}
|
|
88
114
|
>
|
|
89
115
|
<View className={containerClass}>
|
|
90
|
-
{
|
|
91
|
-
<View className='at-list__item--thumb'>
|
|
92
|
-
<Image
|
|
93
|
-
className='at-list__item--thumb__info'
|
|
94
|
-
mode='scaleToFill'
|
|
95
|
-
src={thumb}
|
|
96
|
-
/>
|
|
97
|
-
</View>
|
|
98
|
-
)}
|
|
99
|
-
{iconInfo && iconInfo.value && (
|
|
100
|
-
<View className='at-list__item-icon item-icon'>
|
|
101
|
-
<AtIcon
|
|
102
|
-
value={iconInfo.value}
|
|
103
|
-
size={iconInfo.size}
|
|
104
|
-
color={iconInfo.color}
|
|
105
|
-
customStyle={iconInfo.customStyle}
|
|
106
|
-
/>
|
|
107
|
-
</View>
|
|
108
|
-
)}
|
|
116
|
+
{renderIcon()}
|
|
109
117
|
<View className='at-list__item-content'>
|
|
110
118
|
<View className='at-list__item-content__info'>
|
|
111
119
|
<Text
|
|
@@ -186,7 +194,7 @@ AtListItem.defaultProps = {
|
|
|
186
194
|
switchIsCheck: false,
|
|
187
195
|
extraText: '',
|
|
188
196
|
extraThumb: '',
|
|
189
|
-
iconInfo: { value: '' }
|
|
197
|
+
iconInfo: { value: '' }
|
|
190
198
|
}
|
|
191
199
|
|
|
192
200
|
AtListItem.propTypes = {
|
|
@@ -209,6 +217,6 @@ AtListItem.propTypes = {
|
|
|
209
217
|
color: PropTypes.string,
|
|
210
218
|
prefixClass: PropTypes.string,
|
|
211
219
|
customStyle: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
212
|
-
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string])
|
|
213
|
-
})
|
|
220
|
+
className: PropTypes.oneOfType([PropTypes.array, PropTypes.string])
|
|
221
|
+
})
|
|
214
222
|
}
|
|
@@ -72,7 +72,7 @@ export default class AtModal extends React.Component<
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
private animateLayout(isOpened: boolean, cb?:
|
|
75
|
+
private animateLayout(isOpened: boolean, cb?: () => void): void {
|
|
76
76
|
let fromValue
|
|
77
77
|
let toValue
|
|
78
78
|
let setStateDelay = 0
|
|
@@ -152,8 +152,6 @@ export default class AtModal extends React.Component<
|
|
|
152
152
|
<View className='content-simple'>
|
|
153
153
|
{isWEB ? (
|
|
154
154
|
<Text
|
|
155
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
156
|
-
// @ts-ignore
|
|
157
155
|
dangerouslySetInnerHTML={{
|
|
158
156
|
__html: content.replace(/\n/g, '<br/>')
|
|
159
157
|
}}
|
|
@@ -11,7 +11,7 @@ export default class AtTimeline extends React.Component<AtTimelineProps> {
|
|
|
11
11
|
public static propTypes: InferProps<AtTimelineProps>
|
|
12
12
|
|
|
13
13
|
public render(): JSX.Element {
|
|
14
|
-
const { pending, items, customStyle } = this.props
|
|
14
|
+
const { pending, items, customStyle, onClickItem } = this.props
|
|
15
15
|
|
|
16
16
|
const rootClassName = ['at-timeline']
|
|
17
17
|
if (pending) rootClassName.push('at-timeline--pending')
|
|
@@ -50,10 +50,14 @@ export default class AtTimeline extends React.Component<AtTimelineProps> {
|
|
|
50
50
|
|
|
51
51
|
const hideStyle = isLast ? { display: 'none' } : {}
|
|
52
52
|
|
|
53
|
+
const handleItemClick = (index, e) => {
|
|
54
|
+
onClickItem?.(index, e)
|
|
55
|
+
}
|
|
53
56
|
return (
|
|
54
57
|
<View
|
|
55
58
|
className={classNames(itemRootClassName)}
|
|
56
59
|
key={`at-timeline-item-${index}`}
|
|
60
|
+
onClick={e => handleItemClick(index, e)}
|
|
57
61
|
>
|
|
58
62
|
<View
|
|
59
63
|
className='at-timeline-item__tail'
|
package/types/accordion.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentClass } from 'react'
|
|
2
2
|
import { CommonEvent } from '@tarojs/components/types/common'
|
|
3
3
|
|
|
4
4
|
import AtComponent, { AtIconBaseProps } from './base'
|
|
@@ -40,6 +40,7 @@ export interface AtAccordionProps extends AtComponent {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export interface AtAccordionState {
|
|
43
|
+
componentId?: string
|
|
43
44
|
wrapperHeight: number
|
|
44
45
|
}
|
|
45
46
|
|
package/types/card.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentClass } from 'react'
|
|
2
2
|
import { CommonEventFunction } from '@tarojs/components/types/common'
|
|
3
3
|
|
|
4
4
|
import AtComponent, { AtIconBaseProps } from './base'
|
|
@@ -23,7 +23,7 @@ export interface AtCardProps extends AtComponent {
|
|
|
23
23
|
/**
|
|
24
24
|
* 元素的额外信息
|
|
25
25
|
*/
|
|
26
|
-
extra?: string
|
|
26
|
+
extra?: JSX.Element | string
|
|
27
27
|
/**
|
|
28
28
|
* 元素的额外信息自定义样式
|
|
29
29
|
*/
|
package/types/list.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentClass } from 'react'
|
|
2
2
|
import { CommonEventFunction } from '@tarojs/components/types/common'
|
|
3
3
|
|
|
4
4
|
import AtComponent, { AtIconBaseProps } from './base'
|
|
@@ -55,8 +55,14 @@ export interface AtListItemProps extends AtComponent {
|
|
|
55
55
|
switchColor?: string
|
|
56
56
|
/**
|
|
57
57
|
* icon 信息
|
|
58
|
+
*
|
|
58
59
|
*/
|
|
59
60
|
iconInfo?: AtIconBaseProps
|
|
61
|
+
/**
|
|
62
|
+
* 自定义 icon
|
|
63
|
+
*
|
|
64
|
+
*/
|
|
65
|
+
icon?: JSX.Element
|
|
60
66
|
/**
|
|
61
67
|
* 箭头的方向
|
|
62
68
|
*/
|
package/types/tab-bar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode, ComponentClass } from 'react'
|
|
2
2
|
import { CommonEvent } from '@tarojs/components/types/common'
|
|
3
3
|
|
|
4
4
|
import AtComponent from './base'
|
|
@@ -20,21 +20,21 @@ export interface TabItem {
|
|
|
20
20
|
/**
|
|
21
21
|
* 标题
|
|
22
22
|
*/
|
|
23
|
-
title:
|
|
23
|
+
title: ReactNode
|
|
24
24
|
/**
|
|
25
25
|
* icon className 前缀,用于第三方字体图标库,
|
|
26
26
|
* 比如想使用'fa fa-clock' 的图标,则传入 iconPrefixClass='fa' iconType='clock',
|
|
27
|
-
* 参考[拓展图标库详细](https://taro-ui.
|
|
27
|
+
* 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon)
|
|
28
28
|
*/
|
|
29
29
|
iconPrefixClass?: string
|
|
30
30
|
/**
|
|
31
31
|
* 未选中时展示的 icon 类型,可扩展第三方字体图标库,
|
|
32
|
-
* 参考[拓展图标库详细](https://taro-ui.
|
|
32
|
+
* 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon)
|
|
33
33
|
*/
|
|
34
34
|
iconType?: string
|
|
35
35
|
/**
|
|
36
36
|
* 选中时展示的 icon 类型,可扩展第三方字体图标库,
|
|
37
|
-
* 参考[拓展图标库详细](https://taro-ui.
|
|
37
|
+
* 参考[拓展图标库详细](https://taro-ui.taro.zone/#/docs/icon)
|
|
38
38
|
*/
|
|
39
39
|
selectedIconType?: string
|
|
40
40
|
/**
|
package/types/timeline.d.ts
CHANGED
|
@@ -32,6 +32,13 @@ export interface AtTimelineProps extends AtComponent {
|
|
|
32
32
|
* 需展示的内容
|
|
33
33
|
*/
|
|
34
34
|
items: Array<Item>
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 点击 item 触发的事件
|
|
38
|
+
* @param {number} current 当前点击的 item 的索引值
|
|
39
|
+
* @param {MouseEvent} event
|
|
40
|
+
*/
|
|
41
|
+
onClickItem?: (current: number, event: MouseEvent) => void
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
declare const AtTimeline: ComponentClass<AtTimelineProps>
|
package/README.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Taro UI
|
|
2
|
-
|
|
3
|
-
[![NPM][npm-version-image]][npm-version-url] [![NPM Downloads][npm-downloads-image]][npm-downloads-url] [![david-dm][david-dm-image]][david-dm-url] [![License][license-image]][license-url]
|
|
4
|
-
|
|
5
|
-
一款基于 `Taro` 框架开发的多端 UI 组件库
|
|
6
|
-
|
|
7
|
-
> Taro UI 3 目前仍在开发中,`alpha` 版本可能会出现较大改动并且不保证功能完整可用,请谨慎使用。
|
|
8
|
-
|
|
9
|
-
## 特性
|
|
10
|
-
|
|
11
|
-
- 基于 `Taro` 开发 UI 组件
|
|
12
|
-
- 一套组件可以在 `微信小程序`,`支付宝小程序`,`百度小程序`,`H5`,`ReactNative` 多端适配运行
|
|
13
|
-
- 提供友好的 API,可灵活的使用组件
|
|
14
|
-
|
|
15
|
-
## 关于 Taro
|
|
16
|
-
|
|
17
|
-
Taro 是由 [凹凸实验室](https://aotu.io) 倾力打造的多端开发解决方案。现如今市面上端的形态多种多样,Web、ReactNative、微信小程序等各种端大行其道,当业务要求同时在不同的端都要求有所表现的时候,针对不同的端去编写多套代码的成本显然非常高,这时候只编写一套代码就能够适配到多端的能力就显得极为需要。
|
|
18
|
-
|
|
19
|
-
使用 Taro,我们可以只书写一套代码,再通过 Taro 的编译工具,将源代码分别编译出可以在不同端(微信小程序、H5、RN等)运行的代码。
|
|
20
|
-
|
|
21
|
-
## 体验
|
|
22
|
-
|
|
23
|
-
请使用微信扫一扫以下体验码
|
|
24
|
-
|
|
25
|
-

|
|
26
|
-
|
|
27
|
-
## 相关链接
|
|
28
|
-
|
|
29
|
-
- [Taro UI 使用文档](https://taro-ui.aotu.io)
|
|
30
|
-
- [Taro UI 官方示例](https://github.com/NervJS/taro-ui-demo)
|
|
31
|
-
- [Taro](https://taro.jd.com/)
|
|
32
|
-
- [Taro 物料市场](https://taro-ext.jd.com)
|
|
33
|
-
- [Taro 论坛 Taro-UI 板块](https://taro-club.jd.com/category/11/taro-ui)
|
|
34
|
-
|
|
35
|
-
## 安装
|
|
36
|
-
|
|
37
|
-
### 2.x
|
|
38
|
-
当 Taro 版本 < 3 时,使用 2.x 版本
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
$ npm install taro-ui@2.3.4
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 3.x
|
|
45
|
-
当 Taro 版本 ≥ 3 时,使用 3.x 版本
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
$ npm install taro-ui@latest
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## 使用
|
|
52
|
-
|
|
53
|
-
在代码中 `import` 需要的组件并按照文档说明使用
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
import { AtButton } from 'taro-ui'
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## 开发交流
|
|
60
|
-
|
|
61
|
-
[官方微信交流群](https://github.com/NervJS/taro-ui/issues/16)
|
|
62
|
-
|
|
63
|
-
## 开发计划
|
|
64
|
-
|
|
65
|
-
[开发计划](./PLANS.md)
|
|
66
|
-
|
|
67
|
-
## 路线图
|
|
68
|
-
|
|
69
|
-
![Roadmap][roadmap-image]
|
|
70
|
-
|
|
71
|
-
## 贡献
|
|
72
|
-
|
|
73
|
-
如果你在使用 `Taro UI` 时遇到问题,或者有好的建议,欢迎给我们提 `Issue` 或 `Pull Request`。在开始之前,请阅读 [贡献指南](https://github.com/NervJS/taro-ui/blob/master/.github/CONTRIBUTING.md)
|
|
74
|
-
|
|
75
|
-
## License
|
|
76
|
-
|
|
77
|
-
MIT
|
|
78
|
-
|
|
79
|
-
[npm-version-image]: https://img.shields.io/npm/v/taro-ui.svg?style=flat-square
|
|
80
|
-
[npm-version-url]: https://www.npmjs.com/package/taro-ui
|
|
81
|
-
[npm-downloads-image]: https://img.shields.io/npm/dm/taro-ui?style=flat-square
|
|
82
|
-
[npm-downloads-url]: https://www.npmjs.com/package/taro-ui
|
|
83
|
-
[david-dm-image]: https://david-dm.org/NervJS/taro-ui.svg?style=flat-square
|
|
84
|
-
[david-dm-url]: https://david-dm.org/NervJS/taro-ui
|
|
85
|
-
[license-image]: https://img.shields.io/github/license/NervJS/taro-ui?style=flat-square
|
|
86
|
-
[license-url]: https://github.com/NervJS/taro-ui/blob/master/LICENSE
|
|
87
|
-
[roadmap-image]: ./docs/assets/taro-ui-roadmap.svg
|