Skip to content

Commit b58518f

Browse files
authored
chore(deps): Bump v6 alphas (#9881)
* chore(deps): Updated chore alphas * fix todos * add back isCompact prop to pagination * bump to latest versions * update snapshots * update pagination
1 parent a566e68 commit b58518f

File tree

13 files changed

+198
-133
lines changed

13 files changed

+198
-133
lines changed

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.5.0"
5555
},
5656
"devDependencies": {
57-
"@patternfly/patternfly": "6.0.0-alpha.28",
57+
"@patternfly/patternfly": "6.0.0-alpha.38",
5858
"@rollup/plugin-commonjs": "^25.0.0",
5959
"@rollup/plugin-node-resolve": "^15.0.2",
6060
"@rollup/plugin-replace": "^5.0.2",

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

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ export interface AvatarProps
1010
src?: string;
1111
/** Attribute that specifies the alternate text of the image for the Avatar. */
1212
alt: string;
13-
/** Border to add */
14-
border?: 'light' | 'dark';
1513
/** Size variant of avatar. */
1614
size?: 'sm' | 'md' | 'lg' | 'xl';
1715
}
@@ -20,21 +18,9 @@ export const Avatar: React.FunctionComponent<AvatarProps> = ({
2018
className = '',
2119
src = '',
2220
alt,
23-
border,
2421
size,
2522
...props
2623
}: AvatarProps) => (
27-
<img
28-
src={src}
29-
alt={alt}
30-
className={css(
31-
styles.avatar,
32-
styles.modifiers[size],
33-
border === 'light' && styles.modifiers.light,
34-
border === 'dark' && styles.modifiers.dark,
35-
className
36-
)}
37-
{...props}
38-
/>
24+
<img src={src} alt={alt} className={css(styles.avatar, styles.modifiers[size], className)} {...props} />
3925
);
4026
Avatar.displayName = 'Avatar';

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,21 @@ test('Renders simple avatar', () => {
1212
expect(screen.getByTestId('avatar').firstChild).toBeVisible();
1313
});
1414

15+
// TODO: Need to be updated as part of issue #9880
1516
test('Renders without any modifier class when border and size props are not passed', () => {
1617
render(<Avatar alt="avatar" />);
1718
expect(screen.getByRole('img')).toHaveClass(styles.avatar, { exact: true });
1819
});
1920

20-
test('Renders with class name pf-m-light when "light" is passed as border prop', () => {
21-
render(<Avatar alt="avatar" border="light" />);
21+
// TODO: Need to be updated/removed as part of issue #9880
22+
xtest('Renders with class name pf-m-light when "light" is passed as border prop', () => {
23+
render(<Avatar alt="avatar" />);
2224
expect(screen.getByRole('img')).toHaveClass('pf-m-light');
2325
});
2426

25-
test('Renders with class name pf-m-dark when "dark" is passed as border prop', () => {
26-
render(<Avatar alt="avatar" border="dark" />);
27+
// TODO: Need to be updated/removed as part of issue #9880
28+
xtest('Renders with class name pf-m-dark when "dark" is passed as border prop', () => {
29+
render(<Avatar alt="avatar" />);
2730
expect(screen.getByRole('img')).toHaveClass('pf-m-dark');
2831
});
2932

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ import React from 'react';
5454
import { Avatar } from '@patternfly/react-core';
5555
import avatarImg from '../../assets/avatarImg.svg';
5656

57-
<Avatar src={avatarImg} alt="avatar" border="light" />;
57+
// TODO: Need to be updated/removed as part of issue #9880
58+
<Avatar src={avatarImg} alt="avatar" />;
5859
```
5960

6061
### Bordered - dark
@@ -64,5 +65,6 @@ import React from 'react';
6465
import { Avatar } from '@patternfly/react-core';
6566
import avatarImgDark from '../../assets/avatarImgDark.svg';
6667

67-
<Avatar src={avatarImgDark} alt="avatar" border="dark" />;
68+
// TODO: Need to be updated/removed as part of issue #9880
69+
<Avatar src={avatarImgDark} alt="avatar" />;
6870
```

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ export interface ExpandableSectionProps extends React.HTMLProps<HTMLDivElement>
3131
toggleId?: string;
3232
/** Display size variant. Set to "lg" for disclosure styling. */
3333
displaySize?: 'default' | 'lg';
34-
/** Forces active state. */
35-
isActive?: boolean;
3634
/** Indicates the expandable section has a detached toggle. */
3735
isDetached?: boolean;
3836
/** Flag to indicate if the content is expanded. */
@@ -103,7 +101,6 @@ class ExpandableSection extends React.Component<ExpandableSectionProps, Expandab
103101
toggleTextCollapsed: '',
104102
// eslint-disable-next-line @typescript-eslint/no-unused-vars
105103
onToggle: (event, isExpanded): void => undefined,
106-
isActive: false,
107104
isDetached: false,
108105
displaySize: 'default',
109106
isWidthLimited: false,
@@ -182,8 +179,6 @@ class ExpandableSection extends React.Component<ExpandableSectionProps, Expandab
182179
render() {
183180
const {
184181
onToggle: onToggleProp,
185-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
186-
isActive,
187182
className,
188183
toggleText,
189184
toggleTextExpanded,
@@ -253,7 +248,6 @@ class ExpandableSection extends React.Component<ExpandableSectionProps, Expandab
253248
className={css(
254249
styles.expandableSection,
255250
propOrStateIsExpanded && styles.modifiers.expanded,
256-
isActive && styles.modifiers.active,
257251
displaySize === 'lg' && styles.modifiers.displayLg,
258252
isWidthLimited && styles.modifiers.limitWidth,
259253
isIndented && styles.modifiers.indented,

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@ export interface PaginationProps extends React.HTMLProps<HTMLDivElement>, OUIAPr
119119
xl?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
120120
'2xl'?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
121121
};
122-
/** Flag indicating if pagination is compact. */
123-
isCompact?: boolean;
124122
/** Flag indicating if pagination is disabled. */
125123
isDisabled?: boolean;
124+
/** Flag indicating if pagination is compact. */
125+
isCompact?: boolean;
126126
/** Flag indicating if pagination should not be sticky on mobile. */
127127
isStatic?: boolean;
128128
/** Flag indicating if pagination should stick to its position (based on variant). */
@@ -285,7 +285,6 @@ export const Pagination: React.FunctionComponent<PaginationProps> = ({
285285
variant === PaginationVariant.bottom && styles.modifiers.bottom,
286286
usePageInsets && styles.modifiers.pageInsets,
287287
formatBreakpointMods(inset, styles),
288-
isCompact && styles.modifiers.compact,
289288
isStatic && styles.modifiers.static,
290289
isSticky && styles.modifiers.sticky,
291290
className

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe('Pagination', () => {
1919
});
2020

2121
test('should render correctly compact', () => {
22-
const { asFragment } = render(<Pagination itemCount={20} isCompact />);
22+
const { asFragment } = render(<Pagination itemCount={20} />);
2323
expect(asFragment()).toMatchSnapshot();
2424
});
2525

0 commit comments

Comments
 (0)