Skip to content

Commit d08a7ef

Browse files
committed
ReScript
1 parent 28bb6cd commit d08a7ef

14 files changed

+222
-244
lines changed

.gitattributes

Lines changed: 0 additions & 3 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ node_modules
99
# npm unused lock file (we use yarn.lock)
1010
package-lock.json
1111

12-
# ReScript / Reason / Ocaml artifacts
13-
#*.bs.js # we do want this files to ensure zero-cost
12+
# ReScript artifacts
13+
# *.bs.js # we do want this files to ensure zero-cost
1414
.bsb.lock
1515
**/lib/bs
1616
**/lib/ocaml

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Changelog of `@reason-react-native/picker`
1+
# Changelog of `@rescript-react-native/picker`
22

33
## 1.9.1 - 2020-11-17
44

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 @reason-react-native contributors
3+
Copyright (c) 2019 @rescript-react-native contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
# `@reason-react-native/picker`
1+
# `@rescript-react-native/picker`
22

3-
[![Build Status](https://github.com/reason-react-native/picker/workflows/Build/badge.svg)](https://github.com/reason-react-native/picker/actions)
4-
[![Version](https://img.shields.io/npm/v/@reason-react-native/picker.svg)](https://www.npmjs.com/@reason-react-native/picker)
5-
[![Chat](https://img.shields.io/discord/235176658175262720.svg?logo=discord&colorb=blue)](https://reason-react-native.github.io/discord/)
3+
[![Build Status](https://github.com/rescript-react-native/picker/workflows/Build/badge.svg)](https://github.com/rescript-react-native/picker/actions)
4+
[![Version](https://img.shields.io/npm/v/@rescript-react-native/picker.svg)](https://www.npmjs.com/@rescript-react-native/picker)
5+
[![ReScript Forum](https://img.shields.io/discourse/posts?color=e6484f&label=ReScript%20Forum&server=https%3A%2F%2Fforum.rescript-lang.org)](https://forum.rescript-lang.org/)
66

7-
[ReScript](https://rescript-lang.org) / [Reason](https://reasonml.github.io) bindings for
7+
[ReScript](https://rescript-lang.org) bindings for
88
[`@react-native-picker/picker`](https://github.com/react-native-picker/picker).
99

1010
Exposed as `ReactNativePicker` module.
1111

12-
`@reason-react-native/picker` X.y.\* means it's compatible with
12+
`@rescript-react-native/picker` X.y.\* means it's compatible with
1313
`@react-native-picker/picker` X.y.\*
1414

1515
## Installation
@@ -20,22 +20,22 @@ is properly installed & configured by following their installation instructions,
2020
you can install the bindings:
2121

2222
```console
23-
npm install @reason-react-native/picker
23+
npm install @rescript-react-native/picker
2424
# or
25-
yarn add @reason-react-native/picker
25+
yarn add @rescript-react-native/picker
2626
```
2727

28-
`@reason-react-native/picker` should be added to `bs-dependencies` in your
28+
`@rescript-react-native/picker` should be added to `bs-dependencies` in your
2929
`bsconfig.json`:
3030

3131
```diff
3232
{
3333
//...
3434
"bs-dependencies": [
35-
"reason-react",
36-
"reason-react-native",
35+
"@rescript/react",
36+
"rescript-react-native",
3737
// ...
38-
+ "@reason-react-native/picker"
38+
+ "@rescript-react-native/picker"
3939
],
4040
//...
4141
}
@@ -59,7 +59,7 @@ Supported on _Android_ and _iOS_.
5959
| `itemStyle: ReactNative.Style.t` | _iOS only_ <br /> Style to be applied to each item label. <br /> <br /> **Note:** only `Text` style props are supported. |
6060

6161
Please also see
62-
[Reason React Native documentation of `View` props](https://reasonml-community.github.io/reason-react-native/en/docs/components/View/)
62+
[ReScript React Native documentation of `View` props](https://rescript-react-native.github.io/en/docs/components/View/)
6363
for additional supported props.
6464

6565
### `ReactNativePickerIOS` Component
@@ -75,7 +75,7 @@ Supported on _iOS_.
7575
| `itemStyle: ReactNative.Style.t` | Style to be applied to each item label. <br /> <br /> **Note:** only `Text` style props are supported. |
7676

7777
Please also see
78-
[Reason React Native documentation of `View` props](https://reasonml-community.github.io/reason-react-native/en/docs/components/View/)
78+
[ReScript React Native documentation of `View` props](https://rescript-react-native.github.io/en/docs/components/View/)
7979
for additional supported props.
8080

8181
### `ReactNativePicker.Item` and `ReactNativePickerIOS.Item` Components
@@ -101,11 +101,11 @@ releases.
101101
## Contribute
102102

103103
Read the
104-
[contribution guidelines](https://github.com/reason-react-native/.github/blob/master/CONTRIBUTING.md)
104+
[contribution guidelines](https://github.com/rescript-react-native/.github/blob/master/CONTRIBUTING.md)
105105
before contributing.
106106

107107
## Code of Conduct
108108

109109
We want this community to be friendly and respectful to each other. Please read
110-
[our full code of conduct](https://github.com/reason-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
110+
[our full code of conduct](https://github.com/rescript-react-native/.github/blob/master/CODE_OF_CONDUCT.md)
111111
so that you can understand what actions will and will not be tolerated.

bsconfig.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
"name": "@reason-react-native/picker",
3-
"refmt": 3,
4-
"reason": {
5-
"react-jsx": 3
6-
},
2+
"name": "@rescript-react-native/picker",
3+
"reason": { "react-jsx": 3 },
74
"package-specs": {
85
"module": "commonjs",
96
"in-source": true
@@ -19,5 +16,5 @@
1916
"warnings": {
2017
"error": true
2118
},
22-
"bs-dependencies": ["reason-react", "reason-react-native"]
19+
"bs-dependencies": ["@rescript/react", "rescript-react-native"]
2320
}

package.json

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@reason-react-native/picker",
2+
"name": "@rescript-react-native/picker",
33
"description": "ReScript bindings for @react-native-picker/picker.",
44
"version": "1.9.1",
55
"publishConfig": {
@@ -8,20 +8,18 @@
88
"peerDependencies": {
99
"@react-native-picker/picker": "^1.9.0"
1010
},
11-
"repository": "https://github.com/reason-react-native/picker.git",
11+
"repository": "https://github.com/rescript-react-native/picker.git",
1212
"license": "MIT",
1313
"keywords": [
1414
"rescript",
15-
"reason",
16-
"reasonml",
17-
"bucklescript",
1815
"react-native",
1916
"picker"
2017
],
2118
"files": [
2219
"*.md",
2320
"bsconfig.json",
24-
"src/**/*.re",
21+
"src/**/*.res",
22+
"src/**/*.resi",
2523
"src/**/*.js",
2624
"!src/**/*.bs.js"
2725
],
@@ -38,13 +36,13 @@
3836
"release": "npmpub"
3937
},
4038
"devDependencies": {
41-
"bs-platform": "^8.2.0",
39+
"bs-platform": "^9.0.0",
4240
"husky": "^4.0.0",
4341
"lint-staged": "^10.0.0",
4442
"npmpub": "^5.0.0",
4543
"prettier": "^2.0.0",
46-
"reason-react": "^0.9.0",
47-
"reason-react-native": "^0.63.0"
44+
"@rescript/react": "^0.10.0",
45+
"rescript-react-native": "^0.64.3"
4846
},
4947
"prettier": {
5048
"trailingComma": "all"

src/ReactNativePicker.bs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var NativeElement$ReactNative = require("reason-react-native/src/elements/NativeElement.bs.js");
3+
var NativeElement$ReactNative = require("rescript-react-native/src/elements/NativeElement.bs.js");
44

55
var Item = {};
66

src/ReactNativePicker.re

Lines changed: 0 additions & 99 deletions
This file was deleted.

src/ReactNativePicker.res

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
open ReactNative
2+
include NativeElement
3+
4+
@react.component @module("@react-native-picker/picker")
5+
external make: (
6+
~ref: ref=?,
7+
// Picker props
8+
~onValueChange: ('a, int) => unit=?,
9+
// value == string || float
10+
~selectedValue: 'a=?,
11+
~enabled: bool=?,
12+
// Android only
13+
~dropdownIconColor: string=?,
14+
~mode: [#dialog | #dropdown]=?,
15+
~prompt: string=?,
16+
// iOS only
17+
~itemStyle: ReactNative.Style.t=?,
18+
// rescript-react-native 0.64 View props
19+
~accessibilityActions: array<Accessibility.actionInfo>=?,
20+
~accessibilityElementsHidden: bool=?,
21+
~accessibilityHint: string=?,
22+
~accessibilityIgnoresInvertColors: bool=?,
23+
~accessibilityLabel: string=?,
24+
~accessibilityLiveRegion: Accessibility.liveRegion=?,
25+
~accessibilityRole: Accessibility.role=?,
26+
~accessibilityState: Accessibility.state=?,
27+
~accessibilityValue: Accessibility.value=?,
28+
~accessibilityViewIsModal: bool=?,
29+
~accessible: bool=?,
30+
~collapsable: bool=?,
31+
~hitSlop: View.edgeInsets=?,
32+
~importantForAccessibility: @string
33+
[
34+
| #auto
35+
| #yes
36+
| #no
37+
| @as("no-hide-descendants") #noHideDescendants
38+
]=?,
39+
~nativeID: string=?,
40+
~needsOffscreenAlphaCompositing: bool=?,
41+
~onAccessibilityAction: Accessibility.actionEvent => unit=?,
42+
~onAccessibilityEscape: unit => unit=?,
43+
~onAccessibilityTap: unit => unit=?,
44+
~onLayout: Event.layoutEvent => unit=?,
45+
~onMagicTap: unit => unit=?,
46+
// Gesture Responder props
47+
~onMoveShouldSetResponder: Event.pressEvent => bool=?,
48+
~onMoveShouldSetResponderCapture: Event.pressEvent => bool=?,
49+
~onResponderEnd: Event.pressEvent => unit=?,
50+
~onResponderGrant: Event.pressEvent => unit=?,
51+
~onResponderMove: Event.pressEvent => unit=?,
52+
~onResponderReject: Event.pressEvent => unit=?,
53+
~onResponderRelease: Event.pressEvent => unit=?,
54+
~onResponderStart: Event.pressEvent => unit=?,
55+
~onResponderTerminate: Event.pressEvent => unit=?,
56+
~onResponderTerminationRequest: Event.pressEvent => bool=?,
57+
~onStartShouldSetResponder: Event.pressEvent => bool=?,
58+
~onStartShouldSetResponderCapture: Event.pressEvent => bool=?,
59+
~pointerEvents: @string
60+
[
61+
| #auto
62+
| #none
63+
| @as("box-none") #boxNone
64+
| @as("box-only") #boxOnly
65+
]=?,
66+
~removeClippedSubviews: bool=?,
67+
~renderToHardwareTextureAndroid: bool=?,
68+
~shouldRasterizeIOS: bool=?,
69+
~style: Style.t=?,
70+
~testID: string=?,
71+
~children: React.element=?,
72+
// react-native-web 0.16 View props
73+
~href: string=?,
74+
~hrefAttrs: Web.hrefAttrs=?,
75+
~onMouseDown: ReactEvent.Mouse.t => unit=?,
76+
~onMouseEnter: ReactEvent.Mouse.t => unit=?,
77+
~onMouseLeave: ReactEvent.Mouse.t => unit=?,
78+
~onMouseMove: ReactEvent.Mouse.t => unit=?,
79+
~onMouseOver: ReactEvent.Mouse.t => unit=?,
80+
~onMouseOut: ReactEvent.Mouse.t => unit=?,
81+
~onMouseUp: ReactEvent.Mouse.t => unit=?,
82+
) => React.element = "Picker"
83+
84+
module Item = {
85+
@react.component @module("@react-native-picker/picker") @scope("Picker")
86+
external make: (
87+
~value: 'a=?,
88+
~label: string,
89+
~color: ReactNative.Color.t=?,
90+
~testID: string=?,
91+
) => React.element = "Item"
92+
}

src/ReactNativePickerIOS.bs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var NativeElement$ReactNative = require("reason-react-native/src/elements/NativeElement.bs.js");
3+
var NativeElement$ReactNative = require("rescript-react-native/src/elements/NativeElement.bs.js");
44

55
var Item = {};
66

0 commit comments

Comments
 (0)