Skip to content

Commit 5bcea1d

Browse files
alpharius-ckclaude
andcommitted
Merge branch 'main' into feat/refactor-icon-button-component
Port main's IconButton changes into the Material 3 Expressive rewrite: - 48dp hit slop via getMinInteractiveSizeHitSlop, with a hitSlop override (none when disabled or without a touch handler) - role prop, and an image role on web for a labelled, handler-less button - touchable fills the container so content stays centered - touchable clips its own ripple, so the hit slop is not clipped - a disabled icon takes the disabled color over iconColor Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2 parents 6e82a5c + 484a0c6 commit 5bcea1d

202 files changed

Lines changed: 18014 additions & 13258 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
lint:
1114
name: Lint
@@ -33,6 +36,10 @@ jobs:
3336
- name: Check types
3437
run: yarn typecheck
3538

39+
# React Native < 0.87 still uses its legacy types by default
40+
- name: Check types against legacy React Native types
41+
run: yarn tsc -p tsconfig.build.json --noEmit --customConditions react-native-paper-source,react-native-legacy-deep-imports
42+
3643
unit-tests:
3744
name: Unit tests
3845
strategy:

‎.github/workflows/contributor-label.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66

77
permissions:
88
issues: write
9+
pull-requests: write
910

1011
jobs:
1112
label:

‎.github/workflows/deploy-docs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
workflow_dispatch:
78

89
permissions:
910
contents: read

‎.github/workflows/semantic-pr.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Semantic Pull Request
22
on: [pull_request]
33

4+
permissions:
5+
pull-requests: read
6+
47
jobs:
58
main:
69
name: Validate PR title

