Skip to content

Commit a41fd45

Browse files
authored
chore: merge branch 'next' into 'dev-harmony' (#2577)
* chore: merge branch next into dev-harmony * fix: rn css
1 parent 2381a23 commit a41fd45

37 files changed

+407
-142
lines changed

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx --no-install commitlint --edit $1

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# v2.6.18
2+
3+
`2024-09-06`
4+
5+
- 🏡 chore: remove deprecated (#2573)
6+
- 🏡 chore(deps): update dependency marked to v14 (#2532)
7+
- :sparkles: feat: demos for popup & dialog (#2574)
8+
- :sparkles: feat: beforeupload (#2567)
9+
- :bug: fix: remove icons defaultprops (#2571)
10+
- :bug: fix(input): type props didnot work when equals number|digit (#2563)
11+
- :bug: fix: dialog
12+
- :bug: fix(sticky): should rerender when zIndex changes (#2572)
13+
- :bug: fix(sticky): rerender sticky when threshold change (#2564)
14+
- :bug: fix(deps): update dependency jscodeshift to v17 (#2534)
15+
16+
# v2.6.17
17+
18+
`2024-08-30`
19+
20+
- 🏡 chore(form): form demo (#2528)
21+
- 📖 docs(readme): fix pnpm run dev weapp jd dir (#2514)
22+
- :sparkles: feat(cell): add clickable prop to support click style feedback (#2527)
23+
- :sparkles: feat(image-preview): 增加索引字段,用于预览内容排序 (#2519)
24+
- :bug: fix(tabs.taro.tsx): 解决在不需要滚动的时候,切换tab产生tab位置错乱的问题 (#2554)
25+
- :bug: fix(uploader): beforeUpload should trigger every time before uploading (#2553)
26+
- :bug: fix(PullToRefresh): 修复PullToRefresh组件disabled属性在taro中无效的问题 (#2538)
27+
- :bug: fix(uploader): ios 下无法回显的问题修复 (#2550)
28+
- :bug: fix(uploader): sizeType prop didnot work when weapp || jd (#2526)
29+
130
# v2.6.16
231

332
`2024-08-03`

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,9 @@
9797
"*.{ts,tsx,js,md}": "eslint"
9898
},
9999
"dependencies": {
100-
"@nutui/icons-react": "^1.0.4",
101-
"@nutui/icons-react-taro": "^1.0.4",
100+
"@babel/runtime": "^7.23.9",
101+
"@nutui/icons-react": "^1.0.5",
102+
"@nutui/icons-react-taro": "^1.0.5",
102103
"@nutui/touch-emulator": "^1.0.0",
103104
"@react-spring/web": "~9.6.1",
104105
"@swc/helpers": "^0.5.7",
@@ -173,13 +174,13 @@
173174
"highlight.js": "^11.9.0",
174175
"husky": "^9.0.11",
175176
"inquirer": "^10.1.4",
176-
"jscodeshift": "^0.15.1",
177+
"jscodeshift": "^17.0.0",
177178
"linguist-languages": "^7.27.0",
178179
"lint-staged": "^15.2.2",
179180
"lzutf8": "0.6.3",
180181
"map-stream": "0.0.7",
181182
"markdown-it": "^14.0.0",
182-
"marked": "^13.0.3",
183+
"marked": "^14.1.1",
183184
"mobx": "^6.12.0",
184185
"mobx-react-lite": "^4.0.5",
185186
"postcss": "^8.4.35",

packages/nutui-codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"dependencies": {
2929
"chalk": "^5.3.0",
3030
"is-git-clean": "^1.1.0",
31-
"jscodeshift": "^0.15.1"
31+
"jscodeshift": "^17.0.0"
3232
},
3333
"devDependencies": {
3434
"jest": "^29.7.0",

pnpm-lock.yaml

Lines changed: 68 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-local-changelog.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ shell.exec(
1010
{ silent: true },
1111
(code, stdout, stderr) => {
1212
shell.exec(
13-
`git log --since="${stdout.replace('\n', '')}" --pretty=format:"%s @%an" next`,
13+
`git log --since="${stdout.replace('\n', '')}" --pretty=format:"%s" next`,
1414
{ silent: true },
1515
(code, stdout, stderr) => {
1616
const logs = stdout.split('\n')
@@ -43,21 +43,19 @@ shell.exec(
4343
}
4444
const logSymbol = {
4545
build: '* 📦 ',
46-
chore: '*🏡 ',
46+
chore: '* 🏡 ',
4747
ci: '* 🤖 ',
4848
docs: '* 📖 ',
4949
feat: '* :sparkles: ',
5050
fix: '* :bug: ',
5151
perf: '* zap: ',
5252
refactor: '* 🪵 ',
5353
revert: '* 🚦 ',
54-
style: ':art: ',
54+
style: '* :art: ',
5555
test: '* 💡 ',
5656
others: '* 🔔 ',
5757
}
5858
logs.forEach((log, index) => {
59-
// const groups = log.match(/#(?<pr>[0-9]+)/)?.groups
60-
// if (groups && groups.pr) {
6159
if (log.indexOf(beforeTag) === -1) {
6260
const a = rules.filter((rule) => {
6361
return log.toLowerCase().startsWith(rule)

src/packages/cell/cell.harmony.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,26 @@
7777
font-size: 14px;
7878
color: #505259;
7979
}
80+
.nut-cell:active {
81+
opacity: 0.7;
82+
}
83+
.nut-cell-clickable {
84+
cursor: pointer;
85+
}
86+
.nut-cell-clickable::before {
87+
position: absolute;
88+
top: 50%;
89+
left: 50%;
90+
width: 100%;
91+
height: 100%;
92+
background-color: #1a1a1a;
93+
border: inherit;
94+
border-color: #1a1a1a;
95+
border-radius: inherit;
96+
transform: translate(-50%, -50%);
97+
opacity: 0;
98+
content: " ";
99+
}
80100
.nut-cell-divider {
81101
display: flex;
82102
min-height: 1px;

src/packages/cell/cell.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,26 @@
5050
font-size: $cell-extra-font-size;
5151
color: $cell-extra-color;
5252
}
53+
&-clickable:active {
54+
opacity: 0.7;
55+
}
56+
&-clickable {
57+
cursor: pointer;
58+
&::before {
59+
position: absolute;
60+
top: 50%;
61+
left: 50%;
62+
width: 100%;
63+
height: 100%;
64+
background-color: $black;
65+
border: inherit;
66+
border-color: $black;
67+
border-radius: inherit;
68+
transform: translate(-50%, -50%);
69+
opacity: 0;
70+
content: ' ';
71+
}
72+
}
5373

5474
&-divider {
5575
display: flex;

src/packages/cell/cell.taro.tsx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface CellProps extends BasicComponent {
1313
extra: ReactNode
1414
radius: string | number
1515
align: 'flex-start' | 'center' | 'flex-end'
16+
clickable: boolean
1617
isLast: boolean
1718
onClick: (
1819
event: React.MouseEvent<HTMLDivElement, MouseEvent> | ITouchEvent
@@ -26,6 +27,7 @@ const defaultProps = {
2627
extra: null,
2728
radius: '6px',
2829
align: 'flex-start',
30+
clickable: false,
2931
isLast: false,
3032
onClick: (
3133
event: React.MouseEvent<HTMLDivElement, MouseEvent> | ITouchEvent
@@ -49,6 +51,7 @@ export const Cell: FunctionComponent<
4951
isLast,
5052
className,
5153
style,
54+
clickable,
5255
} = {
5356
...defaultProps,
5457
...props,
@@ -73,13 +76,17 @@ export const Cell: FunctionComponent<
7376
return (
7477
<>
7578
<View
76-
className={classNames([
77-
classPrefix,
78-
className,
79-
{
80-
[`${classPrefix}-group-item`]: ctx?.group,
81-
},
82-
])}
79+
hoverStyle={{ opacity: clickable ? 0.7 : 1 }}
80+
className={`${classNames(
81+
[
82+
classPrefix,
83+
className,
84+
{
85+
[`${classPrefix}-group-item`]: ctx?.group,
86+
},
87+
],
88+
clickable ? `${classPrefix}-clickable` : ''
89+
)}`}
8390
onClick={(event) => handleClick(event)}
8491
style={baseStyle}
8592
>

src/packages/cell/cell.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export interface CellProps extends BasicComponent {
1111
extra: ReactNode
1212
radius: string | number
1313
align: 'flex-start' | 'center' | 'flex-end'
14-
isLast: boolean
14+
clickable: boolean
1515
onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void
1616
}
1717

@@ -22,6 +22,7 @@ const defaultProps = {
2222
extra: null,
2323
radius: '6px',
2424
align: 'flex-start',
25+
clickable: false,
2526
isLast: false,
2627
onClick: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {},
2728
} as CellProps
@@ -34,6 +35,7 @@ export const Cell: FunctionComponent<
3435
const ctx = useContext(CellGroupContext)
3536
const {
3637
children,
38+
clickable,
3739
onClick,
3840
title,
3941
description,
@@ -63,13 +65,16 @@ export const Cell: FunctionComponent<
6365
return (
6466
<>
6567
<div
66-
className={classNames([
67-
classPrefix,
68-
className,
69-
{
70-
[`${classPrefix}-group-item`]: ctx?.group,
71-
},
72-
])}
68+
className={`${classNames(
69+
[
70+
classPrefix,
71+
className,
72+
{
73+
[`${classPrefix}-group-item`]: ctx?.group,
74+
},
75+
],
76+
clickable ? `${classPrefix}-clickable` : ''
77+
)}`}
7378
onClick={(event) => handleClick(event)}
7479
style={baseStyle}
7580
{...rest}

0 commit comments

Comments
 (0)