Skip to content

Commit 4c00b59

Browse files
authored
Merge branch 'V3.0' into hxy/trendarrow/0815
2 parents a6f3b4f + 9e7009d commit 4c00b59

File tree

13 files changed

+90
-175
lines changed

13 files changed

+90
-175
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
src/sites
2+
src/packages/nutui.react.build.rn.ts
23
scripts
34
site_docs
45
coverage

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
**/*.eot
77
package.json
88
node_modules
9+
src/packages/nutui.react.build.rn.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"generate:file:taro": "node scripts/taro/generate-nutui-taro.js",
8585
"generate:file:taro:pages": "node scripts/taro/generate-taro-pages.js",
8686
"gulp:watch": "gulp watch --environment",
87-
"lint": "eslint ./src/packages",
87+
"lint": "eslint ./src/packages/*/",
8888
"lint:fix": "eslint --fix ./src/packages",
8989
"postpublish": "node scripts/postpublish.js",
9090
"prepare": "husky && npm run generate:file && npm run generate:file:taro && npm run generate:file:taro:pages",

src/packages/avatar/avatar.taro.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export const Avatar: FunctionComponent<
5454
background,
5555
color,
5656
src,
57-
alt,
5857
icon,
5958
fit,
6059
avatarIndex,

src/packages/avatarcropper/avatarcropper.taro.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React, {
77
} from 'react'
88
import Taro, { useReady, createSelectorQuery } from '@tarojs/taro'
99
import classNames from 'classnames'
10-
import { Canvas, View } from '@tarojs/components'
10+
import { Canvas, CommonEventFunction, View } from '@tarojs/components'
1111
import { Button } from '@/packages/button/button.taro'
1212
import { useConfig } from '@/packages/configprovider/configprovider.taro'
1313

@@ -449,7 +449,7 @@ export const AvatarCropper: FunctionComponent<Partial<AvatarCropperProps>> = (
449449
})
450450
const { startMoveX, startMoveY, startScale, startDistance } = startMove
451451

