Skip to content

Commit a0d0a98

Browse files
authored
Merge branch 'dev' into dev
2 parents 7bb0605 + 2519bcd commit a0d0a98

File tree

24 files changed

+269
-66
lines changed

24 files changed

+269
-66
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- uses: actions/setup-node@v3
1717
with:
1818
node-version: 16
19+
registry-url: 'https://registry.npmjs.org'
1920

2021
- run: yarn install
2122
- run: npm run build
@@ -69,7 +70,7 @@ jobs:
6970
env:
7071
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
7172

72-
- name: 📦 @uiw/react-native-image-picker publish to NPM
73+
- name: 📦 @uiw/react-native-image-picker publish to NPM
7374
run: npm publish
7475
working-directory: packages/react-native-image-picker
7576
continue-on-error: true

example/base/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@example/base",
3-
"version": "3.2.3",
3+
"version": "4.0.1",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -10,16 +10,16 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13+
"@react-native-camera-roll/camera-roll": "5.3.1",
14+
"@uiw/react-native": "4.0.1",
15+
"@uiw/react-native-image-picker": "4.0.1",
1316
"react": "18.0.0",
1417
"react-native": "0.69.7",
15-
"@uiw/react-native": "3.2.3",
16-
"@uiw/react-native-image-picker": "3.2.3",
17-
"react-native-svg": "13.0.0",
1818
"react-native-gesture-handler": "2.8.0",
19-
"react-native-root-siblings": "4.1.1",
2019
"react-native-image-picker": "^5.3.1",
2120
"react-native-image-viewing": "~0.2.2",
22-
"@react-native-camera-roll/camera-roll": "5.3.1"
21+
"react-native-root-siblings": "4.1.1",
22+
"react-native-svg": "13.0.0"
2323
},
2424
"devDependencies": {
2525
"@babel/core": "~7.20.7",
@@ -34,4 +34,4 @@
3434
"jest": {
3535
"preset": "react-native"
3636
}
37-
}
37+
}

example/examples/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,8 @@ PODS:
367367
- RNScreens (3.15.0):
368368
- React-Core
369369
- React-RCTImage
370-
- RNSVG (12.1.1):
371-
- React
370+
- RNSVG (13.0.0):
371+
- React-Core
372372
- SocketRocket (0.6.0)
373373
- Yoga (1.14.0)
374374
- YogaKit (1.18.1):
@@ -587,7 +587,7 @@ SPEC CHECKSUMS:
587587
RNCMaskedView: 0e1bc4bfa8365eba5fbbb71e07fbdc0555249489
588588
RNGestureHandler: bad495418bcbd3ab47017a38d93d290ebd406f50
589589
RNScreens: 4a1af06327774490d97342c00aee0c2bafb497b7
590-
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
590+
RNSVG: 42a0c731b11179ebbd27a3eeeafa7201ebb476ff
591591
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
592592
Yoga: 0b84a956f7393ef1f37f3bb213c516184e4a689d
593593
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

example/examples/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "examples",
3-
"version": "3.2.3",
3+
"version": "4.0.1",
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
@@ -10,20 +10,20 @@
1010
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
1111
},
1212
"dependencies": {
13+
"@react-native-camera-roll/camera-roll": "5.3.1",
1314
"@react-native-community/masked-view": "~0.1.11",
1415
"@react-navigation/native": "~6.0.11",
1516
"@react-navigation/stack": "~6.2.2",
16-
"@uiw/react-native": "3.2.3",
17+
"@uiw/react-native": "4.0.1",
18+
"@uiw/react-native-image-picker": "4.0.1",
1719
"react": "18.0.0",
1820
"react-native": "0.69.7",
1921
"react-native-gesture-handler": "~2.5.0",
20-
"react-native-safe-area-context": "~4.3.1",
21-
"react-native-screens": "~3.15.0",
22-
"react-native-svg": "13.0.0",
2322
"react-native-image-picker": "^5.3.1",
2423
"react-native-image-viewing": "~0.2.2",
25-
"@uiw/react-native-image-picker": "3.2.3",
26-
"@react-native-camera-roll/camera-roll": "5.3.1"
24+
"react-native-safe-area-context": "~4.3.1",
25+
"react-native-screens": "~3.15.0",
26+
"react-native-svg": "13.0.0"
2727
},
2828
"devDependencies": {
2929
"@babel/core": "~7.20.7",
@@ -53,4 +53,4 @@
5353
"node"
5454
]
5555
}
56-
}
56+
}