‎.release-it.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
"tagName": "v${version}"
55
},
66
"npm": {
7-
"publish": true,
8-
"tag": "alpha"
7+
"publish": true
98
},
109
"github": {
1110
"release": true,
12-
"preRelease": true
11+
"draft": true
1312
},
1413
"plugins": {
1514
"@release-it/conventional-changelog": {

‎CONTRIBUTING.md‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,27 @@ To preview the documentation, run `yarn docs dev` in the project root.
101101

102102
### Publishing a release
103103

104-
We use [release-it](https://github.com/webpro/release-it) to automate our release. If you have publish access to the NPM package, run the following from the main branch to publish a new release:
104+
We use [release-it](https://github.com/webpro/release-it) to automate our release. If you have publish access to the NPM package, run the following from the main branch, always with the exact version you want to publish:
105105

106106
```sh
107-
yarn release
107+
yarn release 6.0.0-beta.0 --dry-run
108+
yarn release 6.0.0-beta.0
109+
```
110+
111+
- Always pass the version. A bare `yarn release` applies the bump the commit history recommends, which can be a stable or major version you did not intend. npm never accepts the same version twice, so a wrong version cannot be taken back.
112+
- Start with the dry run. Before running it for real, check the compare range in the changelog heading it prints (for example `v6.0.0-alpha.0...v6.0.0-alpha.1`) and the `--tag` on the `npm publish` line.
113+
- The npm tag and the GitHub prerelease flag follow the version: `6.0.0-beta.0` is published under the `beta` tag as a GitHub prerelease, `6.0.0` under `latest` as a regular release.
114+
- The GitHub release is created as a draft. Once `npm publish` has succeeded, add the release notes and publish the draft:
115+
116+
```sh
117+
gh release edit v6.0.0-beta.0 --notes-file notes.md --draft=false
108118
```
109119

110120
NOTE: You must have a `GITHUB_TOKEN` environment variable available. You can create a GitHub access token with the "repo" access [here](https://github.com/settings/tokens).
111121

112-
Releases from main also deploy the example app via EAS. If there were no native code changes, it'll ship an OTA update.
122+
You also need to be logged in to npm with an account that can publish the package: check with `npm whoami`, and run `npm login` if it fails.
123+
124+
Publishing the GitHub release also deploys the example app via EAS, so keep the release a draft until npm has the package. If there were no native code changes, it'll ship an OTA update.
113125

114126
Otherwise, for stable releases:
115127

‎SECURITY.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security policy
2+
3+
## Supported versions
4+
5+
| Version | Security fixes |
6+
| --------------------------------------------------------- | -------------- |
7+
| 6.x (`main`, published under the `alpha` tag until 6.0.0) | Yes |
8+
| The latest 5.x release | Yes |
9+
| Older 5.x releases and earlier majors | No |
10+
11+
## Reporting a vulnerability
12+
13+
Please don't report security problems in public issues, pull requests or discussions.
14+
15+
Report them privately through GitHub instead: on the repository's Security tab, click "Report a vulnerability", or go straight to https://github.com/callstack/react-native-paper/security/advisories/new. Include what is affected (the version and the component or API), how to reproduce it, and what an attacker could do with it.
16+
17+
The maintainers will reply in the advisory, work on a fix there with you, and credit you when it is published, unless you'd rather not be named.

‎docs/5.x/docs/guides/fonts.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ If you're using TypeScript use `as const` when defining `fontConfig`.
152152
In the latest version fonts in theme are structured based on the `variant` keys e.g. `displayLarge` or `bodyMedium` which are then used in `Text`'s component throughout the whole library.
153153
154154
:::info
155-
The default `fontFamily` is different per particular platfrom:
155+
The default `fontFamily` is different per particular platform:
156156
157157
```js
158158
Platform.select({
@@ -418,6 +418,7 @@ import {
418418
MD3LightTheme,
419419
PaperProvider,
420420
} from 'react-native-paper';
421+
import { Platform } from 'react-native';
421422
import App from './App';
422423
423424
const fontConfig = {

‎docs/5.x/docs/guides/getting-started.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install react-native-paper
1818
npm install react-native-safe-area-context
1919
```
2020

21-
Additionaly for `iOS` platform there is a requirement to link the native parts of the library:
21+
Additionally for `iOS` platform there is a requirement to link the native parts of the library:
2222

2323
```bash
2424
npx pod-install

‎docs/5.x/docs/guides/migration-guide-to-5.0.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Below you can find the most important information about the components whose API
1414

1515
### Installation
1616

17-
- The `v5` has been oficially released as a stable version, which means it will be installed by default from the `npm`. In order to do that, open a Terminal in your project's folder and run:
17+
- The `v5` has been officially released as a stable version, which means it will be installed by default from the `npm`. In order to do that, open a Terminal in your project's folder and run:
1818

1919
```bash npm2yarn
2020
npm install react-native-paper
@@ -26,7 +26,7 @@ npm install react-native-paper
2626
npm install react-native-safe-area-context
2727
```
2828

29-
Additionaly for `iOS` platform there is a requirement to link the native parts of the library:
29+
Additionally for `iOS` platform there is a requirement to link the native parts of the library:
3030

3131
```bash
3232
npx pod-install
@@ -165,7 +165,7 @@ Take a look at the suggested replacement diff:
165165

166166
### Configure fonts
167167

168-
The existing utility called `configureFonts` was adjusted to help users configure their theme fonts in both version, that's why that function, as of today, is going to accept the object with the follwing properties as an argument:
168+
The existing utility called `configureFonts` was adjusted to help users configure their theme fonts in both version, that's why that function, as of today, is going to accept the object with the following properties as an argument:
169169

170170
```ts
171171
configureFonts(params);
@@ -476,7 +476,7 @@ With the latest version, there is a possibility to specify whether `Drawer.Secti
476476

477477
#### FAB
478478

479-
Additionaly `FAB` may be applied in one of three available sizes, thanks to new prop `size`:
479+
Additionally `FAB` may be applied in one of three available sizes, thanks to new prop `size`:
480480

481481
- `small` - FAB with small height (40),
482482
- `medium` - Appbar with default medium height (56),

0 commit comments

Comments
 (0)