diff --git a/package.json b/package.json
index 570a93c70c8..1ddbb6d63ae 100644
--- a/package.json
+++ b/package.json
@@ -88,7 +88,7 @@
"start": "yarn build && concurrently --kill-others \"yarn watch\" \"yarn workspace @patternfly/react-docs develop\"",
"start:cypress": "lerna run cypress:open",
"start:demo-app": "lerna run start:demo-app --stream",
- "test": "jest packages",
+ "test": "TZ=EST jest packages",
"test:a11y": "lerna run test:a11y --stream",
"test:integration": "yarn workspace @patternfly/react-integration test:integration",
"uninstall": "find . -name node_modules -type d | xargs rm -rf",
diff --git a/packages/react-catalog-view-extension/CHANGELOG.md b/packages/react-catalog-view-extension/CHANGELOG.md
index 5f8f0c02d24..659370e5cc1 100644
--- a/packages/react-catalog-view-extension/CHANGELOG.md
+++ b/packages/react-catalog-view-extension/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.92.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.34...@patternfly/react-catalog-view-extension@4.92.35) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.33...@patternfly/react-catalog-view-extension@4.92.34) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.32...@patternfly/react-catalog-view-extension@4.92.33) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.31...@patternfly/react-catalog-view-extension@4.92.32) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.30...@patternfly/react-catalog-view-extension@4.92.31) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.29...@patternfly/react-catalog-view-extension@4.92.30) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.28...@patternfly/react-catalog-view-extension@4.92.29) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## 4.92.28 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
+## [4.92.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.26...@patternfly/react-catalog-view-extension@4.92.27) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-catalog-view-extension
+
+
+
+
+
## [4.92.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-catalog-view-extension@4.92.25...@patternfly/react-catalog-view-extension@4.92.26) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-catalog-view-extension
diff --git a/packages/react-catalog-view-extension/package.json b/packages/react-catalog-view-extension/package.json
index 4b5f1809a8f..7a38d791014 100644
--- a/packages/react-catalog-view-extension/package.json
+++ b/packages/react-catalog-view-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-catalog-view-extension",
- "version": "4.92.26",
+ "version": "4.92.35",
"description": "This library provides catalog view extensions for PatternFly 4 React.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -36,7 +36,7 @@
},
"dependencies": {
"@patternfly/patternfly": "4.217.1",
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-styles": "^4.91.6"
},
"devDependencies": {
diff --git a/packages/react-code-editor/CHANGELOG.md b/packages/react-code-editor/CHANGELOG.md
index b1d7c42277a..cdc28b695e2 100644
--- a/packages/react-code-editor/CHANGELOG.md
+++ b/packages/react-code-editor/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.82.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.34...@patternfly/react-code-editor@4.82.35) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.33...@patternfly/react-code-editor@4.82.34) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.32...@patternfly/react-code-editor@4.82.33) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.31...@patternfly/react-code-editor@4.82.32) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.30...@patternfly/react-code-editor@4.82.31) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.29...@patternfly/react-code-editor@4.82.30) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.28...@patternfly/react-code-editor@4.82.29) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## 4.82.28 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
+## [4.82.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.26...@patternfly/react-code-editor@4.82.27) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-code-editor
+
+
+
+
+
## [4.82.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@4.82.25...@patternfly/react-code-editor@4.82.26) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-code-editor
diff --git a/packages/react-code-editor/package.json b/packages/react-code-editor/package.json
index 2f3bc4b925c..c6ee3639eff 100644
--- a/packages/react-code-editor/package.json
+++ b/packages/react-code-editor/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-code-editor",
- "version": "4.82.26",
+ "version": "4.82.35",
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -30,7 +30,7 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-icons": "^4.92.6",
"@patternfly/react-styles": "^4.91.6",
"react-dropzone": "9.0.0",
diff --git a/packages/react-console/CHANGELOG.md b/packages/react-console/CHANGELOG.md
index 16577d1fa81..10dc2714f0b 100644
--- a/packages/react-console/CHANGELOG.md
+++ b/packages/react-console/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.92.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.34...@patternfly/react-console@4.92.35) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.33...@patternfly/react-console@4.92.34) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.32...@patternfly/react-console@4.92.33) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.31...@patternfly/react-console@4.92.32) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.30...@patternfly/react-console@4.92.31) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.29...@patternfly/react-console@4.92.30) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.28...@patternfly/react-console@4.92.29) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## 4.92.28 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
+## [4.92.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.26...@patternfly/react-console@4.92.27) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-console
+
+
+
+
+
## [4.92.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-console@4.92.25...@patternfly/react-console@4.92.26) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-console
diff --git a/packages/react-console/package.json b/packages/react-console/package.json
index cd2fad89b54..3e08c0f9045 100644
--- a/packages/react-console/package.json
+++ b/packages/react-console/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-console",
- "version": "4.92.26",
+ "version": "4.92.35",
"description": "This package provides VncConsole, SerialConsole and DesktopViewer React components to be used alongside patternfly-react to access virtual machine or server consoles.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -34,7 +34,7 @@
"dependencies": {
"@novnc/novnc": "^1.2.0",
"@patternfly/patternfly": "4.217.1",
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@spice-project/spice-html5": "^0.2.1",
"@types/file-saver": "^2.0.1",
"file-saver": "^1.3.8",
diff --git a/packages/react-console/src/components/AccessConsoles/__tests__/__snapshots__/AccessConsoles.test.tsx.snap b/packages/react-console/src/components/AccessConsoles/__tests__/__snapshots__/AccessConsoles.test.tsx.snap
index 15c7a43efe1..e02c3e99649 100644
--- a/packages/react-console/src/components/AccessConsoles/__tests__/__snapshots__/AccessConsoles.test.tsx.snap
+++ b/packages/react-console/src/components/AccessConsoles/__tests__/__snapshots__/AccessConsoles.test.tsx.snap
@@ -129,22 +129,21 @@ exports[`AccessConsoles with preselected SerialConsole 1`] = `
{
Proin dictum imperdiet nibh, quis dapibus nulla. Integer sed tincidunt lectus, sit amet auctor eros.
-
+
Call to action
diff --git a/packages/react-core/src/components/Backdrop/examples/BackdropSpinner.tsx b/packages/react-core/src/components/Backdrop/examples/BackdropSpinner.tsx
index 9c395c1fe6e..65a0e67a584 100644
--- a/packages/react-core/src/components/Backdrop/examples/BackdropSpinner.tsx
+++ b/packages/react-core/src/components/Backdrop/examples/BackdropSpinner.tsx
@@ -4,7 +4,7 @@ import { Backdrop, Spinner, Bullseye } from '@patternfly/react-core';
export const BackdropSpinner: React.FunctionComponent = () => (
-
+
);
diff --git a/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx b/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
index 1a7f8c64a7d..1dc8d86b33e 100644
--- a/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
+++ b/packages/react-core/src/components/Banner/__tests__/Banner.test.tsx
@@ -1,27 +1,92 @@
+import * as React from 'react';
+import { render, screen } from '@testing-library/react';
import { Banner } from '../Banner';
-import React from 'react';
-import { render } from '@testing-library/react';
-
-['default', 'info', 'success', 'warning', 'danger'].forEach((variant: string) => {
- test(`${variant} banner`, () => {
- const { asFragment } = render(
-
- {variant} Banner
-
- );
- expect(asFragment()).toMatchSnapshot();
- });
-});
-
-test(`sticky banner`, () => {
- const { asFragment } = render(
-
- Sticky Banner
-
+
+test('Renders without children', () => {
+ render(
+
+
+
);
+ expect(screen.getByTestId('banner').firstChild).toBeVisible();
+});
+
+test('Renders children', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toBeVisible();
+});
+
+test('Renders with class name pf-c-banner', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-c-banner');
+});
+
+test('Renders with custom class name when className prop is provided', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('custom-class');
+});
+
+test('Renders without any modifier class when variant prop is not passed', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-c-banner', { exact: true });
+});
+
+test('Renders with class name pf-m-success when "success" is passed to variant prop', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-m-success');
+});
+
+test('Renders with class name pf-m-danger when "danger" is passed to variant prop', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-m-danger');
+});
+
+test('Renders with class name pf-m-warning when "warning" is passed to variant prop', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-m-warning');
+});
+
+test('Renders with class name pf-m-info when "info" is passed to variant prop', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-m-info');
+});
+
+test('Renders pf-u-screen-reader class by default for screenReaderText', () => {
+ render(
Test );
+ expect(screen.getByText('default banner')).toHaveClass('pf-u-screen-reader', { exact: true });
+});
+
+test('Renders screenReaderText as "default banner" by default', () => {
+ render(
Test );
+ expect(screen.getByText('default banner')).toBeInTheDocument();
+});
+
+test('Renders screenReaderText as "success banner" when variant="success"', () => {
+ render(
Test );
+ expect(screen.getByText('success banner')).toBeInTheDocument();
+});
+
+test('Renders custom screenReaderText passed via prop', () => {
+ render(
Test );
+ expect(screen.getByText('Custom screen reader text')).toBeInTheDocument();
+});
+
+test('Renders without pf-m-sticky by default', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).not.toHaveClass('pf-m-sticky');
+});
+
+test('Renders with class name pf-m-sticky when isSticky prop is passed', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveClass('pf-m-sticky');
+});
+
+test('Renders with inherited element props spread to the component', () => {
+ render(
Test );
+ expect(screen.getByText('Test')).toHaveAccessibleName('Test label');
+});
+
+test('Matches the snapshot', () => {
+ const { asFragment } = render(
Test );
expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap b/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
index b55f80bace6..1d6551bd157 100644
--- a/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
+++ b/packages/react-core/src/components/Banner/__tests__/__snapshots__/Banner.test.tsx.snap
@@ -1,60 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`danger banner 1`] = `
+exports[`Matches the snapshot 1`] = `
- danger Banner
-
- danger banner
-
-
-
-`;
-
-exports[`default banner 1`] = `
-
-
- default Banner
-
- default banner
-
-
-
-`;
-
-exports[`info banner 1`] = `
-
-
- info Banner
-
- info banner
-
-
-
-`;
-
-exports[`sticky banner 1`] = `
-
-
- Sticky Banner
+ Test
@@ -63,35 +14,3 @@ exports[`sticky banner 1`] = `
`;
-
-exports[`success banner 1`] = `
-
-
- success Banner
-
- success banner
-
-
-
-`;
-
-exports[`warning banner 1`] = `
-
-
- warning Banner
-
- warning banner
-
-
-
-`;
diff --git a/packages/react-core/src/components/Button/Button.tsx b/packages/react-core/src/components/Button/Button.tsx
index e3013421b37..7cfdb8fe470 100644
--- a/packages/react-core/src/components/Button/Button.tsx
+++ b/packages/react-core/src/components/Button/Button.tsx
@@ -22,6 +22,12 @@ export enum ButtonType {
reset = 'reset'
}
+export enum ButtonSize {
+ default = 'default',
+ sm = 'sm',
+ lg = 'lg'
+}
+
export interface BadgeCountObject {
/** Adds styling to the badge to indicate it has been read */
isRead?: boolean;
@@ -31,7 +37,7 @@ export interface BadgeCountObject {
className?: string;
}
-export interface ButtonProps extends Omit
, 'ref'>, OUIAProps {
+export interface ButtonProps extends Omit, 'ref' | 'size'>, OUIAProps {
/** Content rendered inside the button */
children?: React.ReactNode;
/** Additional classes added to the button */
@@ -58,6 +64,8 @@ export interface ButtonProps extends Omit, 'r
inoperableEvents?: string[];
/** Adds inline styling to a link button */
isInline?: boolean;
+ /** Adds styling which affects the size of the button */
+ size?: 'default' | 'sm' | 'lg';
/** Sets button type */
type?: 'button' | 'submit' | 'reset';
/** Adds button variant styles */
@@ -70,10 +78,6 @@ export interface ButtonProps extends Omit, 'r
icon?: React.ReactNode | null;
/** Sets the button tabindex. */
tabIndex?: number;
- /** Adds small styling to the button */
- isSmall?: boolean;
- /** Adds large styling to the button */
- isLarge?: boolean;
/** Adds danger styling to secondary or link button variants */
isDanger?: boolean;
/** Forwarded ref */
@@ -99,8 +103,7 @@ const ButtonBase: React.FunctionComponent = ({
spinnerAriaValueText,
spinnerAriaLabelledBy,
spinnerAriaLabel,
- isSmall = false,
- isLarge = false,
+ size = ButtonSize.default,
inoperableEvents = ['onClick', 'onKeyPress'],
isInline = false,
type = ButtonType.button,
@@ -157,8 +160,8 @@ const ButtonBase: React.FunctionComponent = ({
isDanger && (variant === ButtonVariant.secondary || variant === ButtonVariant.link) && styles.modifiers.danger,
isLoading !== null && children !== null && styles.modifiers.progress,
isLoading && styles.modifiers.inProgress,
- isSmall && styles.modifiers.small,
- isLarge && styles.modifiers.displayLg,
+ size === ButtonSize.sm && styles.modifiers.small,
+ size === ButtonSize.lg && styles.modifiers.displayLg,
className
)}
disabled={isButtonElement ? isDisabled : null}
diff --git a/packages/react-core/src/components/Button/__tests__/Button.test.tsx b/packages/react-core/src/components/Button/__tests__/Button.test.tsx
index b8d19a3472e..7625dd1890c 100644
--- a/packages/react-core/src/components/Button/__tests__/Button.test.tsx
+++ b/packages/react-core/src/components/Button/__tests__/Button.test.tsx
@@ -84,13 +84,13 @@ describe('Button', () => {
expect(asFragment()).toMatchSnapshot();
});
- test('isSmall', () => {
- const { asFragment } = render(Small Button );
+ test('size small', () => {
+ const { asFragment } = render(Small Button );
expect(asFragment()).toMatchSnapshot();
});
- test('isLarge', () => {
- const { asFragment } = render(Large Button );
+ test('size large', () => {
+ const { asFragment } = render(Large Button );
expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap b/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
index 29332d1d569..38e9363506c 100644
--- a/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
+++ b/packages/react-core/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap
@@ -152,21 +152,6 @@ exports[`Button isInline 1`] = `
`;
-exports[`Button isLarge 1`] = `
-
-
- Large Button
-
-
-`;
-
exports[`Button isLoading 1`] = `
-
-
-
-
-
+
Loading Button
@@ -216,22 +200,21 @@ exports[`Button isLoading icon only 1`] = `
-
-
-
-
-
+
ICON
@@ -240,21 +223,6 @@ exports[`Button isLoading icon only 1`] = `
`;
-exports[`Button isSmall 1`] = `
-
-
- Small Button
-
-
-`;
-
exports[`Button link button 1`] = `
`;
+exports[`Button size large 1`] = `
+
+
+ Large Button
+
+
+`;
+
+exports[`Button size small 1`] = `
+
+
+ Small Button
+
+
+`;
+
exports[`Button tertiary button 1`] = `
(
-
+
Call to action
{' '}
-
+
Call to action
{' '}
-
+
Call to action
{' '}
-
+
Call to action
diff --git a/packages/react-core/src/components/Button/examples/ButtonSmall.tsx b/packages/react-core/src/components/Button/examples/ButtonSmall.tsx
index 9e32fe99e65..b4a1d30c048 100644
--- a/packages/react-core/src/components/Button/examples/ButtonSmall.tsx
+++ b/packages/react-core/src/components/Button/examples/ButtonSmall.tsx
@@ -3,19 +3,19 @@ import { Button } from '@patternfly/react-core';
export const ButtonSmall: React.FunctionComponent = () => (
-
+
Primary
{' '}
-
+
Secondary
{' '}
-
+
Tertiary
{' '}
-
+
Danger
{' '}
-
+
Warning
diff --git a/packages/react-core/src/components/Card/Card.tsx b/packages/react-core/src/components/Card/Card.tsx
index 129cf1aee32..36746cb75ce 100644
--- a/packages/react-core/src/components/Card/Card.tsx
+++ b/packages/react-core/src/components/Card/Card.tsx
@@ -12,8 +12,6 @@ export interface CardProps extends React.HTMLProps, OUIAProps {
className?: string;
/** Sets the base component to render. defaults to article */
component?: keyof JSX.IntrinsicElements;
- /** @deprecated to make a card hoverable, use isSelectable or isSelectableRaised. */
- isHoverable?: boolean;
/** Modifies the card to include compact styling. Should not be used with isLarge. */
isCompact?: boolean;
/** Modifies the card to include selectable styling */
@@ -70,7 +68,6 @@ export const Card: React.FunctionComponent = ({
id = '',
className = '',
component = 'article',
- isHoverable = false,
isCompact = false,
isSelectable = false,
isSelectableRaised = false,
@@ -107,7 +104,7 @@ export const Card: React.FunctionComponent = ({
if (isSelectableRaised) {
return css(styles.modifiers.selectableRaised, isSelected && styles.modifiers.selectedRaised);
}
- if (isSelectable || isHoverable) {
+ if (isSelectable) {
return css(styles.modifiers.selectable, isSelected && styles.modifiers.selected);
}
return '';
diff --git a/packages/react-core/src/components/Card/__tests__/Card.test.tsx b/packages/react-core/src/components/Card/__tests__/Card.test.tsx
index a3abc450479..70f47666b5e 100644
--- a/packages/react-core/src/components/Card/__tests__/Card.test.tsx
+++ b/packages/react-core/src/components/Card/__tests__/Card.test.tsx
@@ -37,11 +37,6 @@ describe('Card', () => {
expect(screen.getByText('im a div')).toBeInTheDocument();
});
- test('card with isHoverable applied ', () => {
- const { asFragment } = render( );
- expect(asFragment()).toMatchSnapshot();
- });
-
test('card with isCompact applied ', () => {
const { asFragment } = render( );
expect(asFragment()).toMatchSnapshot();
diff --git a/packages/react-core/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap b/packages/react-core/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap
index d59d89794ef..6a3fadbff96 100644
--- a/packages/react-core/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap
+++ b/packages/react-core/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap
@@ -4,18 +4,6 @@ exports[`Card card with isCompact applied 1`] = `
-
-`;
-
-exports[`Card card with isHoverable applied 1`] = `
-
-
isBlock?: boolean;
/** Adds Clipboard Copy variant styles. */
variant?: typeof ClipboardCopyVariant | 'inline' | 'expansion' | 'inline-compact';
- /** Copy button popover position. */
+ /** Copy button tooltip position. */
position?:
- | PopoverPosition
| TooltipPosition
| 'auto'
| 'top'
@@ -109,7 +107,7 @@ export class ClipboardCopy extends React.Component, HTMLButtonElement>, 'ref'> {
@@ -25,7 +24,6 @@ export interface ClipboardCopyButtonProps
/** Position of the copy button tooltip */
position?:
| TooltipPosition
- | PopoverPosition
| 'auto'
| 'top'
| 'bottom'
diff --git a/packages/react-core/src/components/Divider/Divider.tsx b/packages/react-core/src/components/Divider/Divider.tsx
index e71bd83edd3..35ccaba4555 100644
--- a/packages/react-core/src/components/Divider/Divider.tsx
+++ b/packages/react-core/src/components/Divider/Divider.tsx
@@ -14,8 +14,6 @@ export interface DividerProps extends React.HTMLProps {
className?: string;
/** The component type to use */
component?: 'hr' | 'li' | 'div';
- /** @deprecated Use `orientation` instead. Flag to indicate the divider is vertical (must be in a flex layout) */
- isVertical?: boolean;
/** Insets at various breakpoints. */
inset?: {
default?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';
@@ -39,7 +37,6 @@ export interface DividerProps extends React.HTMLProps {
export const Divider: React.FunctionComponent = ({
className,
component = DividerVariant.hr,
- isVertical = false,
inset,
orientation,
...props
@@ -50,7 +47,6 @@ export const Divider: React.FunctionComponent = ({
{
static defaultProps: DropdownMenuProps = {
className: '',
isOpen: true,
- openedOnEnter: false,
autoFocus: true,
position: DropdownPosition.left,
component: 'ul',
@@ -179,8 +176,6 @@ export class DropdownMenu extends React.Component {
component,
isGrouped,
setMenuComponentRef,
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- openedOnEnter,
alignments,
...props
} = this.props;
diff --git a/packages/react-core/src/components/Dropdown/DropdownToggle.tsx b/packages/react-core/src/components/Dropdown/DropdownToggle.tsx
index cea80840736..2388f447807 100644
--- a/packages/react-core/src/components/Dropdown/DropdownToggle.tsx
+++ b/packages/react-core/src/components/Dropdown/DropdownToggle.tsx
@@ -29,8 +29,6 @@ export interface DropdownToggleProps extends React.HTMLProps,
isText?: boolean;
/** Whether or not the has a disabled state */
isDisabled?: boolean;
- /** @deprecated Use `toggleVariant` instead. Whether or not the dropdown toggle button should have primary button styling */
- isPrimary?: boolean;
/** Alternate styles for the dropdown toggle button */
toggleVariant?: 'primary' | 'secondary' | 'default';
/** An image to display within the dropdown toggle, appearing before any component children */
@@ -65,7 +63,6 @@ export const DropdownToggle: React.FunctionComponent
= ({
isDisabled = false,
isPlain = false,
isText = false,
- isPrimary = false,
toggleVariant = 'default',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
isActive = false,
@@ -97,7 +94,6 @@ export const DropdownToggle: React.FunctionComponent = ({
isDisabled={isDisabled}
isPlain={isPlain}
isText={isText}
- isPrimary={isPrimary}
toggleVariant={toggleVariant}
onToggle={onToggle}
aria-haspopup={ariaHasPopup}
@@ -123,7 +119,7 @@ export const DropdownToggle: React.FunctionComponent = ({
styles.dropdownToggle,
styles.modifiers.splitButton,
splitButtonVariant === 'action' && styles.modifiers.action,
- (toggleVariant === 'primary' || isPrimary) && splitButtonVariant === 'action' && styles.modifiers.primary,
+ toggleVariant === 'primary' && splitButtonVariant === 'action' && styles.modifiers.primary,
toggleVariant === 'secondary' && splitButtonVariant === 'action' && styles.modifiers.secondary,
isDisabled && styles.modifiers.disabled
)}
diff --git a/packages/react-core/src/components/Dropdown/Toggle.tsx b/packages/react-core/src/components/Dropdown/Toggle.tsx
index 3b1d9175537..e5831f03ae1 100644
--- a/packages/react-core/src/components/Dropdown/Toggle.tsx
+++ b/packages/react-core/src/components/Dropdown/Toggle.tsx
@@ -35,8 +35,6 @@ export interface ToggleProps {
isPlain?: boolean;
/** Display the toggle in text only mode */
isText?: boolean;
- /** @deprecated Use `toggleVariant` instead. Display the toggle with a primary button style */
- isPrimary?: boolean;
/** Style the toggle as a child of a split button */
isSplitButton?: boolean;
/** Alternate styles for the dropdown toggle button */
@@ -64,7 +62,6 @@ export class Toggle extends React.Component {
isDisabled: false,
isPlain: false,
isText: false,
- isPrimary: false,
isSplitButton: false,
onToggle: () => {},
onEnter: () => {},
@@ -138,7 +135,6 @@ export class Toggle extends React.Component {
isDisabled,
isPlain,
isText,
- isPrimary,
isSplitButton,
toggleVariant,
onToggle,
@@ -166,7 +162,6 @@ export class Toggle extends React.Component {
isActive && styles.modifiers.active,
isPlain && styles.modifiers.plain,
isText && styles.modifiers.text,
- isPrimary && styles.modifiers.primary,
toggleVariant && buttonVariantStyles[toggleVariant],
className
)}
diff --git a/packages/react-core/src/components/EmptyState/examples/EmptyState.md b/packages/react-core/src/components/EmptyState/examples/EmptyState.md
index ead9b43b917..3608e5b3306 100644
--- a/packages/react-core/src/components/EmptyState/examples/EmptyState.md
+++ b/packages/react-core/src/components/EmptyState/examples/EmptyState.md
@@ -2,7 +2,7 @@
id: Empty state
section: components
cssPrefix: pf-c-empty-state
-propComponents: ['EmptyState', 'EmptyStateBody', 'EmptyStateIcon', 'EmptyStateSecondaryActions']
+propComponents: ['EmptyState', 'EmptyStateBody', 'EmptyStateIcon', 'EmptyStatePrimary','EmptyStateSecondaryActions']
---
import CubesIcon from '@patternfly/react-icons/dist/esm/icons/cubes-icon';
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
@@ -40,5 +40,7 @@ import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
### No match found
+`EmptyStatePrimary` is a container for primary actions. It can be used in lieu of using a primary button and will insure appropriate spacing of the buttons.
+
```ts file="EmptyStateNoMatchFound.tsx"
```
diff --git a/packages/react-core/src/components/FileUpload/FileUpload.tsx b/packages/react-core/src/components/FileUpload/FileUpload.tsx
index df2b34a5816..032bea86611 100644
--- a/packages/react-core/src/components/FileUpload/FileUpload.tsx
+++ b/packages/react-core/src/components/FileUpload/FileUpload.tsx
@@ -47,17 +47,6 @@ export interface FileUploadProps
isReadOnly?: boolean;
/** Flag to show if the field is required. */
isRequired?: boolean;
- /** @deprecated A callback for when the file contents changes. Please instead use
- * onFileInputChange, onTextChange, onDataChange, and onClearClick individually.
- */
- onChange?: (
- value: string | File,
- filename: string,
- event:
- | React.MouseEvent // Clear button was clicked
- | React.DragEvent // User dragged/dropped a file
- | React.ChangeEvent // User typed in the TextArea
- ) => void;
/** Callback for clicking on the file upload field text area. By default, prevents a click
* in the text area from opening file dialog.
*/
@@ -66,7 +55,7 @@ export interface FileUploadProps
onFileInputChange?: (event: React.ChangeEvent | React.DragEvent, file: File) => void;
/** Aria-valuetext for the loading spinner. */
spinnerAriaValueText?: string;
- /** What type of file. Determines what is passed to the onChange property and what is
+ /** What type of file. Determines whether 'onDataChange` is called and what is
* expected by the value property (a string for 'text' and 'dataURL', or a File object otherwise.
*/
type?: 'text' | 'dataURL';
@@ -102,7 +91,6 @@ export const FileUpload: React.FunctionComponent = ({
value = type === fileReaderType.text || type === fileReaderType.dataURL ? '' : null,
filename = '',
children = null,
- onChange = () => {},
onFileInputChange = null,
onReadStarted = () => {},
onReadFinished = () => {},
@@ -121,31 +109,23 @@ export const FileUpload: React.FunctionComponent = ({
onFileInputChange?.(event, fileHandle);
}
if (type === fileReaderType.text || type === fileReaderType.dataURL) {
- onChange('', fileHandle.name, event); // Show the filename while reading
onReadStarted(fileHandle);
readFile(fileHandle, type as fileReaderType)
.then(data => {
onReadFinished(fileHandle);
- onChange(data as string, fileHandle.name, event);
onDataChange?.(data as string);
})
.catch((error: DOMException) => {
onReadFailed(error, fileHandle);
onReadFinished(fileHandle);
- onChange('', '', event); // Clear the filename field on a failure
onDataChange?.('');
});
- } else {
- onChange(fileHandle, fileHandle.name, event);
}
}
dropzoneProps.onDropAccepted && dropzoneProps.onDropAccepted(acceptedFiles, event);
};
const onDropRejected: DropFileEventHandler = (rejectedFiles, event) => {
- if (rejectedFiles.length > 0) {
- onChange('', rejectedFiles[0].name, event);
- }
dropzoneProps.onDropRejected && dropzoneProps.onDropRejected(rejectedFiles, event);
};
@@ -155,7 +135,6 @@ export const FileUpload: React.FunctionComponent = ({
};
const onClearButtonClick = (event: React.MouseEvent) => {
- onChange('', '', event);
onClearClick?.(event);
setFileValue(null);
};
@@ -187,7 +166,6 @@ export const FileUpload: React.FunctionComponent = ({
type={type}
filename={filename}
value={value}
- onChange={onChange}
isDragActive={isDragActive}
onBrowseButtonClick={open}
onClearButtonClick={onClearButtonClick}
diff --git a/packages/react-core/src/components/FileUpload/FileUploadField.tsx b/packages/react-core/src/components/FileUpload/FileUploadField.tsx
index 808dde920a6..fa5897e37db 100644
--- a/packages/react-core/src/components/FileUpload/FileUploadField.tsx
+++ b/packages/react-core/src/components/FileUpload/FileUploadField.tsx
@@ -12,7 +12,7 @@ import { fileReaderType } from '../../helpers/fileUtils';
* functionality is not built in by default.
*/
-export interface FileUploadFieldProps extends Omit, 'value' | 'onChange'> {
+export interface FileUploadFieldProps extends Omit, 'value'> {
/** Flag to allow editing of a text file's contents after it is selected from disk. */
allowEditingUploadedText?: boolean;
/** Aria-label for the text area. */
@@ -47,14 +47,6 @@ export interface FileUploadFieldProps extends Omit // User typed in the TextArea
- | React.MouseEvent // User clicked Clear button
- ) => void;
/** Aria-valuetext for the loading spinner. */
spinnerAriaValueText?: string;
/** What type of file. Determines what is is expected by the value property (a string for
@@ -95,7 +87,6 @@ export const FileUploadField: React.FunctionComponent = ({
type,
value = '',
filename = '',
- onChange = () => {},
onBrowseButtonClick = () => {},
onClearButtonClick = () => {},
onTextAreaClick,
@@ -123,8 +114,7 @@ export const FileUploadField: React.FunctionComponent = ({
...props
}: FileUploadFieldProps) => {
- const onTextAreaChange = (newValue: string, event: React.ChangeEvent) => {
- onChange(newValue, filename, event);
+ const onTextAreaChange = (newValue: string) => {
onTextChange?.(newValue);
};
return (
diff --git a/packages/react-core/src/components/FileUpload/__tests__/FileUpload.test.tsx b/packages/react-core/src/components/FileUpload/__tests__/FileUpload.test.tsx
index 077e001ef15..369ab6c089b 100644
--- a/packages/react-core/src/components/FileUpload/__tests__/FileUpload.test.tsx
+++ b/packages/react-core/src/components/FileUpload/__tests__/FileUpload.test.tsx
@@ -3,7 +3,6 @@ import * as React from 'react';
import { render } from '@testing-library/react';
test('simple fileupload', () => {
- const changeHandler = jest.fn();
const readStartedHandler = jest.fn();
const readFinishedHandler = jest.fn();
@@ -13,7 +12,6 @@ test('simple fileupload', () => {
type="text"
value={''}
filename={''}
- onChange={changeHandler}
onReadStarted={readStartedHandler}
onReadFinished={readFinishedHandler}
isLoading={false}
diff --git a/packages/react-core/src/components/FileUpload/__tests__/FileUploadField.test.tsx b/packages/react-core/src/components/FileUpload/__tests__/FileUploadField.test.tsx
index 650da01bd8e..925394a559e 100644
--- a/packages/react-core/src/components/FileUpload/__tests__/FileUploadField.test.tsx
+++ b/packages/react-core/src/components/FileUpload/__tests__/FileUploadField.test.tsx
@@ -3,7 +3,6 @@ import * as React from 'react';
import { render } from '@testing-library/react';
test('simple fileuploadfield', () => {
- const changeHandler = jest.fn();
const browserBtnClickHandler = jest.fn();
const clearBtnClickHandler = jest.fn();
@@ -13,7 +12,6 @@ test('simple fileuploadfield', () => {
type="text"
value={''}
filename={''}
- onChange={changeHandler}
filenamePlaceholder="Do something custom with this!"
onBrowseButtonClick={browserBtnClickHandler}
onClearButtonClick={clearBtnClickHandler}
diff --git a/packages/react-core/src/components/Label/examples/LabelEditable.tsx b/packages/react-core/src/components/Label/examples/LabelEditable.tsx
index 6dbc76900b7..5b5e018bbf0 100644
--- a/packages/react-core/src/components/Label/examples/LabelEditable.tsx
+++ b/packages/react-core/src/components/Label/examples/LabelEditable.tsx
@@ -31,7 +31,7 @@ export const LabelEditable: React.FunctionComponent = () => {
onEditComplete={onEditComplete}
isEditable
editableProps={{
- 'aria-label': 'Editable text',
+ 'aria-label': `Editable label with text ${labelText}`,
id: 'editable-label'
}}
>
@@ -46,7 +46,7 @@ export const LabelEditable: React.FunctionComponent = () => {
onEditComplete={onCompactEditComplete}
isEditable
editableProps={{
- 'aria-label': 'Compact editable text',
+ 'aria-label': `Editable compact label with text ${compactLabelText}`,
id: 'compact-editable-label'
}}
>
diff --git a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAdd.tsx b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAdd.tsx
index 377b4d01d37..e89cfa282ed 100644
--- a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAdd.tsx
+++ b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAdd.tsx
@@ -11,7 +11,7 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
props: {
isEditable: true,
editableProps: {
- 'aria-label': 'label editable text'
+ 'aria-label': 'Editable label with text Label 3'
}
},
id: 2
@@ -24,7 +24,12 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
const onEdit = (nextText: string, index: number) => {
const copy = [...labels];
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
+ const updatedProps = {
+ ...labels[index].props,
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
+ };
+
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
setLabels(copy);
};
@@ -35,7 +40,7 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
props: {
isEditable: true,
editableProps: {
- 'aria-label': 'label editable text'
+ 'aria-label': `Editable label with text New Label`
}
},
id: idIndex
diff --git a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddDropdown.tsx b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddDropdown.tsx
index 0e4fbf286ad..2f6cfe1ecae 100644
--- a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddDropdown.tsx
+++ b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddDropdown.tsx
@@ -16,7 +16,7 @@ export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
props: {
isEditable: true,
editableProps: {
- 'aria-label': 'label editable text'
+ 'aria-label': 'Editable label with text Label 3'
}
},
id: 2
@@ -29,7 +29,12 @@ export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
const onEdit = (nextText: string, index: number) => {
const copy = [...labels];
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
+ const updatedProps = {
+ ...labels[index].props,
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
+ };
+
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
setLabels(copy);
};
diff --git a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddModal.tsx b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddModal.tsx
index 3a51ecfe8f2..05b5ebfcf8a 100644
--- a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddModal.tsx
+++ b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableAddModal.tsx
@@ -47,7 +47,7 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
props: {
isEditable: true,
editableProps: {
- 'aria-label': 'label editable text'
+ 'aria-label': 'Editable label with text Label 3'
}
},
id: 6
@@ -60,7 +60,12 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
const onEdit = (nextText: string, index: number) => {
const copy = [...labels];
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
+ const updatedProps = {
+ ...labels[index].props,
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
+ };
+
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
setLabels(copy);
};
@@ -81,7 +86,7 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
isEditable: isEditable !== undefined ? isEditable : true,
...(isEditable && {
editableProps: {
- 'aria-label': 'label editable text'
+ 'aria-label': `Editable label with text ${labelText || 'New Label'}`
}
})
},
diff --git a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableLabels.tsx b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableLabels.tsx
index c9f59089869..ef65dd3dd92 100644
--- a/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableLabels.tsx
+++ b/packages/react-core/src/components/LabelGroup/examples/LabelGroupEditableLabels.tsx
@@ -15,7 +15,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
onEditComplete={newText => setLabel1(newText)}
isEditable
editableProps={{
- 'aria-label': 'Editable text',
+ 'aria-label': `Editable label with text ${label1}`,
id: 'editable-label-1'
}}
>
@@ -29,7 +29,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
onEditComplete={newText => setLabel2(newText)}
isEditable
editableProps={{
- 'aria-label': 'Editable text 2',
+ 'aria-label': `Editable label with text ${label2}`,
id: 'editable-label-2'
}}
>
@@ -42,7 +42,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
onEditComplete={newText => setLabel3(newText)}
isEditable
editableProps={{
- 'aria-label': 'Editable text 3',
+ 'aria-label': `Editable label with text ${label3}`,
id: 'editable-label-3'
}}
>
diff --git a/packages/react-core/src/components/Menu/examples/MenuWithDrilldown.tsx b/packages/react-core/src/components/Menu/examples/MenuWithDrilldown.tsx
index 0918400a12a..5825f42c4e9 100644
--- a/packages/react-core/src/components/Menu/examples/MenuWithDrilldown.tsx
+++ b/packages/react-core/src/components/Menu/examples/MenuWithDrilldown.tsx
@@ -26,7 +26,7 @@ export const MenuWithDrilldown: React.FunctionComponent = () => {
};
const setHeight = (menuId: string, height: number) => {
- if (menuHeights[menuId] === undefined) {
+ if (menuHeights[menuId] === undefined || (menuId !== 'drilldown-rootMenu' && menuHeights[menuId] !== height)) {
setMenuHeights({ ...menuHeights, [menuId]: height });
}
};
diff --git a/packages/react-core/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx b/packages/react-core/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx
index 61ed5fc80c4..528c33ba9c8 100644
--- a/packages/react-core/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx
+++ b/packages/react-core/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx
@@ -55,11 +55,13 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
setDrilldownPath(pathSansLast);
setActiveMenu(toMenuId);
};
+
const setHeight = (menuId: string, height: number) => {
- if (!menuHeights[menuId]) {
+ if (menuHeights[menuId] === undefined || (menuId !== 'breadcrumbs-rootMenu' && menuHeights[menuId] !== height)) {
setMenuHeights({ ...menuHeights, [menuId]: height });
}
};
+
const drillIn = (fromMenuId: string, toMenuId: string, pathId: string) => {
setMenuDrilledIn([...menuDrilledIn, fromMenuId]);
setDrilldownPath([...drilldownPath, pathId]);
diff --git a/packages/react-core/src/components/Menu/examples/MenuWithDrilldownSubmenuFunctions.tsx b/packages/react-core/src/components/Menu/examples/MenuWithDrilldownSubmenuFunctions.tsx
index 9629b890d2a..54ba1a0fb6b 100644
--- a/packages/react-core/src/components/Menu/examples/MenuWithDrilldownSubmenuFunctions.tsx
+++ b/packages/react-core/src/components/Menu/examples/MenuWithDrilldownSubmenuFunctions.tsx
@@ -26,7 +26,7 @@ export const MenuWithDrilldownSubmenuFunctions: React.FunctionComponent = () =>
};
const setHeight = (menuId: string, height: number) => {
- if (menuHeights[menuId] === undefined) {
+ if (menuHeights[menuId] === undefined || (menuId !== 'functions-rootMenu' && menuHeights[menuId] !== height)) {
setMenuHeights({ ...menuHeights, [menuId]: height });
}
};
diff --git a/packages/react-core/src/components/Page/Page.tsx b/packages/react-core/src/components/Page/Page.tsx
index cffbc1135a1..b8ee99d36fa 100644
--- a/packages/react-core/src/components/Page/Page.tsx
+++ b/packages/react-core/src/components/Page/Page.tsx
@@ -101,7 +101,6 @@ export class Page extends React.Component {
isManagedSidebar: false,
isBreadcrumbWidthLimited: false,
defaultManagedSidebarIsOpen: true,
- onPageResize: (): void => null,
mainTabIndex: -1,
isNotificationDrawerExpanded: false,
onNotificationDrawerExpand: () => null,
diff --git a/packages/react-core/src/components/Page/PageBreadcrumb.tsx b/packages/react-core/src/components/Page/PageBreadcrumb.tsx
index 527de45cb90..c8c8ad7e6cd 100644
--- a/packages/react-core/src/components/Page/PageBreadcrumb.tsx
+++ b/packages/react-core/src/components/Page/PageBreadcrumb.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { css } from '@patternfly/react-styles';
import styles from '@patternfly/react-styles/css/components/Page/page';
-import { formatBreakpointMods } from '../../helpers/util';
+import { formatBreakpointMods, Mods } from '../../helpers/util';
import { PageContext } from './PageContext';
export interface PageBreadcrumbProps extends React.HTMLProps {
@@ -11,8 +11,6 @@ export interface PageBreadcrumbProps extends React.HTMLProps {
children?: React.ReactNode;
/** Limits the width of the breadcrumb */
isWidthLimited?: boolean;
- /** @deprecated Use the stickyOnBreakpoint prop instead - Modifier indicating if the PageBreadcrumb is sticky to the top or bottom */
- sticky?: 'top' | 'bottom';
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
stickyOnBreakpoint?: {
default?: 'top' | 'bottom';
@@ -36,7 +34,6 @@ export const PageBreadcrumb = ({
className = '',
children,
isWidthLimited,
- sticky,
stickyOnBreakpoint,
hasShadowTop = false,
hasShadowBottom = false,
@@ -57,10 +54,8 @@ export const PageBreadcrumb = ({
{
className?: string;
/** Content rendered inside of the PageGroup */
children?: React.ReactNode;
- /** @deprecated Use the stickyOnBreakpoint prop instead - Modifier indicating if the PageBreadcrumb is sticky to the top or bottom */
- sticky?: 'top' | 'bottom';
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
stickyOnBreakpoint?: {
default?: 'top' | 'bottom';
@@ -32,7 +30,6 @@ export interface PageGroupProps extends React.HTMLProps {
export const PageGroup = ({
className = '',
children,
- sticky,
stickyOnBreakpoint,
hasShadowTop = false,
hasShadowBottom = false,
@@ -55,8 +52,6 @@ export const PageGroup = ({
className={css(
styles.pageMainGroup,
formatBreakpointMods(stickyOnBreakpoint, styles, 'sticky-', getVerticalBreakpoint(height), true),
- sticky === 'top' && styles.modifiers.stickyTop,
- sticky === 'bottom' && styles.modifiers.stickyBottom,
hasShadowTop && styles.modifiers.shadowTop,
hasShadowBottom && styles.modifiers.shadowBottom,
hasOverflowScroll && styles.modifiers.overflowScroll,
diff --git a/packages/react-core/src/components/Page/PageHeader.tsx b/packages/react-core/src/components/Page/PageHeader.tsx
index 0c5af921442..0cb2db3de90 100644
--- a/packages/react-core/src/components/Page/PageHeader.tsx
+++ b/packages/react-core/src/components/Page/PageHeader.tsx
@@ -25,8 +25,6 @@ export interface PageHeaderProps extends React.HTMLProps {
navToggleId?: string;
/** True if the side nav is shown */
isNavOpen?: boolean;
- /** This prop is no longer managed through PageHeader but in the Page component. */
- isManagedSidebar?: boolean;
/** Sets the value for role on the element */
role?: string;
/** Callback function to handle the side nav toggle button, managed by the Page component if the Page isManagedSidebar prop is set to true */
@@ -43,7 +41,6 @@ export const PageHeader: React.FunctionComponent = ({
headerTools = null as React.ReactNode,
topNav = null as React.ReactNode,
isNavOpen = true,
- isManagedSidebar: deprecatedIsManagedSidebar = undefined,
role = undefined as string,
showNavToggle = false,
navToggleId = 'nav-toggle',
@@ -53,11 +50,6 @@ export const PageHeader: React.FunctionComponent = ({
...props
}: PageHeaderProps) => {
const LogoComponent = logoComponent as any;
- if ([false, true].includes(deprecatedIsManagedSidebar)) {
- console.warn(
- 'isManagedSidebar is deprecated in the PageHeader component. To make the sidebar toggle uncontrolled, pass this prop in the Page component'
- );
- }
return (
{({ isManagedSidebar, onNavToggle: managedOnNavToggle, isNavOpen: managedIsNavOpen }: PageContextProps) => {
diff --git a/packages/react-core/src/components/Page/PageNavigation.tsx b/packages/react-core/src/components/Page/PageNavigation.tsx
index 1a6ad1117bc..9024c1fe4d0 100644
--- a/packages/react-core/src/components/Page/PageNavigation.tsx
+++ b/packages/react-core/src/components/Page/PageNavigation.tsx
@@ -11,8 +11,6 @@ export interface PageNavigationProps extends React.HTMLProps {
children?: React.ReactNode;
/** Limits the width of the PageNavigation */
isWidthLimited?: boolean;
- /** @deprecated Use the stickyOnBreakpoint prop instead - Modifier indicating if the PageBreadcrumb is sticky to the top or bottom */
- sticky?: 'top' | 'bottom';
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
stickyOnBreakpoint?: {
default?: 'top' | 'bottom';
@@ -36,7 +34,6 @@ export const PageNavigation = ({
className = '',
children,
isWidthLimited,
- sticky,
stickyOnBreakpoint,
hasShadowTop = false,
hasShadowBottom = false,
@@ -59,8 +56,6 @@ export const PageNavigation = ({
styles.pageMainNav,
formatBreakpointMods(stickyOnBreakpoint, styles, 'sticky-', getVerticalBreakpoint(height), true),
isWidthLimited && styles.modifiers.limitWidth,
- sticky === 'top' && styles.modifiers.stickyTop,
- sticky === 'bottom' && styles.modifiers.stickyBottom,
hasShadowTop && styles.modifiers.shadowTop,
hasShadowBottom && styles.modifiers.shadowBottom,
hasOverflowScroll && styles.modifiers.overflowScroll,
diff --git a/packages/react-core/src/components/Page/PageSection.tsx b/packages/react-core/src/components/Page/PageSection.tsx
index 88343b2a26f..0793f85d83e 100644
--- a/packages/react-core/src/components/Page/PageSection.tsx
+++ b/packages/react-core/src/components/Page/PageSection.tsx
@@ -44,8 +44,6 @@ export interface PageSectionProps extends React.HTMLProps {
xl?: 'padding' | 'noPadding';
'2xl'?: 'padding' | 'noPadding';
};
- /** @deprecated Use the stickyOnBreakpoint prop instead - Modifier indicating if the PageBreadcrumb is sticky to the top or bottom */
- sticky?: 'top' | 'bottom';
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
stickyOnBreakpoint?: {
default?: 'top' | 'bottom';
@@ -94,7 +92,6 @@ export const PageSection: React.FunctionComponent = ({
isFilled,
isWidthLimited = false,
isCenterAligned = false,
- sticky,
stickyOnBreakpoint,
hasShadowTop = false,
hasShadowBottom = false,
@@ -126,8 +123,6 @@ export const PageSection: React.FunctionComponent = ({
isFilled === true && styles.modifiers.fill,
isWidthLimited && styles.modifiers.limitWidth,
isWidthLimited && isCenterAligned && type !== PageSectionTypes.subNav && styles.modifiers.alignCenter,
- sticky === 'top' && styles.modifiers.stickyTop,
- sticky === 'bottom' && styles.modifiers.stickyBottom,
hasShadowTop && styles.modifiers.shadowTop,
hasShadowBottom && styles.modifiers.shadowBottom,
hasOverflowScroll && styles.modifiers.overflowScroll,
diff --git a/packages/react-core/src/components/Page/__tests__/PageBreadcrumb.test.tsx b/packages/react-core/src/components/Page/__tests__/PageBreadcrumb.test.tsx
index 913838f7473..63742eb0de6 100644
--- a/packages/react-core/src/components/Page/__tests__/PageBreadcrumb.test.tsx
+++ b/packages/react-core/src/components/Page/__tests__/PageBreadcrumb.test.tsx
@@ -12,11 +12,11 @@ describe('page breadcrumb', () => {
expect(asFragment()).toMatchSnapshot();
});
test('Verify top sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify top shadow', () => {
diff --git a/packages/react-core/src/components/Page/__tests__/PageGroup.test.tsx b/packages/react-core/src/components/Page/__tests__/PageGroup.test.tsx
index f4bb73fd370..8ac64dd01c2 100644
--- a/packages/react-core/src/components/Page/__tests__/PageGroup.test.tsx
+++ b/packages/react-core/src/components/Page/__tests__/PageGroup.test.tsx
@@ -8,11 +8,11 @@ describe('page group', () => {
expect(asFragment()).toMatchSnapshot();
});
test('Verify top sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify top shadow', () => {
diff --git a/packages/react-core/src/components/Page/__tests__/PageNavigation.test.tsx b/packages/react-core/src/components/Page/__tests__/PageNavigation.test.tsx
index 80e3c6556d3..8577c1cc4d5 100644
--- a/packages/react-core/src/components/Page/__tests__/PageNavigation.test.tsx
+++ b/packages/react-core/src/components/Page/__tests__/PageNavigation.test.tsx
@@ -12,11 +12,11 @@ describe('page navigation', () => {
expect(asFragment()).toMatchSnapshot();
});
test('Verify top sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify bottom sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify top shadow', () => {
diff --git a/packages/react-core/src/components/Page/__tests__/PageSection.test.tsx b/packages/react-core/src/components/Page/__tests__/PageSection.test.tsx
index 3bdf925f9b1..ceed384957f 100644
--- a/packages/react-core/src/components/Page/__tests__/PageSection.test.tsx
+++ b/packages/react-core/src/components/Page/__tests__/PageSection.test.tsx
@@ -65,12 +65,12 @@ test('Check page section with fill and no padding example against snapshot', ()
});
test('Verify page section top sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
test('Verify page section bottom sticky', () => {
- const { asFragment } = render(test );
+ const { asFragment } = render(test );
expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap b/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap
index 971d4c112bc..cc1f1c12d34 100644
--- a/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap
+++ b/packages/react-core/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap
@@ -4,7 +4,7 @@ exports[`Page Check dark page against snapshot 1`] = `
diff --git a/packages/react-core/src/components/Spinner/Spinner.tsx b/packages/react-core/src/components/Spinner/Spinner.tsx
index bf1b9a80e4a..61932f3c393 100644
--- a/packages/react-core/src/components/Spinner/Spinner.tsx
+++ b/packages/react-core/src/components/Spinner/Spinner.tsx
@@ -31,7 +31,7 @@ export const Spinner: React.FunctionComponent = ({
className = '',
size = 'xl',
'aria-valuetext': ariaValueText = 'Loading...',
- isSVG = false,
+ isSVG = true,
diameter,
'aria-label': ariaLabel,
'aria-labelledBy': ariaLabelledBy,
diff --git a/packages/react-core/src/components/Spinner/__tests__/Spinner.test.tsx b/packages/react-core/src/components/Spinner/__tests__/Spinner.test.tsx
index eb1402d7004..81b8eb78cf9 100644
--- a/packages/react-core/src/components/Spinner/__tests__/Spinner.test.tsx
+++ b/packages/react-core/src/components/Spinner/__tests__/Spinner.test.tsx
@@ -26,3 +26,9 @@ test('extra large spinner', () => {
const { asFragment } = render( );
expect(asFragment()).toMatchSnapshot();
});
+
+test('non-SVG spinner', () => {
+ const { asFragment } = render( )
+
+ expect(asFragment()).toMatchSnapshot();
+})
diff --git a/packages/react-core/src/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap b/packages/react-core/src/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap
index b7d35ca8adb..66ca1910fda 100644
--- a/packages/react-core/src/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap
+++ b/packages/react-core/src/components/Spinner/__tests__/__snapshots__/Spinner.test.tsx.snap
@@ -2,68 +2,65 @@
exports[`extra large spinner 1`] = `
-
-
-
-
-
+
`;
exports[`large spinner 1`] = `
-
-
-
-
-
+
`;
exports[`medium spinner 1`] = `
-
-
-
-
-
+
`;
-exports[`simple spinner 1`] = `
+exports[`non-SVG spinner 1`] = `
`;
+exports[`simple spinner 1`] = `
+
+
+
+
+
+`;
+
exports[`small spinner 1`] = `
-
-
-
-
-
+
`;
diff --git a/packages/react-core/src/components/TextInput/examples/TextInput.md b/packages/react-core/src/components/TextInput/examples/TextInput.md
index 8618439b399..6702d09ce38 100644
--- a/packages/react-core/src/components/TextInput/examples/TextInput.md
+++ b/packages/react-core/src/components/TextInput/examples/TextInput.md
@@ -9,265 +9,42 @@ propComponents: ['TextInput']
### Basic
-```js
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
-class SimpleTextInput extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
- this.handleTextInputChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
-
- return (
-
- );
- }
-}
+```ts file="./TextInputBasic.tsx"
```
### Disabled
-```js
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
- ;
+```ts file="./TextInputDisabled.tsx"
```
### Truncated on Left
-```js
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
-class LeftTruncatedTextInput extends React.Component {
-
-constructor(props) {
- super(props);
- this.state = {
- value: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
- };
- this.handleTextInputChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
- return (
-
- );
- }
-}
+```ts file="./TextInputLeftTruncated.tsx"
```
### Read only
-```js
-import React from 'react';
-import { Checkbox, TextInput } from '@patternfly/react-core';
-
-const ReadOnlyTextArea = () => {
- const [isPlainChecked, setIsPlainChecked] = React.useState(false);
-
- return (
-
-
- setIsPlainChecked(checked)}
- />
-
-
-
- );
-};
+```ts file="./TextInputReadOnly.tsx"
```
### Invalid
-```js
-import React from 'react';
-import { TextInput, ValidatedOptions } from '@patternfly/react-core';
-
-class InvalidTextInput extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- value: ''
- };
- this.handleInvalidTextInputChange = value => {
- this.setState({ value });
- };
- }
-
- render() {
- const { value } = this.state;
-
- return (
-
- );
- }
-}
+```ts file="./TextInputInvalid.tsx"
```
### Select text using ref
-```js
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
-TextInputSelectAll = () => {
- const [value, setValue] = React.useState('select all on click');
- const ref = React.useRef(null);
- return (
- ref && ref.current && ref.current.select()}
- onChange={value => setValue(value)}
- aria-label="select-all"
- />
- );
-};
+```ts file="./TextInputSelectUsingRef.tsx"
```
### Icon variants
-```js
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
-SimpleTextInput = () => {
- const [calendar, setCalendar] = React.useState('');
- const [clock, setClock] = React.useState('');
- const [custom, setCustom] = React.useState('');
-
- return (
- <>
- setCalendar(value)}
- aria-label="text input example"
- />
-
-
- setClock(value)}
- aria-label="text input example"
- />
-
-
- setCustom(value)}
- aria-label="text input example"
- />
- >
- );
-};
+```ts file="./TextInputIcon.tsx"
```
### Icon sprite variants
**Note:** The icons for the success, invalid, calendar, etc. variations in form control elements are applied as background images to the form element. By default, the image URLs for these icons are data URIs. However, there may be cases where data URIs are not ideal, such as in an application with a content security policy that disallows data URIs for security reasons. The `isIconSprite` variation changes the icon source to an external SVG file that serves as a sprite for all of the supported icons.
-```js isBeta
-import React from 'react';
-import { TextInput } from '@patternfly/react-core';
-
-IconSpriteTextInputs = () => {
- const [success, setSuccess] = React.useState('');
- const [warning, setWarning] = React.useState('');
- const [error, setError] = React.useState('');
- const [calendar, setCalendar] = React.useState('');
- const [clock, setClock] = React.useState('');
-
- return (
- <>
- setSuccess(value)}
- aria-label="success icon sprite text input example"
- />
-
-
- setWarning(value)}
- aria-label="warning icon sprite text input example"
- />
-
-
- setError(value)}
- aria-label="error icon sprite text input example"
- />
-
-
- setCalendar(value)}
- aria-label="calendar icon sprite text input example"
- />
-
-
- setClock(value)}
- aria-label="clock icon sprite text input example"
- />
- >
- );
-};
+```ts isBeta file="./TextInputIconSprite.tsx"
```
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputBasic.tsx b/packages/react-core/src/components/TextInput/examples/TextInputBasic.tsx
new file mode 100644
index 00000000000..5fdefea7b9d
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputBasic.tsx
@@ -0,0 +1,7 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const TextInputBasic: React.FunctionComponent = () => {
+ const [value, setValue] = React.useState('');
+ return setValue(value)} aria-label="text input example" />;
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputDisabled.tsx b/packages/react-core/src/components/TextInput/examples/TextInputDisabled.tsx
new file mode 100644
index 00000000000..52580a22062
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputDisabled.tsx
@@ -0,0 +1,6 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const TextInputBasic: React.FunctionComponent = () => (
+
+);
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputIcon.tsx b/packages/react-core/src/components/TextInput/examples/TextInputIcon.tsx
new file mode 100644
index 00000000000..4ac710553fe
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputIcon.tsx
@@ -0,0 +1,39 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const TextInputIcon: React.FunctionComponent = () => {
+ const [calendar, setCalendar] = React.useState('');
+ const [clock, setClock] = React.useState('');
+ const [custom, setCustom] = React.useState('');
+
+ return (
+ <>
+ setCalendar(value)}
+ aria-label="text input example"
+ />
+
+
+ setClock(value)}
+ aria-label="text input example"
+ />
+
+
+ setCustom(value)}
+ aria-label="text input example"
+ />
+ >
+ );
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputIconSprite.tsx b/packages/react-core/src/components/TextInput/examples/TextInputIconSprite.tsx
new file mode 100644
index 00000000000..89b39fc6406
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputIconSprite.tsx
@@ -0,0 +1,63 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const TextInputIconSprite: React.FunctionComponent = () => {
+ const [calendar, setCalendar] = React.useState('');
+ const [clock, setClock] = React.useState('');
+ const [success, setSuccess] = React.useState('');
+ const [warning, setWarning] = React.useState('');
+ const [error, setError] = React.useState('');
+
+ return (
+ <>
+ setSuccess(value)}
+ aria-label="success icon sprite text input example"
+ />
+
+
+ setWarning(value)}
+ aria-label="warning icon sprite text input example"
+ />
+
+
+ setError(value)}
+ aria-label="error icon sprite text input example"
+ />
+
+
+ setCalendar(value)}
+ aria-label="calendar icon sprite text input example"
+ />
+
+
+ setClock(value)}
+ aria-label="clock icon sprite text input example"
+ />
+ >
+ );
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputInvalid.tsx b/packages/react-core/src/components/TextInput/examples/TextInputInvalid.tsx
new file mode 100644
index 00000000000..b76a0e78463
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputInvalid.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+import { TextInput, ValidatedOptions } from '@patternfly/react-core';
+
+export const TextInputInvalid: React.FunctionComponent = () => {
+ const [value, setValue] = React.useState('');
+ return (
+ setValue(value)}
+ isRequired
+ validated={ValidatedOptions.error}
+ type="text"
+ aria-label="invalid text input example"
+ />
+ );
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputLeftTruncated.tsx b/packages/react-core/src/components/TextInput/examples/TextInputLeftTruncated.tsx
new file mode 100644
index 00000000000..e1c9ab72b99
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputLeftTruncated.tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const LeftTruncatedTextInput: React.FunctionComponent = () => {
+ const [value, setValue] = React.useState(
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
+ );
+ return (
+ setValue(value)}
+ aria-label="left-truncated text input example"
+ />
+ );
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputReadOnly.tsx b/packages/react-core/src/components/TextInput/examples/TextInputReadOnly.tsx
new file mode 100644
index 00000000000..f951f984214
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputReadOnly.tsx
@@ -0,0 +1,25 @@
+import React from 'react';
+import { Checkbox, TextInput } from '@patternfly/react-core';
+
+export const TextInputReadOnly: React.FunctionComponent = () => {
+ const [isPlainChecked, setIsPlainChecked] = React.useState(false);
+ return (
+ <>
+
+ setIsPlainChecked(checked)}
+ />
+
+
+ >
+ );
+};
diff --git a/packages/react-core/src/components/TextInput/examples/TextInputSelectUsingRef.tsx b/packages/react-core/src/components/TextInput/examples/TextInputSelectUsingRef.tsx
new file mode 100644
index 00000000000..b5bf30d7aa3
--- /dev/null
+++ b/packages/react-core/src/components/TextInput/examples/TextInputSelectUsingRef.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+import { TextInput } from '@patternfly/react-core';
+
+export const TextInputSelectUsingRef: React.FunctionComponent = () => {
+ const [value, setValue] = React.useState('select all on click');
+ const ref = React.useRef(null);
+ return (
+ ref?.current?.select()}
+ onChange={value => setValue(value)}
+ aria-label="select-all"
+ />
+ );
+};
diff --git a/packages/react-core/src/components/Title/__tests__/Title.test.tsx b/packages/react-core/src/components/Title/__tests__/Title.test.tsx
index 4e6160c52f1..ea2ca674758 100644
--- a/packages/react-core/src/components/Title/__tests__/Title.test.tsx
+++ b/packages/react-core/src/components/Title/__tests__/Title.test.tsx
@@ -1,25 +1,159 @@
import * as React from 'react';
import { render, screen } from '@testing-library/react';
-import { Title, TitleSizes } from '..';
-
-describe('Title', () => {
- Object.values(TitleSizes).forEach(size => {
- test(`${size} Title`, () => {
- const { asFragment } = render(
-
- {size} Title
-
- );
- expect(asFragment()).toMatchSnapshot();
- });
- });
-
- test('Heading level can be set using a string value', () => {
- render(
-
- H3 Heading
-
- );
- expect(screen.getByRole('heading').parentElement.querySelector('h3')).toBeInTheDocument();
- });
+import { Title } from '../Title';
+
+test('Renders without children', () => {
+ render(
+
+
+
+ );
+ expect(screen.getByTestId('title').firstChild).toBeVisible();
+});
+
+test('Renders children', () => {
+ render(Test );
+ expect(screen.getByText('Test')).toBeVisible();
+});
+
+test('Renders with the pf-c-title', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-c-title');
+});
+
+test('Renders with only the class pf-c-title and the heading level modifier class pf-m-2xl by default', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-c-title pf-m-2xl', { exact: true });
+});
+
+test('Renders with custom class name when className prop is passed', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('test-class');
+});
+
+test('Renders with class name pf-m-2xl by default when "h1" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-2xl');
+});
+
+test('Renders with class name pf-m-xl by default when "h2" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-xl');
+});
+
+test('Renders with class name pf-m-lg by default when "h3" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-lg');
+});
+
+test('Renders with class name pf-m-md by default when "h4" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-md');
+});
+
+test('Renders with class name pf-m-md by default when "h5" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-md');
+});
+
+test('Renders with class name pf-m-md by default when "h6" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-md');
+});
+
+test('Renders with class name pf-m-md when "md" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-md');
+});
+
+test('Renders with class name pf-m-lg when "lg" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-lg');
+});
+
+test('Renders with class name pf-m-xl when "xl" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-xl');
+});
+
+test('Renders with class name pf-m-2xl when "2xl" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-2xl');
+});
+
+test('Renders with class name pf-m-3xl when "3xl" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-3xl');
+});
+
+test('Renders with class name pf-m-4xl when "4xl" is passed as title size', () => {
+ render(
+
+ Test
+
+ );
+ expect(screen.getByRole('heading')).toHaveClass('pf-m-4xl');
+});
+
+test('Renders with tag name "h1" when "h1" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 1 })).toBeVisible();
+});
+
+test('Renders with tag name "h2" when "h2" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 2 })).toBeVisible();
+});
+
+test('Renders with tag name "h3" when "h3" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 3 })).toBeVisible();
+});
+
+test('Renders with tag name "h4" when "h4" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 4 })).toBeVisible();
+});
+
+test('Renders with tag name "h5" when "h5" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 5 })).toBeVisible();
+});
+
+test('Renders with tag name "h6" when "h6" is passed as heading level', () => {
+ render(Test );
+ expect(screen.getByRole('heading', { level: 6 })).toBeVisible();
+});
+
+test('Matches the snapshot', () => {
+ const { asFragment } = render(
+
+ Test
+
+ );
+ expect(asFragment()).toMatchSnapshot();
});
diff --git a/packages/react-core/src/components/Title/__tests__/__snapshots__/Title.test.tsx.snap b/packages/react-core/src/components/Title/__tests__/__snapshots__/Title.test.tsx.snap
index 22d6b37c393..8f68dec74c5 100644
--- a/packages/react-core/src/components/Title/__tests__/__snapshots__/Title.test.tsx.snap
+++ b/packages/react-core/src/components/Title/__tests__/__snapshots__/Title.test.tsx.snap
@@ -1,79 +1,14 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Title 2xl Title 1`] = `
+exports[`Matches the snapshot 1`] = `
- 2xl Title
+ Test
-`;
-
-exports[`Title 3xl Title 1`] = `
-
-
- 3xl Title
-
-
-`;
-
-exports[`Title 4xl Title 1`] = `
-
-
- 4xl Title
-
-
-`;
-
-exports[`Title lg Title 1`] = `
-
-
- lg Title
-
-
-`;
-
-exports[`Title md Title 1`] = `
-
-
- md Title
-
-
-`;
-
-exports[`Title xl Title 1`] = `
-
-
- xl Title
-
-
-`;
+`;
\ No newline at end of file
diff --git a/packages/react-core/src/components/Toolbar/ToolbarContent.tsx b/packages/react-core/src/components/Toolbar/ToolbarContent.tsx
index ec5f5c5acf6..a5003a378a2 100644
--- a/packages/react-core/src/components/Toolbar/ToolbarContent.tsx
+++ b/packages/react-core/src/components/Toolbar/ToolbarContent.tsx
@@ -17,14 +17,6 @@ export interface ToolbarContentProps extends React.HTMLProps {
xl?: 'hidden' | 'visible';
'2xl'?: 'hidden' | 'visible';
};
- /** @deprecated prop misspelled */
- visiblity?: {
- default?: 'hidden' | 'visible';
- md?: 'hidden' | 'visible';
- lg?: 'hidden' | 'visible';
- xl?: 'hidden' | 'visible';
- '2xl'?: 'hidden' | 'visible';
- };
/** Alignment at various breakpoints. */
alignment?: {
default?: 'alignRight' | 'alignLeft';
@@ -65,7 +57,6 @@ export class ToolbarContent extends React.Component {
isExpanded,
toolbarId,
visibility,
- visiblity,
alignment,
clearAllFilters,
showClearFiltersButton,
@@ -73,21 +64,13 @@ export class ToolbarContent extends React.Component {
...props
} = this.props;
- if (visiblity !== undefined) {
- // eslint-disable-next-line no-console
- console.warn(
- 'The ToolbarContent visiblity prop has been deprecated. ' +
- 'Please use the correctly spelled visibility prop instead.'
- );
- }
-
return (
{({ width, getBreakpoint }) => (
,
xl?: 'hidden' | 'visible';
'2xl'?: 'hidden' | 'visible';
};
- /** @deprecated prop misspelled */
- visiblity?: {
- default?: 'hidden' | 'visible';
- md?: 'hidden' | 'visible';
- lg?: 'hidden' | 'visible';
- xl?: 'hidden' | 'visible';
- '2xl'?: 'hidden' | 'visible';
- };
/** Alignment at various breakpoints. */
alignment?: {
default?: 'alignRight' | 'alignLeft';
@@ -63,26 +55,7 @@ export interface ToolbarGroupProps extends Omit
,
class ToolbarGroupWithRef extends React.Component {
render() {
- const {
- visibility,
- visiblity,
- alignment,
- spacer,
- spaceItems,
- className,
- variant,
- children,
- innerRef,
- ...props
- } = this.props;
-
- if (visiblity !== undefined) {
- // eslint-disable-next-line no-console
- console.warn(
- 'The ToolbarGroup visiblity prop has been deprecated. ' +
- 'Please use the correctly spelled visibility prop instead.'
- );
- }
+ const { visibility, alignment, spacer, spaceItems, className, variant, children, innerRef, ...props } = this.props;
return (
@@ -91,7 +64,7 @@ class ToolbarGroupWithRef extends React.Component {
className={css(
styles.toolbarGroup,
variant && styles.modifiers[toCamel(variant) as 'filterGroup' | 'iconButtonGroup' | 'buttonGroup'],
- formatBreakpointMods(visibility || visiblity, styles, '', getBreakpoint(width)),
+ formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
formatBreakpointMods(alignment, styles, '', getBreakpoint(width)),
formatBreakpointMods(spacer, styles, '', getBreakpoint(width)),
formatBreakpointMods(spaceItems, styles, '', getBreakpoint(width)),
diff --git a/packages/react-core/src/components/Toolbar/ToolbarItem.tsx b/packages/react-core/src/components/Toolbar/ToolbarItem.tsx
index 492cf4db707..d74c3d561d0 100644
--- a/packages/react-core/src/components/Toolbar/ToolbarItem.tsx
+++ b/packages/react-core/src/components/Toolbar/ToolbarItem.tsx
@@ -39,14 +39,6 @@ export interface ToolbarItemProps extends React.HTMLProps {
xl?: 'hidden' | 'visible';
'2xl'?: 'hidden' | 'visible';
};
- /** @deprecated prop misspelled */
- visiblity?: {
- default?: 'hidden' | 'visible';
- md?: 'hidden' | 'visible';
- lg?: 'hidden' | 'visible';
- xl?: 'hidden' | 'visible';
- '2xl'?: 'hidden' | 'visible';
- };
/** Alignment at various breakpoints. */
alignment?: {
default?: 'alignRight' | 'alignLeft';
@@ -84,7 +76,6 @@ export const ToolbarItem: React.FunctionComponent = ({
className,
variant,
visibility,
- visiblity,
alignment,
spacer,
widths,
@@ -97,14 +88,6 @@ export const ToolbarItem: React.FunctionComponent = ({
return ;
}
- if (visiblity !== undefined) {
- // eslint-disable-next-line no-console
- console.warn(
- 'The ToolbarItem visiblity prop has been deprecated. ' +
- 'Please use the correctly spelled visibility prop instead.'
- );
- }
-
const widthStyles: any = {};
if (widths) {
Object.entries(widths || {}).map(
@@ -130,7 +113,7 @@ export const ToolbarItem: React.FunctionComponent = ({
| 'chipGroup'
],
isAllExpanded && styles.modifiers.expanded,
- formatBreakpointMods(visibility || visiblity, styles, '', getBreakpoint(width)),
+ formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
formatBreakpointMods(alignment, styles, '', getBreakpoint(width)),
formatBreakpointMods(spacer, styles, '', getBreakpoint(width)),
className
diff --git a/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx b/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx
index 65ad8d3f9c8..e5040aad334 100644
--- a/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx
+++ b/packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx
@@ -22,14 +22,6 @@ export interface ToolbarToggleGroupProps extends ToolbarGroupProps {
xl?: 'hidden' | 'visible';
'2xl'?: 'hidden' | 'visible';
};
- /** @deprecated prop misspelled */
- visiblity?: {
- default?: 'hidden' | 'visible';
- md?: 'hidden' | 'visible';
- lg?: 'hidden' | 'visible';
- xl?: 'hidden' | 'visible';
- '2xl'?: 'hidden' | 'visible';
- };
/** Alignment at various breakpoints. */
alignment?: {
default?: 'alignRight' | 'alignLeft';
@@ -69,7 +61,6 @@ export class ToolbarToggleGroup extends React.Component
toggleIcon,
variant,
visibility,
- visiblity,
breakpoint,
alignment,
spacer,
@@ -84,14 +75,6 @@ export class ToolbarToggleGroup extends React.Component
console.error('ToolbarToggleGroup will not be visible without a breakpoint or toggleIcon.');
}
- if (visiblity !== undefined) {
- // eslint-disable-next-line no-console
- console.warn(
- 'The ToolbarToggleGroup visiblity prop has been deprecated. ' +
- 'Please use the correctly spelled visibility prop instead.'
- );
- }
-
return (
{({ width, getBreakpoint }) => (
@@ -123,7 +106,7 @@ export class ToolbarToggleGroup extends React.Component
variant &&
styles.modifiers[toCamel(variant) as 'filterGroup' | 'iconButtonGroup' | 'buttonGroup'],
formatBreakpointMods(breakpointMod, styles, '', getBreakpoint(width)),
- formatBreakpointMods(visibility || visiblity, styles, '', getBreakpoint(width)),
+ formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
formatBreakpointMods(alignment, styles, '', getBreakpoint(width)),
formatBreakpointMods(spacer, styles, '', getBreakpoint(width)),
formatBreakpointMods(spaceItems, styles, '', getBreakpoint(width)),
diff --git a/packages/react-core/src/helpers/Popper/Popper.tsx b/packages/react-core/src/helpers/Popper/Popper.tsx
index 0333f0431aa..3d45ebe4f44 100644
--- a/packages/react-core/src/helpers/Popper/Popper.tsx
+++ b/packages/react-core/src/helpers/Popper/Popper.tsx
@@ -181,7 +181,7 @@ export const Popper: React.FunctionComponent = ({
}
}, [reference]);
React.useEffect(() => {
- // When the popperRef is defined or the popper visiblity changes, ensure the popper element is up to date
+ // When the popperRef is defined or the popper visibility changes, ensure the popper element is up to date
if (popperRef) {
if ((popperRef as React.RefObject).current) {
setPopperElement((popperRef as React.RefObject).current);
diff --git a/packages/react-core/src/helpers/constants.ts b/packages/react-core/src/helpers/constants.ts
index c2af79bd2dc..28d65f13de3 100644
--- a/packages/react-core/src/helpers/constants.ts
+++ b/packages/react-core/src/helpers/constants.ts
@@ -10,8 +10,6 @@ import globalHeightBreakpointLg from '@patternfly/react-tokens/dist/esm/global_h
import globalHeightBreakpointXl from '@patternfly/react-tokens/dist/esm/global_height_breakpoint_xl';
import globalHeightBreakpoint2xl from '@patternfly/react-tokens/dist/esm/global_height_breakpoint_2xl';
-export const KEY_CODES = { ARROW_UP: 38, ARROW_DOWN: 40, ESCAPE_KEY: 27, TAB: 9, ENTER: 13, SPACE: 32 };
-
export const SIDE = { RIGHT: 'right', LEFT: 'left', BOTH: 'both', NONE: 'none' };
export const KEYHANDLER_DIRECTION = { UP: 'up', DOWN: 'down', RIGHT: 'right', LEFT: 'left' };
diff --git a/packages/react-core/src/next/components/Dropdown/Dropdown.tsx b/packages/react-core/src/next/components/Dropdown/Dropdown.tsx
index f61e9c66672..7b26cfb63fb 100644
--- a/packages/react-core/src/next/components/Dropdown/Dropdown.tsx
+++ b/packages/react-core/src/next/components/Dropdown/Dropdown.tsx
@@ -23,9 +23,11 @@ export interface DropdownProps extends MenuProps {
isScrollable?: boolean;
/** Min width of the menu. */
minWidth?: string;
+ /** @hide Forwarded ref */
+ innerRef?: React.Ref;
}
-export const Dropdown: React.FunctionComponent = ({
+const DropdownBase: React.FunctionComponent = ({
children,
className,
onSelect,
@@ -35,13 +37,14 @@ export const Dropdown: React.FunctionComponent = ({
isPlain,
isScrollable,
minWidth,
+ innerRef,
...props
}: DropdownProps) => {
const localMenuRef = React.useRef();
const toggleRef = React.useRef();
const containerRef = React.useRef();
- const menuRef = (props.innerRef as React.RefObject) || localMenuRef;
+ const menuRef = (innerRef as React.RefObject) || localMenuRef;
React.useEffect(() => {
const handleMenuKeys = (event: KeyboardEvent) => {
if (!isOpen && toggleRef.current?.contains(event.target as Node)) {
@@ -112,4 +115,8 @@ export const Dropdown: React.FunctionComponent = ({
);
};
+
+export const Dropdown = React.forwardRef((props: DropdownProps, ref: React.Ref) => (
+
+));
Dropdown.displayName = 'Dropdown';
diff --git a/packages/react-core/src/next/components/Dropdown/examples/DropdownBasic.tsx b/packages/react-core/src/next/components/Dropdown/examples/DropdownBasic.tsx
index 4627344197f..d0dac9e1567 100644
--- a/packages/react-core/src/next/components/Dropdown/examples/DropdownBasic.tsx
+++ b/packages/react-core/src/next/components/Dropdown/examples/DropdownBasic.tsx
@@ -4,7 +4,6 @@ import { Divider, MenuToggle } from '@patternfly/react-core';
export const DropdownBasic: React.FunctionComponent = () => {
const [isOpen, setIsOpen] = React.useState(false);
- const menuRef = React.useRef(null);
const onToggleClick = () => {
setIsOpen(!isOpen);
@@ -18,7 +17,6 @@ export const DropdownBasic: React.FunctionComponent = () => {
return (
setIsOpen(isOpen)}
diff --git a/packages/react-core/src/next/components/Dropdown/examples/DropdownWithDescriptions.tsx b/packages/react-core/src/next/components/Dropdown/examples/DropdownWithDescriptions.tsx
index e675975046b..801381081eb 100644
--- a/packages/react-core/src/next/components/Dropdown/examples/DropdownWithDescriptions.tsx
+++ b/packages/react-core/src/next/components/Dropdown/examples/DropdownWithDescriptions.tsx
@@ -4,7 +4,6 @@ import { MenuToggle } from '@patternfly/react-core';
export const DropdownWithDescriptions: React.FunctionComponent = () => {
const [isOpen, setIsOpen] = React.useState(false);
- const menuRef = React.useRef(null);
const onToggleClick = () => {
setIsOpen(!isOpen);
@@ -18,7 +17,6 @@ export const DropdownWithDescriptions: React.FunctionComponent = () => {
return (
{
const [isOpen, setIsOpen] = React.useState(false);
- const menuRef = React.useRef(null);
const onToggleClick = () => {
setIsOpen(!isOpen);
@@ -18,7 +17,6 @@ export const DropdownWithGroups: React.FunctionComponent = () => {
return (
setIsOpen(isOpen)}
diff --git a/packages/react-core/src/next/components/Dropdown/examples/DropdownWithKebabToggle.tsx b/packages/react-core/src/next/components/Dropdown/examples/DropdownWithKebabToggle.tsx
index 22f0d584b40..153b3e706ec 100644
--- a/packages/react-core/src/next/components/Dropdown/examples/DropdownWithKebabToggle.tsx
+++ b/packages/react-core/src/next/components/Dropdown/examples/DropdownWithKebabToggle.tsx
@@ -5,7 +5,6 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
export const DropdownWithKebab: React.FunctionComponent = () => {
const [isOpen, setIsOpen] = React.useState(false);
- const menuRef = React.useRef(null);
const onToggleClick = () => {
setIsOpen(!isOpen);
@@ -19,7 +18,6 @@ export const DropdownWithKebab: React.FunctionComponent = () => {
return (
{
Aria-disabled with tooltip
-
+
Small button
-
+
Large button
diff --git a/packages/react-integration/demo-app-ts/src/components/demos/JumpLinksDemo/JumpLinksDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/JumpLinksDemo/JumpLinksDemo.tsx
index c5739e0a211..269261b1b49 100644
--- a/packages/react-integration/demo-app-ts/src/components/demos/JumpLinksDemo/JumpLinksDemo.tsx
+++ b/packages/react-integration/demo-app-ts/src/components/demos/JumpLinksDemo/JumpLinksDemo.tsx
@@ -6,7 +6,7 @@ export const JumpLinksDemo = () => {
return (
-
+
{headings.map(i => (
diff --git a/packages/react-integration/demo-app-ts/src/components/demos/ToolbarDemo/ToolbarVisiblityDemo.tsx b/packages/react-integration/demo-app-ts/src/components/demos/ToolbarDemo/ToolbarVisiblityDemo.tsx
deleted file mode 100644
index b1eec04fcfc..00000000000
--- a/packages/react-integration/demo-app-ts/src/components/demos/ToolbarDemo/ToolbarVisiblityDemo.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-import React from 'react';
-import { Toolbar, ToolbarContent, ToolbarGroup, ToolbarItem, ToolbarToggleGroup } from '@patternfly/react-core';
-import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
-
-export class ToolbarVisiblityDemo extends React.Component {
- static displayName = 'ToolbarVisibilityDemo';
-
- render() {
- const toolbarContents = (
-
- ToolbarContent visiblity sm
-
- ToolbarContent visiblity md
-
-
- ToolbarContent visiblity lg
-
-
- ToolbarContent visiblity xl
-
-
- ToolbarContent visiblity 2xl
-
-
- );
-
- const toolbarGroups = (
-
- ToolbarGroup visiblity sm
-
- ToolbarGroup visiblity md
-
-
- ToolbarGroup visiblity lg
-
-
- ToolbarGroup visiblity xl
-
- ToolbarGroup visiblity 2xl
-
- );
-
- const toolbarItems = (
-
- ToolbarItem visiblity sm
-
- ToolbarItem visiblity md
-
-
- ToolbarItem visiblity lg
-
-
- ToolbarItem visiblity xl
-
- ToolbarItem visiblity 2xl
-
- );
-
- const toolbarToggleGroups = (
-
-
-
- }
- breakpoint="md"
- visiblity={{ default: 'visible', md: 'hidden' }}
- >
- ToolbarToggleGroup visiblity sm
-
-
-
-
-
- }
- breakpoint="lg"
- visiblity={{ default: 'hidden', md: 'visible', lg: 'hidden' }}
- >
- ToolbarToggleGroup visiblity md
-
-
-
-
-
- }
- breakpoint="xl"
- visiblity={{ default: 'hidden', lg: 'visible', xl: 'hidden' }}
- >
- ToolbarToggleGroup visiblity lg
-
-
-
-
-
- }
- breakpoint="2xl"
- visiblity={{ default: 'hidden', xl: 'visible', '2xl': 'hidden' }}
- >
- ToolbarToggleGroup visiblity xl
-
-
-
-
-
- }
- breakpoint="md"
- visiblity={{ default: 'hidden', '2xl': 'visible' }}
- >
- ToolbarToggleGroup visiblity 2xl
-
-
-
-
- );
-
- return (
-
- {toolbarContents}
-
- {toolbarGroups}
-
-
- {toolbarItems}
-
- {toolbarToggleGroups}
-
- );
- }
-}
diff --git a/packages/react-integration/demo-app-ts/src/components/demos/index.ts b/packages/react-integration/demo-app-ts/src/components/demos/index.ts
index 3fbf2ba8693..edf3e6f641c 100644
--- a/packages/react-integration/demo-app-ts/src/components/demos/index.ts
+++ b/packages/react-integration/demo-app-ts/src/components/demos/index.ts
@@ -23,7 +23,6 @@ export * from './ToolbarDemo/ToolbarDemo';
export * from './DescriptionListDemo/DescriptionListDemo';
export * from './DescriptionListDemo/DescriptionListBreakpointsDemo';
export * from './ToolbarDemo/ToolbarVisibilityDemo';
-export * from './ToolbarDemo/ToolbarVisiblityDemo';
export * from './DrawerDemo/DrawerDemo';
export * from './DrawerDemo/DrawerResizeDemo';
export * from './DropdownDemo/DropdownDemo';
diff --git a/packages/react-log-viewer/CHANGELOG.md b/packages/react-log-viewer/CHANGELOG.md
index 34c45896d0b..41838c326bb 100644
--- a/packages/react-log-viewer/CHANGELOG.md
+++ b/packages/react-log-viewer/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.87.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.29...@patternfly/react-log-viewer@4.87.30) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.28...@patternfly/react-log-viewer@4.87.29) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.28](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.27...@patternfly/react-log-viewer@4.87.28) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.26...@patternfly/react-log-viewer@4.87.27) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.25...@patternfly/react-log-viewer@4.87.26) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.24...@patternfly/react-log-viewer@4.87.25) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.23...@patternfly/react-log-viewer@4.87.24) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## 4.87.23 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
+## [4.87.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.21...@patternfly/react-log-viewer@4.87.22) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-log-viewer
+
+
+
+
+
## [4.87.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-log-viewer@4.87.20...@patternfly/react-log-viewer@4.87.21) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-log-viewer
diff --git a/packages/react-log-viewer/package.json b/packages/react-log-viewer/package.json
index b924289cc91..ad96138e1f2 100644
--- a/packages/react-log-viewer/package.json
+++ b/packages/react-log-viewer/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-log-viewer",
- "version": "4.87.21",
+ "version": "4.87.30",
"description": "Terminal renderer",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -29,7 +29,7 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-icons": "^4.92.6",
"@patternfly/react-styles": "^4.91.6",
"memoize-one": "^5.1.0",
diff --git a/packages/react-table/CHANGELOG.md b/packages/react-table/CHANGELOG.md
index 5f180d2d534..53c14119526 100644
--- a/packages/react-table/CHANGELOG.md
+++ b/packages/react-table/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.111.13](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.12...@patternfly/react-table@4.111.13) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.12](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.11...@patternfly/react-table@4.111.12) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.11](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.10...@patternfly/react-table@4.111.11) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.10](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.9...@patternfly/react-table@4.111.10) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.9](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.8...@patternfly/react-table@4.111.9) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.8](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.7...@patternfly/react-table@4.111.8) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.6...@patternfly/react-table@4.111.7) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## 4.111.6 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
+## [4.111.5](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.4...@patternfly/react-table@4.111.5) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-table
+
+
+
+
+
## [4.111.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-table@4.111.3...@patternfly/react-table@4.111.4) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-table
diff --git a/packages/react-table/package.json b/packages/react-table/package.json
index 0a9f447c1e3..ceb56c7127e 100644
--- a/packages/react-table/package.json
+++ b/packages/react-table/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-table",
- "version": "4.111.4",
+ "version": "4.111.13",
"description": "This library provides a set of React table components for use with the PatternFly 4",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -31,7 +31,7 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-icons": "^4.92.6",
"@patternfly/react-styles": "^4.91.6",
"@patternfly/react-tokens": "^4.93.6",
diff --git a/packages/react-table/src/docs/examples/ComposableTableStickyToolbar.tsx b/packages/react-table/src/docs/examples/ComposableTableStickyToolbar.tsx
index 51d6f44d719..217dec6887f 100644
--- a/packages/react-table/src/docs/examples/ComposableTableStickyToolbar.tsx
+++ b/packages/react-table/src/docs/examples/ComposableTableStickyToolbar.tsx
@@ -168,7 +168,7 @@ export const ComposableTableStickyColumnsAndHeader: React.FunctionComponent = ()
}
groupProps={{
- sticky: 'top'
+ stickyOnBreakpoint: { default: 'top' }
}}
>
diff --git a/packages/react-topology/CHANGELOG.md b/packages/react-topology/CHANGELOG.md
index 422d8093fd6..2202c97cfdf 100644
--- a/packages/react-topology/CHANGELOG.md
+++ b/packages/react-topology/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.88.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.34...@patternfly/react-topology@4.88.35) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.33...@patternfly/react-topology@4.88.34) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.32...@patternfly/react-topology@4.88.33) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.31...@patternfly/react-topology@4.88.32) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.30...@patternfly/react-topology@4.88.31) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.29...@patternfly/react-topology@4.88.30) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.28...@patternfly/react-topology@4.88.29) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## 4.88.28 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
+## [4.88.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.26...@patternfly/react-topology@4.88.27) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-topology
+
+
+
+
+
## [4.88.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-topology@4.88.25...@patternfly/react-topology@4.88.26) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-topology
diff --git a/packages/react-topology/package.json b/packages/react-topology/package.json
index 16b91b0d70a..888b6557c1a 100644
--- a/packages/react-topology/package.json
+++ b/packages/react-topology/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-topology",
- "version": "4.88.26",
+ "version": "4.88.35",
"description": "This library provides a set of React topology view components for use with the PatternFly 4",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -28,7 +28,7 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-icons": "^4.92.6",
"@patternfly/react-styles": "^4.91.6",
"@types/d3": "^5.7.2",
diff --git a/packages/react-virtualized-extension/CHANGELOG.md b/packages/react-virtualized-extension/CHANGELOG.md
index 9c258fb74c7..77dac481676 100644
--- a/packages/react-virtualized-extension/CHANGELOG.md
+++ b/packages/react-virtualized-extension/CHANGELOG.md
@@ -3,6 +3,78 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [4.88.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.34...@patternfly/react-virtualized-extension@4.88.35) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.33...@patternfly/react-virtualized-extension@4.88.34) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.32...@patternfly/react-virtualized-extension@4.88.33) (2022-10-13)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.31...@patternfly/react-virtualized-extension@4.88.32) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.30...@patternfly/react-virtualized-extension@4.88.31) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.29...@patternfly/react-virtualized-extension@4.88.30) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.28...@patternfly/react-virtualized-extension@4.88.29) (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## 4.88.28 (2022-10-12)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
+## [4.88.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.26...@patternfly/react-virtualized-extension@4.88.27) (2022-10-10)
+
+**Note:** Version bump only for package @patternfly/react-virtualized-extension
+
+
+
+
+
## [4.88.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-virtualized-extension@4.88.25...@patternfly/react-virtualized-extension@4.88.26) (2022-10-05)
**Note:** Version bump only for package @patternfly/react-virtualized-extension
diff --git a/packages/react-virtualized-extension/package.json b/packages/react-virtualized-extension/package.json
index 4b7776b2723..346d712fa70 100644
--- a/packages/react-virtualized-extension/package.json
+++ b/packages/react-virtualized-extension/package.json
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-virtualized-extension",
- "version": "4.88.26",
+ "version": "4.88.35",
"description": "This library provides efficient rendering extensions for PatternFly 4 React tables and lists.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
@@ -30,7 +30,7 @@
"clean": "rimraf dist"
},
"dependencies": {
- "@patternfly/react-core": "^4.250.1",
+ "@patternfly/react-core": "^4.251.1",
"@patternfly/react-icons": "^4.92.6",
"@patternfly/react-styles": "^4.91.6",
"linear-layout-vector": "0.0.1",
diff --git a/yarn.lock b/yarn.lock
index e4b77fbb98d..f6eb1461a40 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3525,10 +3525,10 @@
acorn-static-class-features "^1.0.0"
astring "^1.7.5"
-"@patternfly/documentation-framework@1.2.34":
- version "1.2.34"
- resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-1.2.34.tgz#4d38f0dcd1b54d3c5b19f9f68ec37e3c1d23ceff"
- integrity sha512-pqeSuiHH37dVm107BB4RhsTRwvqSxM7EwaS8/nWI3KSQRVjmZ7TboWpQ71xQaXat+6OVtxDHF2sqMdg0KZZJCg==
+"@patternfly/documentation-framework@1.2.44":
+ version "1.2.44"
+ resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-1.2.44.tgz#7a7b4c486bb978973490b619900fdad68aa50bd2"
+ integrity sha512-t7Zp/4BI1QLia95Vjf3pwkJ5WlfqeIdYAvWipluIm/TvnymU/qgJYOdJiEUhc8KIN0S/lIbnSk8YfqlPhxmDPA==
dependencies:
"@babel/core" "7.18.2"
"@babel/plugin-proposal-class-properties" "7.17.12"