Skip to content

Commit 44201e7

Browse files
Merge pull request #85 from rebeccaalpert/react19
chore(React19): Allow support for React 19
2 parents bd32ade + 794acce commit 44201e7

File tree

39 files changed

+2174
-5675
lines changed

39 files changed

+2174
-5675
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
"react-hooks/exhaustive-deps": "warn",
9595
"react/no-unescaped-entities": ["error", { "forbid": [">", "}"] }],
9696
"spaced-comment": "error",
97-
"use-isnan": "error"
97+
"use-isnan": "error",
98+
"react/react-in-jsx-scope": "off"
9899
}
99100
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ coverage
1010
.tmp
1111
.eslintcache
1212
.cache_*
13+
generated
1314

1415
# package managers
1516
yarn-error.log

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
"@babel/preset-react": "^7.18.6",
4848
"@babel/preset-flow": "^7.18.6",
4949
"@babel/preset-typescript": "^7.18.6",
50-
"@testing-library/react": "^13.4.0",
51-
"@testing-library/user-event": "14.4.3",
52-
"@testing-library/jest-dom": "5.16.5",
53-
"@testing-library/dom": "9.0.0",
50+
"@testing-library/dom": "^10.4.0",
51+
"@testing-library/jest-dom": "^6.6.3",
52+
"@testing-library/react": "^16.3.0",
53+
"@testing-library/user-event": "14.6.1",
5454
"jest-environment-jsdom": "^29.2.2",
5555
"jest-transform-stub": "^2.0.0",
5656
"serve": "^14.1.2"

