Skip to content

Commit d1f8e92

Browse files
committed
Bump versions and sew up gaps
1 parent 338978c commit d1f8e92

10 files changed

Lines changed: 81 additions & 18 deletions

File tree

packages/react-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"tslib": "^2.8.1"
5555
},
5656
"devDependencies": {
57-
"@patternfly/patternfly": "6.3.0-prerelease.55",
57+
"@patternfly/patternfly": "6.5.0-prerelease.12",
5858
"case-anything": "^3.1.2",
5959
"css": "^3.0.0",
6060
"fs-extra": "^11.3.0"

packages/react-core/src/components/Drawer/Drawer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ export const Drawer: React.FunctionComponent<DrawerProps> = ({
6868
styles.drawer,
6969
isExpanded && styles.modifiers.expanded,
7070
isInline && styles.modifiers.inline,
71-
// @ts-expect-error: Pill modifier does not yet exist
7271
isPill && styles.modifiers.pill,
7372
isStatic && styles.modifiers.static,
7473
(position === 'left' || position === 'start') && styles.modifiers.panelLeft,

packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
import { screen, render } from '@testing-library/react';
1414
import userEvent from '@testing-library/user-event';
1515
import { KeyTypes } from '../../../helpers';
16+
import styles from '@patternfly/react-styles/css/components/Drawer/drawer';
1617

1718
jest.mock('../../../helpers/GenerateId/GenerateId');
1819

@@ -163,7 +164,7 @@ test('Resizeable DrawerPanelContent can be wrapped in a context without causing
163164
expect(consoleError).not.toHaveBeenCalled();
164165
});
165166

166-
test(`Renders with pill class when specified`, () => {
167+
test(`Renders with ${styles.modifiers.pill} class when specified`, () => {
167168
const panelContent = (
168169
<DrawerPanelContent>
169170
<DrawerHead>
@@ -184,5 +185,5 @@ test(`Renders with pill class when specified`, () => {
184185
</Drawer>
185186
);
186187

187-
expect(screen.getByTestId('drawer')).toHaveClass('pf-m-pill');
188+
expect(screen.getByTestId('drawer')).toHaveClass(styles.modifiers.pill);
188189
});

packages/react-core/src/components/Drawer/examples/Drawer.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,14 @@ To customize which element receives focus when the drawer panel expands, use the
145145

146146
```
147147

148-
### Pill-shaped
148+
### Pill
149149

150150
```ts file="./DrawerBasicPill.tsx"
151151

152152
```
153+
154+
### Pill inline
155+
156+
```ts file="./DrawerPillInline.tsx"
157+
158+
```
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import { Fragment, useRef, useState } from 'react';
2+
import {
3+
Drawer,
4+
DrawerPanelContent,
5+
DrawerContent,
6+
DrawerContentBody,
7+
DrawerHead,
8+
DrawerActions,
9+
DrawerCloseButton,
10+
Button
11+
} from '@patternfly/react-core';
12+
13+
export const DrawerBasicPill: React.FunctionComponent = () => {
14+
const [isExpanded, setIsExpanded] = useState(false);
15+
const drawerRef = useRef<HTMLDivElement>(undefined);
16+
17+
const onExpand = () => {
18+
drawerRef.current && drawerRef.current.focus();
19+
};
20+
21+
const onClick = () => {
22+
setIsExpanded(!isExpanded);
23+
};
24+
25+
const onCloseClick = () => {
26+
setIsExpanded(false);
27+
};
28+
29+
const panelContent = (
30+
<DrawerPanelContent>
31+
<DrawerHead>
32+
<span tabIndex={isExpanded ? 0 : -1} ref={drawerRef}>
33+
Drawer panel header
34+
</span>
35+
<DrawerActions>
36+
<DrawerCloseButton onClick={onCloseClick} />
37+
</DrawerActions>
38+
</DrawerHead>
39+
</DrawerPanelContent>
40+
);
41+
42+
const drawerContent =
43+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.';
44+
45+
return (
46+
<Fragment>
47+
<Button aria-expanded={isExpanded} onClick={onClick}>
48+
Toggle drawer
49+
</Button>
50+
<Drawer isExpanded={isExpanded} isPill isInline onExpand={onExpand}>
51+
<DrawerContent panelContent={panelContent}>
52+
<DrawerContentBody>{drawerContent}</DrawerContentBody>
53+
</DrawerContent>
54+
</Drawer>
55+
</Fragment>
56+
);
57+
};

packages/react-docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"test:a11y": "patternfly-a11y --config patternfly-a11y.config"
2424
},
2525
"dependencies": {
26-
"@patternfly/patternfly": "6.3.0-prerelease.55",
26+
"@patternfly/patternfly": "6.5.0-prerelease.12",
2727
"@patternfly/react-charts": "workspace:^",
2828
"@patternfly/react-code-editor": "workspace:^",
2929
"@patternfly/react-core": "workspace:^",

packages/react-icons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@fortawesome/free-brands-svg-icons": "^5.15.4",
3434
"@fortawesome/free-regular-svg-icons": "^5.15.4",
3535
"@fortawesome/free-solid-svg-icons": "^5.15.4",
36-
"@patternfly/patternfly": "6.3.0-prerelease.55",
36+
"@patternfly/patternfly": "6.5.0-prerelease.12",
3737
"fs-extra": "^11.3.0",
3838
"tslib": "^2.8.1"
3939
},

packages/react-styles/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf dist css"
2020
},
2121
"devDependencies": {
22-
"@patternfly/patternfly": "6.3.0-prerelease.55",
22+
"@patternfly/patternfly": "6.5.0-prerelease.12",
2323
"change-case": "^5.4.4",
2424
"fs-extra": "^11.3.0"
2525
},

packages/react-tokens/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@adobe/css-tools": "^4.4.2",
33-
"@patternfly/patternfly": "6.3.0-prerelease.55",
33+
"@patternfly/patternfly": "6.5.0-prerelease.12",
3434
"fs-extra": "^11.3.0"
3535
}
3636
}

yarn.lock

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4089,10 +4089,10 @@ __metadata:
40894089
languageName: node
40904090
linkType: hard
40914091

4092-
"@patternfly/patternfly@npm:6.3.0-prerelease.55":
4093-
version: 6.3.0-prerelease.55
4094-
resolution: "@patternfly/patternfly@npm:6.3.0-prerelease.55"
4095-
checksum: 10c0/5581e13a41001951da4e27b1774b97939f1f24b6107f32fa847724cfa101a8762d63d35a1e7602faea914cb12264526adaa6d423ac56b0931bf6f96854dacd63
4092+
"@patternfly/patternfly@npm:6.5.0-prerelease.12":
4093+
version: 6.5.0-prerelease.12
4094+
resolution: "@patternfly/patternfly@npm:6.5.0-prerelease.12"
4095+
checksum: 10c0/a07d7ccbde0bdcdfa03877678ee73c741f1dc6774c0fe96db24e308f637e68035684bf3758e6acf3e2c51c46f27d320eff2189e85bfdeb0c9104dd18d33ae771
40964096
languageName: node
40974097
linkType: hard
40984098

@@ -4190,7 +4190,7 @@ __metadata:
41904190
version: 0.0.0-use.local
41914191
resolution: "@patternfly/react-core@workspace:packages/react-core"
41924192
dependencies:
4193-
"@patternfly/patternfly": "npm:6.3.0-prerelease.55"
4193+
"@patternfly/patternfly": "npm:6.5.0-prerelease.12"
41944194
"@patternfly/react-icons": "workspace:^"
41954195
"@patternfly/react-styles": "workspace:^"
41964196
"@patternfly/react-tokens": "workspace:^"
@@ -4211,7 +4211,7 @@ __metadata:
42114211
resolution: "@patternfly/react-docs@workspace:packages/react-docs"
42124212
dependencies:
42134213
"@patternfly/documentation-framework": "npm:^6.19.0"
4214-
"@patternfly/patternfly": "npm:6.3.0-prerelease.55"
4214+
"@patternfly/patternfly": "npm:6.5.0-prerelease.12"
42154215
"@patternfly/patternfly-a11y": "npm:5.1.0"
42164216
"@patternfly/react-charts": "workspace:^"
42174217
"@patternfly/react-code-editor": "workspace:^"
@@ -4251,7 +4251,7 @@ __metadata:
42514251
"@fortawesome/free-brands-svg-icons": "npm:^5.15.4"
42524252
"@fortawesome/free-regular-svg-icons": "npm:^5.15.4"
42534253
"@fortawesome/free-solid-svg-icons": "npm:^5.15.4"
4254-
"@patternfly/patternfly": "npm:6.3.0-prerelease.55"
4254+
"@patternfly/patternfly": "npm:6.5.0-prerelease.12"
42554255
fs-extra: "npm:^11.3.0"
42564256
tslib: "npm:^2.8.1"
42574257
peerDependencies:
@@ -4335,7 +4335,7 @@ __metadata:
43354335
version: 0.0.0-use.local
43364336
resolution: "@patternfly/react-styles@workspace:packages/react-styles"
43374337
dependencies:
4338-
"@patternfly/patternfly": "npm:6.3.0-prerelease.55"
4338+
"@patternfly/patternfly": "npm:6.5.0-prerelease.12"
43394339
change-case: "npm:^5.4.4"
43404340
fs-extra: "npm:^11.3.0"
43414341
languageName: unknown
@@ -4377,7 +4377,7 @@ __metadata:
43774377
resolution: "@patternfly/react-tokens@workspace:packages/react-tokens"
43784378
dependencies:
43794379
"@adobe/css-tools": "npm:^4.4.2"
4380-
"@patternfly/patternfly": "npm:6.3.0-prerelease.55"
4380+
"@patternfly/patternfly": "npm:6.5.0-prerelease.12"
43814381
fs-extra: "npm:^11.3.0"
43824382
languageName: unknown
43834383
linkType: soft

0 commit comments

Comments
 (0)