Skip to content

Commit 18fd997

Browse files
author
Kamil Dobrzyński
committed
initial commit
0 parents  commit 18fd997

21 files changed

+10029
-0
lines changed

.babelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"presets": [
3+
"react-native"
4+
]
5+
}

.circleci/config.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
jobs:
7+
build:
8+
environment:
9+
CC_TEST_REPORTER_ID: 9b36beb22e04451e6414fcc28926f995c253d94877f616b50d192255196fbb68
10+
docker:
11+
# specify the version you desire here
12+
- image: circleci/node:10.16.0-stretch-browsers
13+
14+
# Specify service dependencies here if necessary
15+
# CircleCI maintains a library of pre-built images
16+
# documented at https://circleci.com/docs/2.0/circleci-images/
17+
# - image: circleci/mongo:3.4.4
18+
19+
working_directory: ~/repo
20+
21+
steps:
22+
- checkout
23+
24+
# Download and cache dependencies
25+
- restore_cache:
26+
keys:
27+
- v1-dependencies-{{ checksum "package.json" }}
28+
# fallback to using the latest cache if no exact match is found
29+
- v1-dependencies-
30+
31+
- run:
32+
name: Setup Code Climate test-reporter
33+
command: |
34+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
35+
chmod +x ./cc-test-reporter
36+
37+
- run: yarn install
38+
39+
- save_cache:
40+
paths:
41+
- node_modules
42+
key: v1-dependencies-{{ checksum "package.json" }}
43+
44+
- run:
45+
name: Run Tests and Upload Coverage
46+
command: |
47+
./cc-test-reporter before-build
48+
yarn run test:coverage
49+
./cc-test-reporter after-build --exit-code $?

.codeclimate.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: "2" # required to adjust maintainability checks
2+
checks:
3+
argument-count:
4+
config:
5+
threshold: 4
6+
complex-logic:
7+
config:
8+
threshold: 4
9+
file-lines:
10+
config:
11+
threshold: 500
12+
method-complexity:
13+
config:
14+
threshold: 5
15+
method-count:
16+
config:
17+
threshold: 20
18+
method-lines:
19+
config:
20+
threshold: 50
21+
nested-control-flow:
22+
config:
23+
threshold: 4
24+
return-statements:
25+
config:
26+
threshold: 4
27+
similar-code:
28+
config:
29+
threshold: 75 # language-specific defaults. an override will affect all languages.
30+
identical-code:
31+
config:
32+
threshold: 50 # language-specific defaults. an override will affect all languages.

.eslintrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
extends: 'ls-react',
3+
env: {
4+
jest: true,
5+
},
6+
globals: {
7+
shallow: true,
8+
},
9+
rules: {
10+
'import/no-extraneous-dependencies': 0,
11+
'lodash/import-scope': 0,
12+
'lodash/prefer-lodash-method': 0,
13+
'lodash/prefer-noop': 0,
14+
},
15+
};

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
node_modules/
3+
coverage/
4+
.vscode/
5+
.npm/

.prettierrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
printWidth: 100,
3+
tabWidth: 4,
4+
useTabs: false,
5+
semi: true,
6+
singleQuote: true,
7+
trailingComma: 'es5',
8+
bracketSpacing: true,
9+
jsxBracketSameLine: false,
10+
arrowParens: 'always',
11+
};

