Compare commits

...
44 Commits
Author SHA1 Message Date
semantic-release-bot 4d8ed00b66 chore(release): 3.11.0 [skip ci]
# [3.11.0](https://github.com/expo/react-native-action-sheet/compare/v3.10.0...v3.11.0) (2021-09-07)

### Bug Fixes

* yarn lock issues ([#238](https://github.com/expo/react-native-action-sheet/issues/238)) ([22fc214](https://github.com/expo/react-native-action-sheet/commit/22fc2144b3ce3b5fc1892eefd86f484dc1af58e9))

### Features

* default useModal to true when autoFocus is set ([688fd47](https://github.com/expo/react-native-action-sheet/commit/688fd47227dab6994b59ed85af622cb04ebed220))
2021-09-07 09:03:41 -05:00
BradByte 22fc2144b3 fix: yarn lock issues (#238) 2021-09-07 09:01:44 -05:00
Brad Bumbalough 224d992a53 chore: update docs for useModal when autoFocus is true 2021-09-07 08:48:28 -05:00
Andy Li 688fd47227 feat: default useModal to true when autoFocus is set 2021-09-07 08:45:56 -05:00
dependabot[bot] e2e141bf53 chore(deps): bump url-parse from 1.5.1 to 1.5.3 in /example (#234)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.3.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.1...1.5.3)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 08:22:03 -05:00
dependabot[bot] be3425a4fd chore(deps): bump path-parse from 1.0.6 to 1.0.7 in /example (#235)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 08:21:27 -05:00
dependabot[bot] 7a388210b1 chore(deps): bump tar from 4.4.15 to 4.4.19 (#237)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.15 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.15...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-07 08:21:06 -05:00
dependabot[bot] d3fe451642 chore(deps): bump path-parse from 1.0.6 to 1.0.7 (#233)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-10 15:56:13 -05:00
Brad Bumbalough 682e46136f chore: correct version to 3.10.0 2021-08-09 10:15:40 -05:00
semantic-release-bot 0e5559fb45 chore(release): 3.9.0 [skip ci]
# [3.9.0](https://github.com/expo/react-native-action-sheet/compare/v3.8.0...v3.9.0) (2021-08-09)

### Bug Fixes

* allow callback to be async ([#183](https://github.com/expo/react-native-action-sheet/issues/183)) ([d0d5182](https://github.com/expo/react-native-action-sheet/commit/d0d518278028556a80deec3d9b57c332b82ba28d))
* center icons with titles ([#188](https://github.com/expo/react-native-action-sheet/issues/188)) ([d48c323](https://github.com/expo/react-native-action-sheet/commit/d48c323e4563363c8683c427d1803e1ff4cddcb5))

### Features

* add `userInterfaceStyle` option for iOS ([#206](https://github.com/expo/react-native-action-sheet/issues/206)) ([735cfa5](https://github.com/expo/react-native-action-sheet/commit/735cfa54ba1bfd90139671489aca525fdbd59626))
* Allow multiple destructive indices ([#210](https://github.com/expo/react-native-action-sheet/issues/210)) ([81112b9](https://github.com/expo/react-native-action-sheet/commit/81112b9553dc34725e2708b02b64b7a5e5c57509))
2021-08-09 10:09:57 -05:00
semantic-release-bot f9ac44a6cb chore(release): 3.9.0 [skip ci]
# [3.9.0](https://github.com/expo/react-native-action-sheet/compare/v3.8.0...v3.9.0) (2021-08-09)

### Bug Fixes

* allow callback to be async ([#183](https://github.com/expo/react-native-action-sheet/issues/183)) ([d0d5182](https://github.com/expo/react-native-action-sheet/commit/d0d518278028556a80deec3d9b57c332b82ba28d))
* center icons with titles ([#188](https://github.com/expo/react-native-action-sheet/issues/188)) ([d48c323](https://github.com/expo/react-native-action-sheet/commit/d48c323e4563363c8683c427d1803e1ff4cddcb5))

### Features

* add `userInterfaceStyle` option for iOS ([#206](https://github.com/expo/react-native-action-sheet/issues/206)) ([735cfa5](https://github.com/expo/react-native-action-sheet/commit/735cfa54ba1bfd90139671489aca525fdbd59626))
* Allow multiple destructive indices ([#210](https://github.com/expo/react-native-action-sheet/issues/210)) ([81112b9](https://github.com/expo/react-native-action-sheet/commit/81112b9553dc34725e2708b02b64b7a5e5c57509))
2021-08-09 10:08:10 -05:00
Brad Bumbalough d31681dfea chore: bump semantic-release versions 2021-08-09 09:57:06 -05:00
semantic-release-bot 8a1659d71d chore(release): 3.9.0 [skip ci]
# [3.9.0](https://github.com/expo/react-native-action-sheet/compare/v3.8.0...v3.9.0) (2021-03-12)

### Bug Fixes

* allow callback to be async ([#183](https://github.com/expo/react-native-action-sheet/issues/183)) ([d0d5182](https://github.com/expo/react-native-action-sheet/commit/d0d518278028556a80deec3d9b57c332b82ba28d))
* center icons with titles ([#188](https://github.com/expo/react-native-action-sheet/issues/188)) ([d48c323](https://github.com/expo/react-native-action-sheet/commit/d48c323e4563363c8683c427d1803e1ff4cddcb5))

### Features

* add `userInterfaceStyle` option for iOS ([#206](https://github.com/expo/react-native-action-sheet/issues/206)) ([735cfa5](https://github.com/expo/react-native-action-sheet/commit/735cfa54ba1bfd90139671489aca525fdbd59626))
2021-08-09 09:23:54 -05:00
dependabot[bot] fd731f0867 chore(deps): bump color-string from 1.5.4 to 1.6.0 in /example (#232)
Bumps [color-string](https://github.com/Qix-/color-string) from 1.5.4 to 1.6.0.
- [Release notes](https://github.com/Qix-/color-string/releases)
- [Changelog](https://github.com/Qix-/color-string/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Qix-/color-string/compare/1.5.4...1.6.0)

---
updated-dependencies:
- dependency-name: color-string
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 14:51:58 -05:00
dependabot[bot] 4dc8fcf7b2 chore(deps): bump tar from 4.4.13 to 4.4.15 (#231)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.15.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.15)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 08:22:32 -05:00
Evrim Persembe 81112b9553 feat: Allow multiple destructive indices (#210) 2021-06-21 16:13:20 -05:00
dependabot[bot] f0b38daaac chore(deps): bump normalize-url from 5.3.0 to 5.3.1 (#229)
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 08:15:52 -05:00
dependabot[bot] bb7c00fb72 chore(deps): bump browserslist from 4.15.0 to 4.16.6 in /example (#223)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.15.0 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.15.0...4.16.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 08:20:24 -05:00
dependabot[bot] 7c757ac7e5 chore(deps): bump trim-newlines from 3.0.0 to 3.0.1 (#227)
Bumps [trim-newlines](https://github.com/sindresorhus/trim-newlines) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/trim-newlines/releases)
- [Commits](https://github.com/sindresorhus/trim-newlines/commits)

---
updated-dependencies:
- dependency-name: trim-newlines
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-08 08:20:14 -05:00
Jesse Katsumata 51cd2d1009 docs: replace slack badge with discord badge (#225) 2021-06-08 08:20:00 -05:00
dependabot[bot] 97505a2041 chore(deps): bump ua-parser-js from 0.7.22 to 0.7.28 (#215)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.22 to 0.7.28.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.22...0.7.28)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:41:02 -05:00
dependabot[bot] 0a5821e1a3 chore(deps): bump y18n from 3.2.1 to 3.2.2 (#208)
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:40:54 -05:00
dependabot[bot] c465495515 chore(deps): bump ua-parser-js from 0.7.20 to 0.7.28 in /example (#214)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.20 to 0.7.28.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.20...0.7.28)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:39:16 -05:00
dependabot[bot] 51efe1c0e5 chore(deps): bump lodash from 4.17.20 to 4.17.21 (#216)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:39:01 -05:00
dependabot[bot] b1cbd92a2a chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#217)
Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](https://github.com/wycats/handlebars.js/compare/v4.7.6...v4.7.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:38:49 -05:00
dependabot[bot] 00a3e8354a chore(deps): bump url-parse from 1.4.7 to 1.5.1 in /example (#218)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:38:25 -05:00
dependabot[bot] af226d6aa0 chore(deps): bump hosted-git-info from 2.8.8 to 2.8.9 (#219)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:38:15 -05:00
dependabot[bot] f9a8e47b49 chore(deps): bump lodash from 4.17.19 to 4.17.21 in /example (#220)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-17 06:38:05 -05:00
dependabot[bot] 4af170533f chore(deps): bump ssri from 6.0.1 to 6.0.2 (#213)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-03 08:06:41 -05:00
Manu 735cfa54ba feat: add userInterfaceStyle option for iOS (#206) 2021-03-11 14:13:29 -06:00
Emmanuel Johnandemmanuel.john 1af3809e07 chore: allow setting useNativeDriver on the provider (#202)
Fixes #184 

Co-authored-by: emmanuel.john <[email protected]>
2021-02-12 11:00:32 -06:00
dependabot[bot] d76a61f593 chore(deps): bump ini from 1.3.5 to 1.3.7 (#196)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-12 07:21:44 -06:00
Brad Bumbalough 3ef49be264 chore: upgrade example app to SDK 39 (#193) 2020-12-02 17:14:07 -06:00
Brad Bumbalough 18e63e275d chore: resolve dependency audit issues (#192)
* chore: update semantic-release to latest

* chore: update yarn.lock to resolve audit issues
2020-12-02 17:02:16 -06:00
Svarto d48c323e45 fix: center icons with titles (#188) 2020-12-02 16:37:09 -06:00
Vincent PizzoandVincent Pizzo d0d5182780 fix: allow callback to be async (#183)
Co-authored-by: Vincent Pizzo <[email protected]>
2020-12-02 16:27:15 -06:00
dependabot[bot] eb30b1ed14 chore(deps-dev): bump semantic-release from 15.13.31 to 17.2.3 (#190)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 15.13.31 to 17.2.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v15.13.31...v17.2.3)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 16:26:09 -06:00
dependabot[bot] f509356bdd chore(deps): bump npm-user-validate from 1.0.0 to 1.0.1 (#186)
Bumps [npm-user-validate](https://github.com/npm/npm-user-validate) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/npm/npm-user-validate/releases)
- [Commits](https://github.com/npm/npm-user-validate/compare/v1.0.0...v1.0.1)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-02 16:25:55 -06:00
dependabot[bot] 86007a32a0 chore(deps): bump npm from 6.13.4 to 6.14.6 (#175)
Bumps [npm](https://github.com/npm/cli) from 6.13.4 to 6.14.6.
- [Release notes](https://github.com/npm/cli/releases)
- [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md)
- [Commits](https://github.com/npm/cli/compare/v6.13.4...v6.14.6)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-08-03 13:20:43 -05:00
dependabot[bot] 76da5f5fe5 chore(deps): bump lodash from 4.17.14 to 4.17.19 (#178)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.14...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 15:11:36 -05:00
dependabot[bot] e1bd0b0415 chore(deps): bump lodash from 4.17.14 to 4.17.19 in /example
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.14 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.14...4.17.19)

Signed-off-by: dependabot[bot] <[email protected]>
2020-07-17 11:39:23 -07:00
semantic-release-bot d0cf2b8c8d chore(release): 3.8.0 [skip ci]
# [3.8.0](https://github.com/expo/react-native-action-sheet/compare/v3.7.0...v3.8.0) (2020-05-19)

### Features

* Add destructiveColor option ([#171](https://github.com/expo/react-native-action-sheet/issues/171)) ([5549e36](https://github.com/expo/react-native-action-sheet/commit/5549e36a92d8afcc0ce2bf6a601e83209b5ce080))
* Improvements to Android accessibility ([#168](https://github.com/expo/react-native-action-sheet/issues/168)) ([b605fb8](https://github.com/expo/react-native-action-sheet/commit/b605fb8a3b6421c244f7f18d934bb5ea0753d461))
2020-05-19 07:58:03 -05:00
V. Danilichev 5549e36a92 feat: Add destructiveColor option (#171) 2020-05-19 07:55:17 -05:00
Steven Fuqua b605fb8a3b feat: Improvements to Android accessibility (#168) 2020-05-19 07:48:58 -05:00
12 changed files with 4909 additions and 3756 deletions

No files matched your search

+38
View File
@@ -1,5 +1,43 @@
# Changelog
# [3.11.0](https://github.com/expo/react-native-action-sheet/compare/v3.10.0...v3.11.0) (2021-09-07)
### Bug Fixes
* yarn lock issues ([#238](https://github.com/expo/react-native-action-sheet/issues/238)) ([22fc214](https://github.com/expo/react-native-action-sheet/commit/22fc2144b3ce3b5fc1892eefd86f484dc1af58e9))
### Features
* default useModal to true when autoFocus is set ([688fd47](https://github.com/expo/react-native-action-sheet/commit/688fd47227dab6994b59ed85af622cb04ebed220))
# [3.10.0](https://github.com/expo/react-native-action-sheet/compare/v3.8.0...v3.10.0) (2021-08-09)
### Features
* Allow multiple destructive indices ([#210](https://github.com/expo/react-native-action-sheet/issues/210)) ([81112b9](https://github.com/expo/react-native-action-sheet/commit/81112b9553dc34725e2708b02b64b7a5e5c57509))
# [3.9.0](https://github.com/expo/react-native-action-sheet/compare/v3.8.0...v3.9.0) (2021-03-12)
### Bug Fixes
* allow callback to be async ([#183](https://github.com/expo/react-native-action-sheet/issues/183)) ([d0d5182](https://github.com/expo/react-native-action-sheet/commit/d0d518278028556a80deec3d9b57c332b82ba28d))
* center icons with titles ([#188](https://github.com/expo/react-native-action-sheet/issues/188)) ([d48c323](https://github.com/expo/react-native-action-sheet/commit/d48c323e4563363c8683c427d1803e1ff4cddcb5))
### Features
* add `userInterfaceStyle` option for iOS ([#206](https://github.com/expo/react-native-action-sheet/issues/206)) ([735cfa5](https://github.com/expo/react-native-action-sheet/commit/735cfa54ba1bfd90139671489aca525fdbd59626))
# [3.8.0](https://github.com/expo/react-native-action-sheet/compare/v3.7.0...v3.8.0) (2020-05-19)
### Features
* Add destructiveColor option ([#171](https://github.com/expo/react-native-action-sheet/issues/171)) ([5549e36](https://github.com/expo/react-native-action-sheet/commit/5549e36a92d8afcc0ce2bf6a601e83209b5ce080))
* Improvements to Android accessibility ([#168](https://github.com/expo/react-native-action-sheet/issues/168)) ([b605fb8](https://github.com/expo/react-native-action-sheet/commit/b605fb8a3b6421c244f7f18d934bb5ea0753d461))
# [3.7.0](https://github.com/expo/react-native-action-sheet/compare/v3.6.0...v3.7.0) (2020-05-06)
+26 -5
View File
@@ -1,7 +1,7 @@
# react-native-action-sheet
[![npm](https://img.shields.io/npm/v/@expo/react-native-action-sheet.svg?style=flat-square)](https://www.npmjs.com/package/@expo/react-native-action-sheet)
[![License: MIT](https://img.shields.io/github/license/nd-02110114/goofi-mobile.svg)](https://opensource.org/licenses/MIT)
[![Slack](https://slack.expo.io/badge.svg)](https://slack.expo.io)
[![Discord](https://img.shields.io/badge/discord-expo-green?style=flat-square&logo=discord)](https://discord.gg/4gtbPAdpaE)
ActionSheet is a cross-platform React Native component that uses the native UIActionSheet on iOS and a JS implementation on Android. Almost a drop in replacement for [ActionSheetIOS](https://facebook.github.io/react-native/docs/actionsheetios.html) except it cannot be called statically.
@@ -98,13 +98,17 @@ The same options available on React Native's [ActionSheetIOS](https://facebook.g
### iOS Only Props
| Name | Type | Required | Default |
| -----------------| -------| -------- | ------- |
| anchor | number | No | |
| Name | Type | Required | Default |
| -------------------| -------| -------- | ------- |
| anchor | number | No | |
| userInterfaceStyle | string | No | |
#### `anchor` (optional)
iPad only option that allows for docking the action sheet to a node. See [ShowActionSheetButton.tsx](/example/ShowActionSheetButton.tsx) for an example on how to implement this.
#### `userInterfaceStyle` (optional)
The interface style used for the action sheet, can be set to `light` or `dark`, otherwise the default system style will be used.
### Android/Web-Only Props
The below props allow modification of the Android ActionSheet. They have no effect on the look on iOS as the native iOS Action Sheet does not have options for modifying these options.
@@ -117,10 +121,12 @@ The below props allow modification of the Android ActionSheet. They have no effe
| textStyle | TextStyle | No | |
| titleTextStyle | TextStyle | No | |
| messageTextStyle | TextStyle | No | |
| autoFocus | boolean | No | false |
| showSeparators | boolean | No | false |
| containerStyle | ViewStyle | No | |
| separatorStyle | ViewStyle | No | |
| useModal | boolean | No | false |
| useModal | boolean | No | false (true if autoFocus is true) |
| destructiveColor | string | No | #d32f2f |
#### `icons` (optional)
@@ -138,6 +144,10 @@ Apply any text style props to the title if present.
#### `messageTextStyle` (optional)
Apply any text style props to the message if present.
#### `autoFocus`: (optional)
If true, will give the first option screen reader focus automatically when the action sheet becomes visible.
On iOS, this is the default behavior of the native action sheet.
#### `showSeparators`: (optional)
Show separators between items. On iOS, separators always show so this prop has no effect.
@@ -150,6 +160,17 @@ Modify the look of the separators rather than use the default look.
#### `useModal`: (optional)
Wrap the ActionSheet with a Modal, in order to show in front of other Modals that were already opened ([issue reference](https://github.com/expo/react-native-action-sheet/issues/164)).
#### `destructiveColor`: (optional)
Modify color for text of destructive option.
## ActionSheetProvider Props
The following props can be set directly on the `ActionSheetProvider`
#### `useNativeDriver` (optional)
Windows only option that provides the option to disable the [native animation](https://reactnative.dev/docs/animated#using-the-native-driver) driver for React Native Windows projects targeting _Windows 10 Version-1809 ; Build-10.0.17763.0_ and earlier. `useNativeDriver` is [supported in Version-1903 and later](https://microsoft.github.io/react-native-windows/docs/win10-compat) so if your project is targeting that, you don't need to set this prop.
## Try it out
Try it in Expo: https://expo.io/@community/react-native-action-sheet-example
+1 -2
View File
@@ -4,7 +4,6 @@
"description": "A cross-platform ActionSheet component. https://github.com/expo/react-native-action-sheet",
"slug": "react-native-action-sheet-example",
"privacy": "public",
"sdkVersion": "35.0.0",
"version": "3.0.0",
"orientation": "portrait",
"primaryColor": "#cccccc",
@@ -15,4 +14,4 @@
"web"
]
}
}
}
+9 -9
View File
@@ -14,17 +14,17 @@
"dependencies": {
"@expo/react-native-action-sheet": "../src",
"@expo/vector-icons": "^10.0.0",
"expo": "^35.0.0",
"expo": "^39.0.0",
"hoist-non-react-statics": "^3.3.0",
"react": "16.8.3",
"react-dom": "16.8.3",
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
"react-native-web": "^0.11.5"
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-39.0.3.tar.gz",
"react-native-web": "~0.13.7"
},
"devDependencies": {
"@types/react": "^16.8.23",
"@types/react-native": "^0.57.65",
"babel-preset-expo": "^7.0.0",
"typescript": "^3.5.3"
"@types/react": "~16.9.35",
"@types/react-native": "~0.63.2",
"babel-preset-expo": "^8.3.0",
"typescript": "~3.9.2"
}
}
+2760 -1717
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@expo/react-native-action-sheet",
"version": "3.7.0",
"version": "3.11.0",
"description": "A cross-platform ActionSheet for React Native",
"react-native": "lib/module/index.js",
"types": "lib/typescript/index.d.ts",
@@ -35,8 +35,8 @@
"devDependencies": {
"@react-native-community/bob": "^0.6.1",
"@react-native-community/eslint-config": "^0.0.5",
"@semantic-release/changelog": "^3.0.5",
"@semantic-release/git": "^7.0.18",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/react": "^16.8.23",
"@types/react-native": "^0.57.65",
"@typescript-eslint/eslint-plugin": "^1.12.0",
@@ -49,7 +49,7 @@
"prettier": "^1.18.2",
"react": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"semantic-release": "^15.13.28",
"semantic-release": "^17.4.4",
"typescript": "^3.5.3"
},
"peerDependencies": {
+47 -2
View File
@@ -1,5 +1,15 @@
import * as React from 'react';
import { StyleSheet, Text, Image, View, ScrollView } from 'react-native';
import {
AccessibilityInfo,
findNodeHandle,
Image,
Platform,
ScrollView,
StyleSheet,
Text,
UIManager,
View,
} from 'react-native';
import TouchableNativeFeedbackSafe from './TouchableNativeFeedbackSafe';
import { ActionSheetOptions } from '../types';
@@ -14,6 +24,36 @@ const BLACK_54PC_TRANSPARENT = '#0000008a';
const BLACK_87PC_TRANSPARENT = '#000000de';
const DESTRUCTIVE_COLOR = '#d32f2f';
/**
* Can be used as a React ref for a component to auto-focus for accessibility on render.
* @param ref The component to auto-focus
*/
const focusViewOnRender = (ref: React.Component | null) => {
if (ref) {
const reactTag = findNodeHandle(ref);
if (reactTag) {
if (Platform.OS === 'android') {
// @ts-ignore: sendAccessibilityEvent is missing from @types/react-native
UIManager.sendAccessibilityEvent(
reactTag,
// @ts-ignore: AccessibilityEventTypes is missing from @types/react-native
UIManager.AccessibilityEventTypes.typeViewFocused
);
} else {
AccessibilityInfo.setAccessibilityFocus(reactTag);
}
}
}
};
const isIndexDestructive = (index: number, destructiveIndex?: number | number[]) => {
if (Array.isArray(destructiveIndex)) {
return destructiveIndex.includes(index);
}
return index === destructiveIndex;
};
export default class ActionGroup extends React.Component<Props> {
static defaultProps = {
title: null,
@@ -75,11 +115,13 @@ export default class ActionGroup extends React.Component<Props> {
options,
icons,
destructiveButtonIndex,
destructiveColor = DESTRUCTIVE_COLOR,
onSelect,
startIndex,
length,
textStyle,
tintColor,
autoFocus,
showSeparators,
} = this.props;
const optionViews: React.ReactNode[] = [];
@@ -92,16 +134,18 @@ export default class ActionGroup extends React.Component<Props> {
const defaultColor = tintColor
? tintColor
: (textStyle || {}).color || BLACK_87PC_TRANSPARENT;
const color = i === destructiveButtonIndex ? DESTRUCTIVE_COLOR : defaultColor;
const color = isIndexDestructive(i, destructiveButtonIndex) ? destructiveColor : defaultColor;
const iconSource = icons != null ? icons[i] : null;
optionViews.push(
<TouchableNativeFeedbackSafe
ref={autoFocus && i === 0 ? focusViewOnRender : undefined}
key={i}
pressInDelay={0}
background={nativeFeedbackBackground}
onPress={() => onSelect(i)}
style={styles.button}
accessibilityRole="button"
accessibilityLabel={options[i]}>
{this._renderIconElement(iconSource, color)}
<Text style={[styles.text, textStyle, { color }]}>{options[i]}</Text>
@@ -133,6 +177,7 @@ const styles = StyleSheet.create({
width: 24,
height: 24,
marginRight: 32,
justifyContent: 'center',
},
message: {
marginTop: 12,
+2
View File
@@ -32,7 +32,9 @@ export default class ActionSheet extends React.Component<Props> {
title: dataOptions.title || undefined,
message: dataOptions.message || undefined,
anchor: dataOptions.anchor || undefined,
userInterfaceStyle: dataOptions.userInterfaceStyle || undefined,
};
// @ts-ignore: Even though ActionSheetIOS supports array of numbers for `destructiveIndex` the types are not yet updated. See https://github.com/facebook/react-native/pull/18254.
ActionSheetIOS.showActionSheetWithOptions(iosOptions, onSelect);
}
}
+20 -7
View File
@@ -55,7 +55,7 @@ export default class ActionSheet extends React.Component<Props, State> {
render() {
const { isVisible, overlayOpacity, options } = this.state;
const useModal = options ? options.useModal === true : false;
const useModal = options ? options.autoFocus || options.useModal === true : false;
const overlay = isVisible ? (
<Animated.View
style={[
@@ -66,13 +66,19 @@ export default class ActionSheet extends React.Component<Props, State> {
]}
/>
) : null;
return (
// While the sheet is visible, hide the rest of the app's content from screen readers.
const appContent = (
<View
pointerEvents={this.props.pointerEvents}
style={{
flex: 1,
}}>
style={styles.flexContainer}
importantForAccessibility={isVisible ? 'no-hide-descendants' : 'auto'}>
{React.Children.only(this.props.children)}
</View>
);
return (
<View pointerEvents={this.props.pointerEvents} style={styles.flexContainer}>
{appContent}
{isVisible && !useModal && (
<React.Fragment>
{overlay}
@@ -101,18 +107,20 @@ export default class ActionSheet extends React.Component<Props, State> {
icons,
tintIcons,
destructiveButtonIndex,
destructiveColor,
textStyle,
tintColor,
title,
titleTextStyle,
message,
messageTextStyle,
autoFocus,
showSeparators,
containerStyle,
separatorStyle,
} = options;
return (
<TouchableWithoutFeedback onPress={this._selectCancelButton}>
<TouchableWithoutFeedback importantForAccessibility="yes" onPress={this._selectCancelButton}>
<Animated.View
needsOffscreenAlphaCompositing={isAnimating}
style={[
@@ -135,6 +143,7 @@ export default class ActionSheet extends React.Component<Props, State> {
icons={icons}
tintIcons={tintIcons === undefined ? true : tintIcons}
destructiveButtonIndex={destructiveButtonIndex}
destructiveColor={destructiveColor}
onSelect={this._onSelect}
startIndex={0}
length={optionsArray.length}
@@ -144,6 +153,7 @@ export default class ActionSheet extends React.Component<Props, State> {
titleTextStyle={titleTextStyle}
message={message || undefined}
messageTextStyle={messageTextStyle}
autoFocus={autoFocus}
showSeparators={showSeparators}
containerStyle={containerStyle}
separatorStyle={separatorStyle}
@@ -264,6 +274,9 @@ export default class ActionSheet extends React.Component<Props, State> {
}
const styles = StyleSheet.create({
flexContainer: {
flex: 1,
},
overlay: {
position: 'absolute',
top: 0,
+2 -1
View File
@@ -5,6 +5,7 @@ import { ActionSheetOptions } from './types';
interface Props {
children: React.ReactNode;
useNativeDriver?: boolean;
}
export default class ActionSheetProvider extends React.Component<Props> {
@@ -27,7 +28,7 @@ export default class ActionSheetProvider extends React.Component<Props> {
render() {
return (
<Provider value={this.getContext()}>
<ActionSheet ref={this._actionSheetRef}>
<ActionSheet ref={this._actionSheetRef} useNativeDriver={this.props.useNativeDriver}>
{React.Children.only(this.props.children)}
</ActionSheet>
</Provider>
+8 -2
View File
@@ -2,7 +2,10 @@ import * as React from 'react';
import { TextStyle, ViewStyle } from 'react-native';
export interface ActionSheetProps {
showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i: number) => void) => void;
showActionSheetWithOptions: (
options: ActionSheetOptions,
callback: (i: number) => void | Promise<void>
) => void;
}
// for iOS
@@ -12,8 +15,9 @@ export interface ActionSheetIOSOptions {
message?: string;
tintColor?: string;
cancelButtonIndex?: number;
destructiveButtonIndex?: number;
destructiveButtonIndex?: number | number[];
anchor?: number;
userInterfaceStyle?: 'light' | 'dark';
}
// for Android or Web
@@ -23,8 +27,10 @@ export interface ActionSheetOptions extends ActionSheetIOSOptions {
textStyle?: TextStyle;
titleTextStyle?: TextStyle;
messageTextStyle?: TextStyle;
autoFocus?: boolean;
showSeparators?: boolean;
containerStyle?: ViewStyle;
separatorStyle?: ViewStyle;
useModal?: boolean;
destructiveColor?: string;
}
+1992 -2007
View File
File diff suppressed because it is too large. Load diff