packages/module/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@
4444
"@patternfly/react-styles": "^6.1.0"
4545
},
4646
"peerDependencies": {
47-
"react": "^17 || ^18",
48-
"react-dom": "^17 || ^18"
47+
"react": "^17 || ^18 || ^19",
48+
"react-dom": "^17 || ^18 || ^19"
4949
},
5050
"devDependencies": {
5151
"@patternfly/patternfly": "^6.1.0",
52-
"@patternfly/documentation-framework": "6.5.14",
52+
"@patternfly/documentation-framework": "6.8.2",
5353
"@patternfly/react-table": "^6.1.0",
5454
"@patternfly/react-code-editor": "^6.1.0",
5555
"@octokit/rest": "^18.0.0",

packages/module/patternfly-docs/content/examples/CatalogTile.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ import './catalogTile.css';
1818
Note: Catalog tile lives in its own package at [`@patternfly/react-catalog-view-extension`](https://www.npmjs.com/package/@patternfly/react-catalog-view-extension)!
1919

2020
## Examples
21+
2122
### Basic featured tile
23+
2224
```js
23-
import React from 'react';
2425
import { CatalogTile, CatalogTileBadge } from '@patternfly/react-catalog-view-extension';
2526
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
2627
import pfLogo6 from './pfLogo6.svg';
@@ -43,12 +44,12 @@ import '../../../../dist/css/react-catalog-view-extension.css';
4344
'Three lines is the default for cards without a footer. Cards with a footer are truncated after one line. Truncation function use is deprecated; please pass in a maxDescriptionLength of -1 to override it. ' +
4445
'This has changed from PatternFly 3.'
4546
}
46-
/>
47+
/>;
4748
```
4849

4950
### Basic with footer
51+
5052
```js
51-
import React from 'react';
5253
import { CatalogTile, CatalogTileBadge } from '@patternfly/react-catalog-view-extension';
5354
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
5455
import OutlinedCheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-check-circle-icon';
@@ -72,15 +73,15 @@ import pfLogo6 from './pfLogo6.svg';
7273
}
7374
footer={
7475
<span>
75-
<OutlinedCheckCircleIcon style={{color: 'var(--pf-v6-global--success-color--100)'}} /> Enabled
76+
<OutlinedCheckCircleIcon style={{ color: 'var(--pf-v6-global--success-color--100)' }} /> Enabled
7677
</span>
7778
}
78-
/>
79+
/>;
7980
```
8081

8182
### Link variant
83+
8284
```js
83-
import React from 'react';
8485
import { CatalogTile, CatalogTileBadge } from '@patternfly/react-catalog-view-extension';
8586
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
8687
import pfLogo6 from './pfLogo6.svg';
@@ -102,12 +103,12 @@ import pfLogo6 from './pfLogo6.svg';
102103
'Three lines is the default for cards without a footer. Cards with a footer are truncated after one line. Truncation function use is deprecated; please pass in a maxDescriptionLength of -1 to override it. ' +
103104
'This has changed from PatternFly 3.'
104105
}
105-
/>
106+
/>;
106107
```
107108

108109
### With multiple icon badges
110+
109111
```js
110-
import React from 'react';
111112
import { CatalogTile, CatalogTileBadge } from '@patternfly/react-catalog-view-extension';
112113
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
113114
import OutlinedCheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-check-circle-icon';
@@ -122,7 +123,7 @@ import pfLogo6 from './pfLogo6.svg';
122123
<CogIcon />
123124
</CatalogTileBadge>,
124125
<CatalogTileBadge title="USDA Approved">
125-
<OutlinedCheckCircleIcon style={{color: 'var(--pf-v6-global--success-color--100)'}} />
126+
<OutlinedCheckCircleIcon style={{ color: 'var(--pf-v6-global--success-color--100)' }} />
126127
</CatalogTileBadge>
127128
]}
128129
title="Patternfly-React"
@@ -132,35 +133,33 @@ import pfLogo6 from './pfLogo6.svg';
132133
'Three lines is the default for cards without a footer. Cards with a footer are truncated after one line. Truncation function use is deprecated; please pass in a maxDescriptionLength of -1 to override it. ' +
133134
'This has changed from PatternFly 3.'
134135
}
135-
/>
136+
/>;
136137
```
137138

138139
### With text badge
140+
139141
```js
140-
import React from 'react';
141142
import { CatalogTile } from '@patternfly/react-catalog-view-extension';
142143
import pfLogo6 from './pfLogo6.svg';
143144

144145
<CatalogTile
145146
id="text-badge"
146147
iconImg={pfLogo6}
147148
iconAlt="PatternFly logo"
148-
badges={[
149-
'Community'
150-
]}
149+
badges={['Community']}
151150
title="Patternfly-React"
152151
vendor="provided by Red Hat"
153152
description={
154153
'This is a very, very long description that should be truncated after three lines. ' +
155154
'Three lines is the default for cards without a footer. Cards with a footer are truncated after one line. Truncation function use is deprecated; please pass in a maxDescriptionLength of -1 to override it. ' +
156155
'This has changed from PatternFly 3.'
157156
}
158-
/>
157+
/>;
159158
```
160159

161160
### With children instead of description
161+
162162
```js
163-
import React from 'react';
164163
import { CatalogTile, CatalogTileBadge } from '@patternfly/react-catalog-view-extension';
165164
import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
166165
import pfLogo6 from './pfLogo6.svg';
@@ -178,10 +177,9 @@ import pfLogo6 from './pfLogo6.svg';
178177
title="Patternfly-React"
179178
vendor="provided by Red Hat"
180179
>
181-
This is a very, very long stetch of child text that should be not be truncated
182-
and illustrates how Flyers can add longer content to PatternFly 4 catalog tiles
183-
using the children prop. Cards usually truncate descriptions at three lines.
184-
Cards with a footer are truncated after one line. This has changed from PatternFly 3.
185-
Children can be of any length.
186-
</CatalogTile>
180+
This is a very, very long stetch of child text that should be not be truncated and illustrates how Flyers can add
181+
longer content to PatternFly 4 catalog tiles using the children prop. Cards usually truncate descriptions at three
182+
lines. Cards with a footer are truncated after one line. This has changed from PatternFly 3. Children can be of any
183+
length.
184+
</CatalogTile>;
187185
```

0 commit comments

Comments
 (0)