CHANGELOG.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
### 6.3.1
2+
3+
##### Bugfix
4+
5+
- Fix Done button on iPad (#209)
6+
7+
---
8+
9+
### 6.3.0
10+
11+
##### New
12+
13+
- Added a prop called `InputAccessoryView` to allow a custom component to replace the InputAccessoryView on iOS. View the [snack](https://snack.expo.io/@lfkwtz/react-native-picker-select) to see examples on how this can be customized. As a result of this change, the `hideDoneBar` prop has been deprecated.
14+
- iOS modal window now correctly resizes on orientation change
15+
- `defaultStyles` are now exported
16+
17+
---
18+
19+
### 6.2.0
20+
21+
##### New
22+
23+
- Supports an empty `items` array (#161)
24+
25+
---
26+
27+
### 6.1.1
28+
29+
##### Bugfix
30+
31+
- Replaced setTimeouts with callbacks for arrow buttons (#177)
32+
33+
---
34+
35+
### 6.1.0
36+
37+
##### New
38+
39+
- Opened up `placeholder` on style object for modification (#119) (#155). The `placeholderTextColor` prop is now deprecated, as this style object allows for additional properties.
40+
41+
---
42+
43+
## 6.0.0
44+
45+
#### Breaking Changes
46+
47+
- In order to make this component less opinionated, especially in terms of style, we have removed the default dropdown arrow icon in leiu of a more flexible `Icon` prop which will render a component - allowing you to insert your own css, image, svg, or icon from any library of your choosing. Due to this change, the `noIcon` prop has been removed. To replicate the arrow from previous versions, see the [last example](example/example.js) / see the styling section in the README for more details.
48+
- In Android, we no longer insert a psuedo-underline by default - as the default input style in React Native sets the underline color to transparent since [this PR](https://github.com/facebook/react-native/commit/a3a98eb1c7fa0054a236d45421393874ce8ce558) - which landed in 0.56. You can add this back in fairly easily, either by using the `textInputProps` prop or by adding a border on one of the wrapping container elements - all depending on your personal usage of the component.
49+
- Some of the default styles of the iOS "Done bar" have been tweaked and streamlined
50+
- if using useNativeAndroidPickerStyle={false}, the outer container is now only `headlessAndroidContainer` without `viewContainer` wrapping it
51+
52+
---
53+
54+
### 5.2.5
55+
56+
##### Bugfix
57+
58+
- Fix headless Android onValueChange trigger on render (#141)
59+
60+
---
61+
62+
### 5.2.4
63+
64+
#### Bugfix
65+
66+
- Fix TypeError (#139)
67+
68+
---
69+
70+
### 5.2.3
71+
72+
##### Bugfix
73+
74+
- Fixes Android headless mode trigger area (#122)
75+
76+
---
77+
78+
### 5.2.2
79+
80+
##### Bugfix
81+
82+
- Fixes unnecessary renders (#129)
83+
84+
---
85+
86+
### 5.2.1
87+
88+
##### Bugfix
89+
90+
- Fixes keyboard not dismissing on iOS
91+
92+
---
93+
94+
### 5.2.0
95+
96+
##### New
97+
98+
- Added `onOpen` and `onClose` callbacks (iOS only)
99+
100+
---
101+
102+
### 5.1.1
103+
104+
##### New
105+
106+
- Opened up headlessAndroidPicker and chevronContainer on style object for modification
107+
108+
---
109+
110+
### 5.1.0
111+
112+
##### New
113+
114+
- Added `useNativeAndroidPickerStyle` prop. See README for more details.
115+
116+
##### Bugfix
117+
118+
- Fixed Android headless mode showing selected value outside of View (#83)
119+
120+
---
121+
122+
### 5.0.1
123+
124+
##### Bugfix
125+
126+
- Fixed `TouchableWithoutFeedback` warning
127+
128+
---
129+
130+
## 5.0.0
131+
132+
#### Breaking Changes
133+
134+
- `styles.placeholderColor` has been replaced with `placeholderTextColor`
135+
- `mode` prop is now accessible via `pickerProps`
136+
- `animationType` prop is now accessible via `modalProps` (see warning in README)
137+
138+
##### New
139+
140+
- Default placeholder now includes default `color` of #9EA0A4
141+
- `pickerProps`, `modalProps`, and `textInputProps` have been added (see README)

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## How to contribute to react-native-picker-select
2+
3+
#### **Did you write a patch that fixes a bug?**
4+
5+
* Ensure that you link your PR to an open issue. If one is not open, use the "Bug report" template to create one.
6+
7+
#### **Do you intend to add a new feature or change an existing one?**
8+
9+
* First create an issue using the "Feature request" template and make a note that you intend to make this change.
10+
11+
* Before opening the PR, please wait for a response from our team.
12+
13+
#### **Looking for inspiration?**
14+
15+
* See the [Feature Requests](https://github.com/lawnstarter/react-native-picker-select/projects/1) board and feel free to submit a PR for anything in the "To do" column.

ISSUE_TEMPLATE/bug_report.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Report a reproducible bug or regression.
4+
5+
---
6+
7+
### YOU MUST FILL OUT EVERY SECTION. INCOMPLETE BUG REPORTS WILL BE CLOSED.
8+
9+
**Describe the bug**<br />
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**<br />
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**<br />
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**<br />
24+
Add screenshots to help explain your problem. If screenshots aren't applicable to this issue, write "n/a".
25+
26+
**Additional details**<br />
27+
- Device: [e.g. iPhone6]
28+
- OS: [e.g. iOS8.1]
29+
- react-native-picker-select version: [e.g. 4.3.0]
30+
- react-native version: [e.g. 0.56]
31+
- react version: [e.g. 16.3]
32+
33+
**Reproduction and/or code sample**<br />
34+
Provide a link to a reproduction of this issue on https://snack.expo.io **or an explanation why you can not**. Not including a snack link will result in a significant delay in our ability to address this issue.

ISSUE_TEMPLATE/feature_request.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 💡 Feature Request
3+
about: Suggest an idea for this component.
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 LawnStarter
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)