Compare commits

..
Author SHA1 Message Date
Brad Bumbalough 64b8529472 chore: bump example to expo 48 2023-05-22 16:36:58 -05:00
dependabot[bot] a918aec770 chore(deps): bump minimatch from 3.0.4 to 3.1.2 (#305)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:20:53 -06:00
dependabot[bot] 93bc73bf22 chore(deps): bump minimatch from 3.0.4 to 3.1.2 in /example (#304)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:19:13 -06:00
dependabot[bot] d2d0843790 chore(deps): bump @xmldom/xmldom from 0.7.5 to 0.7.10 in /example (#303)
Bumps [@xmldom/xmldom](https://github.com/xmldom/xmldom) from 0.7.5 to 0.7.10.
- [Release notes](https://github.com/xmldom/xmldom/releases)
- [Changelog](https://github.com/xmldom/xmldom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xmldom/xmldom/compare/0.7.5...0.7.10)

---
updated-dependencies:
- dependency-name: "@xmldom/xmldom"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:10:47 -06:00
dependabot[bot] 929a1dbc54 chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 in /example (#302)
Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Commits](https://github.com/sideway/formula/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:10:33 -06:00
dependabot[bot] 0468951ed4 chore(deps): bump ua-parser-js from 0.7.28 to 0.7.33 (#294)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.28 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.28...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:05:33 -06:00
dependabot[bot] c73938f4de chore(deps): bump ua-parser-js from 0.7.28 to 0.7.33 in /example (#293)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.28 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.28...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:05:22 -06:00
dependabot[bot] aec473fb02 chore(deps): bump json5 from 1.0.1 to 1.0.2 (#290)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:04:01 -06:00
dependabot[bot] 21d10edbd0 chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 in /example (#289)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:03:38 -06:00
dependabot[bot] ecb6b23caa chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#288)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:03:22 -06:00
dependabot[bot] 2f9346bcd7 chore(deps): bump shell-quote from 1.6.1 to 1.7.4 in /example (#284)
Bumps [shell-quote](https://github.com/ljharb/shell-quote) from 1.6.1 to 1.7.4.
- [Release notes](https://github.com/ljharb/shell-quote/releases)
- [Changelog](https://github.com/ljharb/shell-quote/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/shell-quote/compare/1.6.1...v1.7.4)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-09 22:03:04 -06:00
BradByte b35a403a21 fix: use release-please instead of semantic release (#300)
* fix: use release-please instead of semantic release

* chore: update ci steps
2023-05-09 22:01:20 -06:00
Eleftherios Myteletsis 3b698da831 chore: Update README.md (#291) 2023-01-18 08:36:30 -06:00
semantic-release-bot c583287d00 chore(release): 4.0.1 [skip ci]
## [4.0.1](https://github.com/expo/react-native-action-sheet/compare/v4.0.0...v4.0.1) (2022-11-04)

### Bug Fixes

* expose ref on ActionSheetProvider for statically invoking ([#283](https://github.com/expo/react-native-action-sheet/issues/283)) ([b2f5f43](https://github.com/expo/react-native-action-sheet/commit/b2f5f433ff2070c77fdd62b273d2d80e636efd3a))
2022-11-04 20:14:25 +00:00
BradByte b2f5f433ff fix: expose ref on ActionSheetProvider for statically invoking (#283)
This fixes an unknown breaking change from 4.0.0 where attempting to put a ref directly on `ActionSheetProvider` would error. For simplicity, the ref on that component will now return an object containing `showActionSheetWithOptions()`, but for backwards compatibility `getContext()` is also available.
2022-11-04 15:13:18 -05:00
10 changed files with 1950 additions and 3820 deletions

No files matched your search

+18 -10
View File
@@ -2,21 +2,29 @@ name: CI
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
- name: 🗂️ Checkout
uses: actions/checkout@v3
- name: ⚙️ Setup Node
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- run: npm run type-check
- run: npm run lint-check
- name: 🧱 Build
run: yarn
- name: 🚧 Type Check
run: npm run type-check
- name: 🛟 Lint Check
run: npm run lint-check
+30 -14
View File
@@ -2,22 +2,38 @@ name: Release
on:
push:
branches: [ master ]
jobs:
release:
runs-on: ubuntu-latest
branches: [master]
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release-created: ${{ steps.release.outputs.release_created }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: node
package-name: '@expo/react-native-action-sheet'
deploy:
needs: [release-please]
if: needs.release-please.outputs.release-created == 'true'
runs-on: ubuntu-latest
steps:
- name: 🗂️ Checkout
uses: actions/checkout@v3
- name: ⚙️ Setup Node
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: 🧱 Build
run: yarn
- name: 🚀 Deploy
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [4.0.1](https://github.com/expo/react-native-action-sheet/compare/v4.0.0...v4.0.1) (2022-11-04)
### Bug Fixes
* expose ref on ActionSheetProvider for statically invoking ([#283](https://github.com/expo/react-native-action-sheet/issues/283)) ([b2f5f43](https://github.com/expo/react-native-action-sheet/commit/b2f5f433ff2070c77fdd62b273d2d80e636efd3a))
# [4.0.0](https://github.com/expo/react-native-action-sheet/compare/v3.14.0...v4.0.0) (2022-10-26)
+1 -1
View File
@@ -51,7 +51,7 @@ import { useActionSheet } from '@expo/react-native-action-sheet';
export default Menu() {
const { showActionSheetWithOptions } = useActionSheet();
const onPress() => {
const onPress = () => {
const options = ['Delete', 'Save', 'Cancel'];
const destructiveButtonIndex = 0;
const cancelButtonIndex = 2;
+9 -9
View File
@@ -14,17 +14,17 @@
"dependencies": {
"@expo/react-native-action-sheet": "../src",
"@expo/vector-icons": "^13.0.0",
"expo": "^46.0.0",
"expo": "^48.0.0",
"hoist-non-react-statics": "^3.3.0",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-native": "0.69.6",
"react-native-web": "~0.18.7"
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.71.3",
"react-native-web": "~0.18.11"
},
"devDependencies": {
"@types/react": "~18.0.0",
"@types/react-native": "~0.69.1",
"babel-preset-expo": "~9.2.0",
"typescript": "^4.6.3"
"@types/react": "~18.2.0",
"@types/react-native": "~0.71.3",
"babel-preset-expo": "^9.3.0",
"typescript": "^4.9.4"
}
}
+1787 -1304
View File
File diff suppressed because it is too large. Load diff
+1 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@expo/react-native-action-sheet",
"version": "4.0.0",
"version": "4.0.1",
"description": "A cross-platform ActionSheet for React Native",
"react-native": "lib/module/index.js",
"types": "lib/typescript/index.d.ts",
@@ -45,7 +45,6 @@
"prettier": "^2.3.2",
"react": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"semantic-release": "^19.0.3",
"typescript": "^3.5.3"
},
"peerDependencies": {
+16 -7
View File
@@ -4,7 +4,7 @@ import * as React from 'react';
import NativeActionSheet from './ActionSheet';
import CustomActionSheet from './ActionSheet/CustomActionSheet';
import { Provider } from './context';
import { ActionSheetOptions } from './types';
import { ActionSheetOptions, ActionSheetProviderRef } from './types';
interface Props {
children: React.ReactNode;
@@ -12,11 +12,10 @@ interface Props {
useCustomActionSheet?: boolean;
}
export default function ActionSheetProvider({
children,
useNativeDriver,
useCustomActionSheet = false,
}: Props) {
export default React.forwardRef<ActionSheetProviderRef, Props>(function ActionSheetProvider(
{ children, useNativeDriver, useCustomActionSheet = false },
ref
) {
const actionSheetRef = React.useRef<NativeActionSheet>(null);
const context = React.useMemo(
@@ -30,6 +29,16 @@ export default function ActionSheetProvider({
[actionSheetRef]
);
React.useImperativeHandle(
ref,
() => ({
// backwards compatible with 13.x before context was being passed right on the ref
getContext: () => context,
showActionSheetWithOptions: context.showActionSheetWithOptions,
}),
[context]
);
const ActionSheet = React.useMemo(
() => (useCustomActionSheet ? CustomActionSheet : NativeActionSheet),
[useCustomActionSheet]
@@ -42,4 +51,4 @@ export default function ActionSheetProvider({
</ActionSheet>
</Provider>
);
}
});
+7
View File
@@ -8,6 +8,13 @@ export interface ActionSheetProps {
) => void;
}
export interface ActionSheetProviderRef extends ActionSheetProps {
/**
* @deprecated Simply call `showActionSheetWithOptions()` directly from the ref now
*/
getContext: () => ActionSheetProps;
}
// for iOS
export interface ActionSheetIOSOptions {
options: string[];
+74 -2473
View File
File diff suppressed because it is too large. Load diff