452-
const onTouchStart = (event: React.TouchEvent<HTMLDivElement>) => {
452+
const onTouchStart: CommonEventFunction = (event: any) => {
453453
const { touches } = event
454454
const { offsetX } = touch
455455

@@ -472,7 +472,7 @@ export const AvatarCropper: FunctionComponent<Partial<AvatarCropperProps>> = (
472472
}
473473
}
474474

475-
const onTouchMove = (event: React.TouchEvent<HTMLDivElement>) => {
475+
const onTouchMove: CommonEventFunction = (event: any) => {
476476
const { touches } = event
477477

478478
touch.move(event)
@@ -500,7 +500,7 @@ export const AvatarCropper: FunctionComponent<Partial<AvatarCropperProps>> = (
500500
}
501501
}
502502

503-
const onTouchEnd = (event: React.TouchEvent<HTMLDivElement>) => {
503+
const onTouchEnd: CommonEventFunction = (event: any) => {
504504
let stopPropagation = false
505505

506506
if (moving || zooming) {

src/packages/configprovider/types.ts

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export type NutCSSVariables =
44
| 'nutuiColorPrimaryStop2'
55
| 'nutuiColorPrimaryPressed'
66
| 'nutuiColorPrimaryDisabled'
7-
| 'nutuiColorPrimaryLight'
7+
| 'nutuiColorPrimaryDisabledSpecial'
88
| 'nutuiColorPrimaryLightPressed'
99
| 'nutuiColorDefault'
1010
| 'nutuiColorDefaultPressed'
@@ -30,51 +30,51 @@ export type NutCSSVariables =
3030
| 'nutuiColorDangerDisabled'
3131
| 'nutuiColorDangerLight'
3232
| 'nutuiColorDangerBackground'
33-
| 'nutuiGray12'
34-
| 'nutuiGray0'
35-
| 'nutuiGray1'
36-
| 'nutuiWhite12'
37-
| 'nutuiBlack8'
38-
| 'nutuiBlack3'
39-
| 'nutuiGray4'
40-
| 'nutuiGray7'
41-
| 'nutuiGray6'
42-
| 'nutuiGray5'
33+
| 'nutuiColorBackground'
34+
| 'nutuiColorBackgroundOverlay'
35+
| 'nutuiColorBackgroundSunken'
36+
| 'nutuiColorMask'
37+
| 'nutuiColorMaskPart'
38+
| 'nutuiColorMaskFaultToleran'
39+
| 'nutuiColorBorder'
40+
| 'nutuiColorBorderDisabled'
41+
| 'nutuiColorTitle'
42+
| 'nutuiColorText'
43+
| 'nutuiColorTextHelp'
4344
| 'nutuiColorTextDisabled'
45+
| 'nutuiWhite12'
46+
| 'nutuiColorPrimaryText'
47+
| 'nutuiFontSizeXxs'
48+
| 'nutuiFontSizeXs'
49+
| 'nutuiFontSizeS'
50+
| 'nutuiFontSizeBase'
51+
| 'nutuiFontSizeL'
52+
| 'nutuiFontSizeXl'
53+
| 'nutuiFontSizeXxl'
54+
| 'nutuiFontSize10'
55+
| 'nutuiFontSize11'
56+
| 'nutuiFontWeightLight'
4457
| 'nutuiFontWeight'
4558
| 'nutuiFontWeightBold'
4659
| 'nutuiLineHeightBase'
47-
| 'nutuiSpacing2'
48-
| 'nutuiSpacing4'
49-
| 'nutuiSpacing6'
50-
| 'nutuiSpacing8'
51-
| 'nutuiSpacing10'
52-
| 'nutuiSpacing12'
53-
| 'nutuiSpacing14'
54-
| 'nutuiSpacing16'
55-
| 'nutuiRadius3'
56-
| 'nutuiRadius4'
57-
| 'nutuiRadius6'
58-
| 'nutuiRadius8'
59-
| 'nutuiRadius12'
60-
| 'nutuiRadius16'
61-
| 'nutuiRadius20'
62-
| 'nutuiRadius24'
63-
| 'nutuiGray3'
64-
| 'nutuiGray2'
65-
| 'nutuiBlack10'
66-
| 'nutuiBlack2'
67-
| 'nutuiFontSize1'
68-
| 'nutuiFontSize2'
69-
| 'nutuiFontSize3'
70-
| 'nutuiFontSize4'
71-
| 'nutuiFontSize6'
72-
| 'nutuiFontSize8'
73-
| 'nutuiFontSize10'
74-
| 'nutuiFontSize11'
75-
| 'nutuiColorPrimaryText'
76-
| 'nutuiColorTextLink'
77-
| 'nutuiPaddingXs'
60+
| 'nutuiSpacingXxxs'
61+
| 'nutuiSpacingXxs'
62+
| 'nutuiSpacingXs'
63+
| 'nutuiSpacingS'
64+
| 'nutuiSpacingBase'
65+
| 'nutuiSpacingL'
66+
| 'nutuiSpacingXl'
67+
| 'nutuiSpacingXxl'
68+
| 'nutuiSpacingXxxl'
69+
| 'nutuiRadiusXxxs'
70+
| 'nutuiRadiusXxs'
71+
| 'nutuiRadiusXs'
72+
| 'nutuiRadiusS'
73+
| 'nutuiRadiusBase'
74+
| 'nutuiRadiusL'
75+
| 'nutuiRadiusXl'
76+
| 'nutuiRadiusXxl'
77+
| 'nutuiRadiusXxxl'
7878
| 'nutuiButtonSquareBorderRadius'
7979
| 'nutuiButtonBorderRadius'
8080
| 'nutuiButtonBorderWidth'
@@ -332,13 +332,19 @@ export type NutCSSVariables =
332332
| 'nutuiCalendarDayFontWeight'
333333
| 'nutuiCalendarDayActiveBorderRadius'
334334
| 'nutuiHoverbuttonSpacing'
335+
| 'nutuiSpacing16'
335336
| 'nutuiHoverbuttonPositionBottom'
336337
| 'nutuiHoverbuttonPositionRight'
337338
| 'nutuiHoverbuttonItemBorderColor'
339+
| 'nutuiBlack3'
338340
| 'nutuiHoverbuttonItemBackground'
341+
| 'nutuiGray1'
339342
| 'nutuiHoverbuttonItemBackgroundActive'
343+
| 'nutuiGray3'
340344
| 'nutuiHoverbuttonItemIconColor'
345+
| 'nutuiGray7'
341346
| 'nutuiHoverbuttonItemIconColorActive'
347+
| 'nutuiGray6'
342348
| 'nutuiOverlayBgColor'
343349
| 'nutuiOverlayZIndex'
344350
| 'nutuiOverlayContentBgColor'

src/packages/hoverbutton/__test__/__snapshots__/hoverbutton.spec.tsx.snap

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -116,116 +116,6 @@ exports[`emit click event 1`] = `
116116
</div>
117117
`;
118118

119-
exports[`prop 1`] = `
120-
<div>
121-
<div
122-
class="nut-cell"
123-
style="border-radius: 6px; align-items: flex-start;"
124-
>
125-
<div
126-
class="nut-cell-left"
127-
>
128-
<div
129-
class="nut-cell-title"
130-
>
131-
URL 跳转
132-
</div>
133-
</div>
134-
<div
135-
class="nut-cell-extra"
136-
>
137-
https://m.jd.com/
138-
</div>
139-
</div>
140-
</div>
141-
`;
142-
143-
exports[`prop title extra description test 1`] = `
144-
<div>
145-
<div
146-
class="nut-cell"
147-
data-testid="prop"
148-
style="border-radius: 6px; align-items: flex-start;"
149-
>
150-
<div
151-
class="nut-cell-left"
152-
>
153-
<div
154-
class="nut-cell-title"
155-
>
156-
我是标题
157-
</div>
158-
<div
159-
class="nut-cell-description"
160-
>
161-
我是描述
162-
</div>
163-
</div>
164-
<div
165-
class="nut-cell-extra"
166-
>
167-
描述文字
168-
</div>
169-
</div>
170-
</div>
171-
`;
172-
173-
exports[`slot default test 1`] = `
174-
<div>
175-
<div
176-
class="nut-cell"
177-
style="border-radius: 6px; align-items: flex-start;"
178-
>
179-
<div
180-
class="nut-cell-left"
181-
>
182-
<div
183-
class="nut-cell-title"
184-
>
185-
<div>
186-
自定义内容
187-
</div>
188-
</div>
189-
</div>
190-
<div
191-
class="nut-cell-extra"
192-
>
193-
描述文字
194-
</div>
195-
</div>
196-
</div>
197-
`;
198-
199-
exports[`slot extra 1`] = `
200-
<div>
201-
<div
202-
class="nut-cell"
203-
style="border-radius: 6px; align-items: flex-start;"
204-
>
205-
<div
206-
class="nut-cell-left"
207-
>
208-
<div
209-
class="nut-cell-title"
210-
>
211-
Switch
212-
</div>
213-
</div>
214-
<div
215-
class="nut-cell-extra"
216-
>
217-
<div
218-
class="nut-switch"
219-
>
220-
<div
221-
class="nut-switch-button nut-switch-button-open"
222-
/>
223-
</div>
224-
</div>
225-
</div>
226-
</div>
227-
`;
228-
229119
exports[`tabbar height 1`] = `
230120
<div>
231121
<div

src/packages/infiniteloading/__tests__/__snapshots__/infiniteloading.spec.tsx.snap

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ exports[`infiniteloading base 01 1`] = `
2020
/>
2121
<div
2222
class="nut-infinite-bottom"
23-
/>
23+
>
24+
<div
25+
class="nut-infinite-bottom-tips"
26+
/>
27+
</div>
2428
</div>
2529
</div>
2630
`;
@@ -127,7 +131,11 @@ exports[`pull base 01 1`] = `
127131
/>
128132
<div
129133
class="nut-infinite-bottom"
130-
/>
134+
>
135+
<div
136+
class="nut-infinite-bottom-tips"
137+
/>
138+
</div>
131139
</div>
132140
</div>
133141
`;
@@ -152,7 +160,11 @@ exports[`pull base 03 1`] = `
152160
/>
153161
<div
154162
class="nut-infinite-bottom"
155-
/>
163+
>
164+
<div
165+
class="nut-infinite-bottom-tips"
166+
/>
167+
</div>
156168
</div>
157169
</div>
158170
`;
@@ -177,7 +189,11 @@ exports[`pull base 03 2`] = `
177189
/>
178190
<div
179191
class="nut-infinite-bottom"
180-
/>
192+
>
193+
<div
194+
class="nut-infinite-bottom-tips"
195+
/>
196+
</div>
181197
</div>
182198
</div>
183199
`;
@@ -202,7 +218,11 @@ exports[`pull base 1`] = `
202218
/>
203219
<div
204220
class="nut-infinite-bottom"
205-
/>
221+
>
222+
<div
223+
class="nut-infinite-bottom-tips"
224+
/>
225+
</div>
206226
</div>
207227
</div>
208228
`;
@@ -227,7 +247,11 @@ exports[`pull base 2`] = `
227247
/>
228248
<div
229249
class="nut-infinite-bottom"
230-
/>
250+
>
251+
<div
252+
class="nut-infinite-bottom-tips"
253+
/>
254+
</div>
231255
</div>
232256
</div>
233257
`;

src/packages/popup/popup.rn.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ export const Popup: FunctionComponent<
284284
animationType="none" // 使用 slide 动画
285285
transparent // 使背景透明
286286
visible={innerVisible}
287-
onRequestClose={onHandleClickOverlay} // 处理 Android 设备的返回按钮
287+
// onRequestClose={onHandleClickOverlay} // 处理 Android 设备的返回按钮
288288
>
289289
{overlay ? (
290290
<TouchableOpacity
@@ -293,7 +293,7 @@ export const Popup: FunctionComponent<
293293
// closeOnOverlayClick={closeOnOverlayClick}
294294
// lockScroll={lockScroll}
295295
// duration={duration}
296-
onPress={onHandleClickOverlay}
296+
// onPress={onHandleClickOverlay}
297297
>
298298
<View className={overlayClassName} style={overlayStyles} />
299299
</TouchableOpacity>

0 commit comments

Comments
 (0)