example/examples/src/routes/Form/index.tsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,49 @@ const FormDemo = () => {
236236
field: 'verificationCode',
237237
name: '验证码倒计时',
238238
},
239+
{
240+
type: 'tree',
241+
field: 'tree',
242+
name: '树形控件',
243+
attr: {
244+
options: [
245+
{
246+
label: '今天',
247+
value: '01',
248+
children: [
249+
{
250+
label: '上午',
251+
value: '01-1',
252+
children: [
253+
{
254+
label: '9点',
255+
value: '01-1-1',
256+
},
257+
{
258+
label: '10点',
259+
value: '01-1-2',
260+
},
261+
{
262+
label: '11点',
263+
value: '01-1-3',
264+
},
265+
],
266+
},
267+
{
268+
label: '下午',
269+
value: '02-1',
270+
children: [
271+
{
272+
label: '14点',
273+
value: '02-1-1',
274+
},
275+
],
276+
},
277+
],
278+
},
279+
],
280+
},
281+
},
239282
{
240283
type: 'treeSelect',
241284
field: 'treeSelect',

example/examples/src/routes/Tree/index.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,24 @@ export default class TreeDemo extends React.Component<TreeViewProps> {
6666
<Button onPress={() => this.setState({visible: true})}>打开</Button>
6767
<Modal visible={this.state.visible} placement="bottom" onClosed={() => this.setState({visible: false})}>
6868
<ScrollView style={{height: 500}}>
69-
<Tree treeData={option} defaultExpandAll />
69+
<Tree
70+
treeData={option}
71+
defaultExpandAll
72+
onCheck={(value: any) => {
73+
console.log('onCheck', value);
74+
}}
75+
/>
7076
</ScrollView>
7177
</Modal>
7278
</Card>
7379
<Card title="树形选择">
74-
<Tree treeData={option} defaultExpandAll />
80+
<Tree
81+
treeData={option}
82+
defaultExpandAll
83+
onCheck={(value: any) => {
84+
console.log('onCheck', value);
85+
}}
86+
/>
7587
</Card>
7688
</Body>
7789
</React.Fragment>

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.2.3",
2+
"version": "4.0.1",
33
"packages": ["example/*", "packages/*", "website"],
44
"npmClient": "yarn",
55
"npmClientArgs": ["--production", "--no-optional"],

packages/core/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@uiw/react-native",
3-
"version": "3.2.3",
3+
"version": "4.0.1",
44
"description": "UIW for React Native",
55
"homepage": "https://uiwjs.github.io/react-native-uiw/",
66
"main": "lib/index.js",
@@ -52,20 +52,20 @@
5252
],
5353
"dependencies": {
5454
"@babel/runtime": "~7.20.7",
55+
"@shopify/restyle": "~2.4.2",
5556
"@types/color": "~3.0.3",
5657
"@types/lodash": "~4.14.191",
5758
"@types/react-native": "0.69.1",
5859
"@uiw/icons": "2.5.3",
5960
"@validator.tool/hook": "2.2.4",
6061
"ahooks": "3.7.6",
61-
"dayjs": "~1.11.7",
6262
"color": "4.2.3",
63+
"dayjs": "~1.11.7",
6364
"lodash": "4.17.21",
6465
"prop-types": "15.7.2",
6566
"react-native-gesture-handler": "2.8.0",
6667
"react-native-root-siblings": "4.1.1",
67-
"react-native-svg": "13.0.0",
68-
"@shopify/restyle": "~2.4.2"
68+
"react-native-svg": "13.0.0"
6969
},
7070
"peerDependencies": {
7171
"react": ">=16.9.0",
@@ -79,4 +79,4 @@
7979
"engines": {
8080
"node": ">=16.0.0"
8181
}
82-
}
82+
}

packages/core/src/DatePicker/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ DatePicker
77
### 基础示例
88

99
```jsx
10-
import { useState } from 'react'
10+
import { Button } from '@uiw/react-native';
11+
import React,{ useState } from 'react';
1112
import { View,Text } from 'react-native';
12-
import { DatePicker } from '@uiw/react-native';
13+
import DatePicker from '@uiw/react-native/lib/DatePicker/date-picker';
1314
function Demo() {
1415
const [visible,setVisible] = useState(false)
1516
const [formatDate,setFormatDate] = useState('')
@@ -63,9 +64,9 @@ DatePeriodInput
6364
### 基础示例
6465

6566
```jsx
66-
import { useState } from 'react'
67-
import { View,Text } from 'react-native';
68-
import { DatePeriodInput } from '@uiw/react-native';
67+
import React,{ useState } from 'react';
68+
import { View} from 'react-native';
69+
import DatePeriodInput from '@uiw/react-native/lib/DatePicker/date-period-input';
6970
function Demo() {
7071
const [value,setValue] = useState(undefined)
7172
return (

packages/core/src/DatePicker/date-period-input/index.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const DatePeriodInput: FC<DatePeriodInputProps> = ({
8888
<Icon name="date" size={16} color={theme.colors.primary_text || '#ccc'} />
8989
<Text
9090
color={disabled ? 'disabled' : 'text'}
91-
style={{ ...theme.textVariants.p1, marginLeft: theme.spacing.x2 || 8 }}
91+
style={[p1, { marginLeft: 8 }]} //...theme.textVariants.p1
9292
>
9393
{dates[0] ? dayjs(dates[0]).format(format) : placeholder[0]}
9494
</Text>
@@ -103,8 +103,8 @@ const DatePeriodInput: FC<DatePeriodInputProps> = ({
103103
</AnimatedTouchableIcon>
104104
)}
105105
</TouchableOpacity>
106-
<View style={{ marginHorizontal: theme.spacing.x2 || 8 }}>
107-
<Text color="text" style={{ ...(theme.textVariants.p1 || p1) }}>
106+
<View style={{ marginHorizontal: 8 }}>
107+
<Text color="text" style={p1}>
108108
~
109109
</Text>
110110
</View>
@@ -126,10 +126,7 @@ const DatePeriodInput: FC<DatePeriodInputProps> = ({
126126
>
127127
<Flex style={{ alignItems: 'center' }}>
128128
<Icon size={16} name="date" color={theme.colors.primary_text || '#ccc'} />
129-
<Text
130-
color={disabled ? 'disabled' : 'text'}
131-
style={{ ...(theme.textVariants.p1 || p1), marginLeft: theme.spacing.x2 || 8 }}
132-
>
129+
<Text color={disabled ? 'disabled' : 'text'} style={[p1, { marginLeft: 8 }]}>
133130
{dates[1] ? dayjs(dates[1]).format(format) : placeholder[1]}
134131
</Text>
135132
</Flex>

0 commit comments

Comments
 (0)