diff --git a/.github/ISSUE_TEMPLATE/PF6_alpha_bug_request.md b/.github/ISSUE_TEMPLATE/PF6_alpha_bug_request.md new file mode 100644 index 00000000000..1251cfa2a1f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/PF6_alpha_bug_request.md @@ -0,0 +1,17 @@ +--- +name: PF6 alpha bug +about: Report a bug discovered while testing the PatternFly 6 alphas +title: "[short description]" +labels: 'v6 alpha bug' +assignees: '' + +--- + +**Please describe the issue** + +**Are there visuals for this issue? Please provide screenshots** +Include screenshots or links to Marvel or other mockups. + +**Could you point to a branch or draft PR where this issue exists? Please provide a link to the code** + +**Any other information?** diff --git a/.gitignore b/.gitignore index ac4282c4b23..07168936c32 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ lerna-debug.log .vscode # For vim *.swp +.yarn diff --git a/README.md b/README.md index 2ae010662f7..e5ae0c36ebb 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,4 @@ All React contributors must first be [PatternFly community contributors](https:/ ### License PatternFly React is licensed under the [MIT License](https://github.com/patternfly/patternfly-react/tree/main/LICENSE). + diff --git a/babel.config.js b/babel.config.js index c03fd5c5ab3..a5caef7249f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,20 +1,4 @@ module.exports = { - presets: [ - [ - '@babel/preset-env', - { - targets: { - esmodules: true - } - } - ], - '@babel/preset-typescript', - '@babel/preset-react' - ], - plugins: [ - ['@babel/plugin-proposal-decorators', { legacy: true }], - '@babel/plugin-proposal-optional-chaining', - '@babel/plugin-proposal-class-properties', - '@babel/plugin-proposal-object-rest-spread' - ] + presets: ['@babel/preset-typescript', '@babel/preset-react'], + plugins: ['@babel/plugin-transform-modules-commonjs'] }; diff --git a/jest.config.js b/jest.config.js index c3669208009..eac3fcc7b65 100644 --- a/jest.config.js +++ b/jest.config.js @@ -14,13 +14,11 @@ module.exports = { '^.+\\.svg$': 'jest-transform-stub' }, setupFilesAfterEnv: ['/packages/testSetup.ts'], - transformIgnorePatterns: [ - 'node_modules/(?!@patternfly|@novnc|@popperjs|lodash|monaco-editor|react-monaco-editor|case-anything)' - ], testPathIgnorePatterns: ['/packages/react-integration/'], coveragePathIgnorePatterns: ['/dist/'], moduleNameMapper: { '\\.(css|less)$': '/packages/react-styles/__mocks__/styleMock.js' }, - testEnvironment: 'jsdom' + testEnvironment: 'jsdom', + transformIgnorePatterns: ['/node_modules/(?!(case-anything)/)'] }; diff --git a/package.json b/package.json index 7c4fd7f5c0f..f3f6b761f97 100644 --- a/package.json +++ b/package.json @@ -24,16 +24,10 @@ }, "homepage": "https://github.com/patternfly/patternfly-react#readme", "devDependencies": { - "@babel/core": "^7.21.8", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-decorators": "^7.21.0", - "@babel/plugin-proposal-object-rest-spread": "^7.20.7", - "@babel/plugin-proposal-optional-chaining": "^7.21.0", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.21.0", - "@babel/preset-env": "^7.21.5", - "@babel/preset-react": "^7.18.6", - "@babel/preset-typescript": "^7.21.5", + "@babel/core": "^7.24.3", + "@babel/plugin-transform-modules-commonjs": "^7.24.1", + "@babel/preset-react": "^7.24.1", + "@babel/preset-typescript": "^7.24.1", "@octokit/rest": "^20.0.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", @@ -43,8 +37,7 @@ "@types/react-dom": "^18", "@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/parser": "^5.59.2", - "babel-jest": "^27.2.5", - "jest-transform-stub": "^2.0.0", + "babel-jest": "^29.7.0", "concurrently": "^7.6.0", "eslint": "^8.39.0", "eslint-plugin-markdown": "^3.0.0", @@ -56,6 +49,7 @@ "husky": "^4.3.0", "jest": "27.2.5", "jest-cli": "27.2.5", + "jest-transform-stub": "^2.0.0", "lerna": "^7.1.5", "lint-staged": "^14.0.0", "mutation-observer": "^1.0.3", @@ -64,6 +58,7 @@ "react": "^18", "react-dom": "^18", "surge": "^0.23.1", + "ts-node": "^10.9.1", "ts-patch": "^2.1.0", "typescript": "^4.7.4", "ts-node": "^10.9.1" diff --git a/packages/eslint-plugin-patternfly-react/CHANGELOG.md b/packages/eslint-plugin-patternfly-react/CHANGELOG.md index 97612f089a0..7c8c1d1c41b 100644 --- a/packages/eslint-plugin-patternfly-react/CHANGELOG.md +++ b/packages/eslint-plugin-patternfly-react/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# 5.3.0-prerelease.0 (2024-02-02) + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package eslint-plugin-patternfly-react + +## 5.2.1 (2024-02-02) + +**Note:** Version bump only for package eslint-plugin-patternfly-react + +## 5.2.1-prerelease.0 (2024-02-02) + +### Reverts + +- Revert release attempt (#10062) ([1cd0691](https://github.com/patternfly/patternfly-react/commit/1cd0691ebc90b323682c54b43295a6afd174a120)), closes [#10062](https://github.com/patternfly/patternfly-react/issues/10062) + # 5.2.0-alpha.1 (2024-03-08) **Note:** Version bump only for package eslint-plugin-patternfly-react diff --git a/packages/react-charts/CHANGELOG.md b/packages/react-charts/CHANGELOG.md index 616c9ffae15..aff3aa06dea 100644 --- a/packages/react-charts/CHANGELOG.md +++ b/packages/react-charts/CHANGELOG.md @@ -3,6 +3,62 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# 7.3.0-prerelease.6 (2024-03-26) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.3.0-prerelease.5 (2024-03-22) + +**Note:** Version bump only for package @patternfly/react-charts + +# [7.3.0-prerelease.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-charts@7.3.0-prerelease.3...@patternfly/react-charts@7.3.0-prerelease.4) (2024-03-05) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.3.0-prerelease.3 (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.3.0-prerelease.2 (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.3.0-prerelease.1 (2024-02-14) + +### Bug Fixes + +- **charts:** adjust for Victory types changes ([#10082](https://github.com/patternfly/patternfly-react/issues/10082)) ([714eaca](https://github.com/patternfly/patternfly-react/commit/714eaca02f99f709a6aadc1d9dd58d25940f7403)) + +# 7.3.0-prerelease.0 (2024-02-02) + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0-prerelease.10 (2024-01-15) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0-prerelease.9 (2024-01-11) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0-prerelease.8 (2023-12-11) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0-prerelease.7 (2023-11-10) + +**Note:** Version bump only for package @patternfly/react-charts + +# 7.2.0-prerelease.6 (2023-11-03) + +**Note:** Version bump only for package @patternfly/react-charts + # 8.0.0-alpha.19 (2024-04-02) **Note:** Version bump only for package @patternfly/react-charts diff --git a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.tsx b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.tsx index 19ca376359c..3599291d927 100644 --- a/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.tsx +++ b/packages/react-charts/src/components/ChartLegendTooltip/ChartLegendTooltip.tsx @@ -28,7 +28,7 @@ import { getTheme } from '../ChartUtils/chart-theme'; * * See https://github.com/FormidableLabs/victory/blob/main/packages/victory-tooltip/src/index.d.ts */ -export interface ChartLegendTooltipProps extends ChartCursorTooltipProps { +export interface ChartLegendTooltipProps extends Omit { /** * The active prop specifies whether the tooltip component should be displayed. */ @@ -295,8 +295,11 @@ export interface ChartLegendTooltipProps extends ChartCursorTooltipProps { themeColor?: string; /** * The title prop specifies a title to render with the legend. + * + * @propType number | string | Function | string[] + * @example title={(datum) => datum.x} */ - title?: string; + title?: string[] | StringOrNumberOrCallback; /** * This prop refers to the width of the svg that ChartLegendTooltip is rendered within. This prop is passed from * parents of ChartLegendTooltip, and should not be set manually. In versions before ^33.0.0 this prop referred to the diff --git a/packages/react-code-editor/CHANGELOG.md b/packages/react-code-editor/CHANGELOG.md index 5fc0452a4ee..28aaae56f17 100644 --- a/packages/react-code-editor/CHANGELOG.md +++ b/packages/react-code-editor/CHANGELOG.md @@ -3,6 +3,256 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.3.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.26...@patternfly/react-code-editor@5.3.0-prerelease.27) (2024-04-09) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.25...@patternfly/react-code-editor@5.3.0-prerelease.26) (2024-04-08) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.24...@patternfly/react-code-editor@5.3.0-prerelease.25) (2024-04-01) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.3.0-prerelease.24 (2024-03-29) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.22...@patternfly/react-code-editor@5.3.0-prerelease.23) (2024-03-28) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.21...@patternfly/react-code-editor@5.3.0-prerelease.22) (2024-03-28) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.20...@patternfly/react-code-editor@5.3.0-prerelease.21) (2024-03-27) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.19...@patternfly/react-code-editor@5.3.0-prerelease.20) (2024-03-27) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.18...@patternfly/react-code-editor@5.3.0-prerelease.19) (2024-03-27) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.18](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.17...@patternfly/react-code-editor@5.3.0-prerelease.18) (2024-03-26) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.3.0-prerelease.17 (2024-03-26) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.16](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.15...@patternfly/react-code-editor@5.3.0-prerelease.16) (2024-03-26) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.15](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.14...@patternfly/react-code-editor@5.3.0-prerelease.15) (2024-03-26) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.14](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.13...@patternfly/react-code-editor@5.3.0-prerelease.14) (2024-03-25) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.13](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.12...@patternfly/react-code-editor@5.3.0-prerelease.13) (2024-03-22) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.3.0-prerelease.12 (2024-03-20) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.11](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.10...@patternfly/react-code-editor@5.3.0-prerelease.11) (2024-03-15) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.10](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.9...@patternfly/react-code-editor@5.3.0-prerelease.10) (2024-03-12) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.3.0-prerelease.9 (2024-03-11) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.8](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.7...@patternfly/react-code-editor@5.3.0-prerelease.8) (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.6...@patternfly/react-code-editor@5.3.0-prerelease.7) (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.6](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.5...@patternfly/react-code-editor@5.3.0-prerelease.6) (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.5](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.4...@patternfly/react-code-editor@5.3.0-prerelease.5) (2024-02-27) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.3...@patternfly/react-code-editor@5.3.0-prerelease.4) (2024-02-26) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.2...@patternfly/react-code-editor@5.3.0-prerelease.3) (2024-02-19) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.3.0-prerelease.2](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.3.0-prerelease.1...@patternfly/react-code-editor@5.3.0-prerelease.2) (2024-02-19) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.3.0-prerelease.1 (2024-02-15) + +### Features + +- **CodeEditor:** pass additional props to monaco-editor, update readme ([#10080](https://github.com/patternfly/patternfly-react/issues/10080)) ([8c43ef7](https://github.com/patternfly/patternfly-react/commit/8c43ef7bfc044396a0bf31985b2ba3e4b4de91ef)) + +# 5.3.0-prerelease.0 (2024-02-02) + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.2.0-prerelease.51 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.2.0-prerelease.50 (2024-01-29) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.49](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.48...@patternfly/react-code-editor@5.2.0-prerelease.49) (2024-01-17) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# 5.2.0-prerelease.48 (2024-01-16) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.47](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.46...@patternfly/react-code-editor@5.2.0-prerelease.47) (2024-01-15) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.46](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.45...@patternfly/react-code-editor@5.2.0-prerelease.46) (2024-01-11) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.45](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.44...@patternfly/react-code-editor@5.2.0-prerelease.45) (2024-01-10) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.44](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.43...@patternfly/react-code-editor@5.2.0-prerelease.44) (2024-01-09) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.43](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.42...@patternfly/react-code-editor@5.2.0-prerelease.43) (2024-01-08) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.42](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.41...@patternfly/react-code-editor@5.2.0-prerelease.42) (2024-01-05) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.41](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.40...@patternfly/react-code-editor@5.2.0-prerelease.41) (2024-01-05) + +### Features + +- **CodeEditor:** use new monaco package ([#9842](https://github.com/patternfly/patternfly-react/issues/9842)) ([54dd134](https://github.com/patternfly/patternfly-react/commit/54dd134d6c67c4fc1d7630fd1e7c718f66061342)) + +# [5.2.0-prerelease.40](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.39...@patternfly/react-code-editor@5.2.0-prerelease.40) (2024-01-04) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.39](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.38...@patternfly/react-code-editor@5.2.0-prerelease.39) (2024-01-03) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.38](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.37...@patternfly/react-code-editor@5.2.0-prerelease.38) (2024-01-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.37](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.36...@patternfly/react-code-editor@5.2.0-prerelease.37) (2023-12-20) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.36](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.35...@patternfly/react-code-editor@5.2.0-prerelease.36) (2023-12-14) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.34...@patternfly/react-code-editor@5.2.0-prerelease.35) (2023-12-11) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.33...@patternfly/react-code-editor@5.2.0-prerelease.34) (2023-12-07) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.32...@patternfly/react-code-editor@5.2.0-prerelease.33) (2023-12-06) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.31...@patternfly/react-code-editor@5.2.0-prerelease.32) (2023-11-21) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.30...@patternfly/react-code-editor@5.2.0-prerelease.31) (2023-11-17) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.29...@patternfly/react-code-editor@5.2.0-prerelease.30) (2023-11-16) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.28...@patternfly/react-code-editor@5.2.0-prerelease.29) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.28](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.27...@patternfly/react-code-editor@5.2.0-prerelease.28) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.26...@patternfly/react-code-editor@5.2.0-prerelease.27) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.25...@patternfly/react-code-editor@5.2.0-prerelease.26) (2023-11-13) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.24...@patternfly/react-code-editor@5.2.0-prerelease.25) (2023-11-10) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.23...@patternfly/react-code-editor@5.2.0-prerelease.24) (2023-11-03) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.22...@patternfly/react-code-editor@5.2.0-prerelease.23) (2023-11-03) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.21...@patternfly/react-code-editor@5.2.0-prerelease.22) (2023-11-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.20...@patternfly/react-code-editor@5.2.0-prerelease.21) (2023-11-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + +# [5.2.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.19...@patternfly/react-code-editor@5.2.0-prerelease.20) (2023-11-02) + +**Note:** Version bump only for package @patternfly/react-code-editor + # [6.0.0-alpha.50](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.0.0-alpha.49...@patternfly/react-code-editor@6.0.0-alpha.50) (2024-04-02) **Note:** Version bump only for package @patternfly/react-code-editor diff --git a/packages/react-code-editor/README.md b/packages/react-code-editor/README.md index c1ba2ea1e39..9c9343c4cb5 100644 --- a/packages/react-code-editor/README.md +++ b/packages/react-code-editor/README.md @@ -26,7 +26,19 @@ yarn add @patternfly/react-code-editor or ``` -npm install @patternfly/react-code-editor --save +npm install @patternfly/react-code-editor +``` + +[!NOTE] For TypeScript type definitions, this package uses the `monaco-editor` package as a peer dependency. So, if you need types and don't already have the `monaco-editor package` installed, you will need to do so: + +``` +yarn add --dev monaco-editor +``` + +or + +``` +npm install --dev monaco-editor ``` ### Usage @@ -43,14 +55,6 @@ import '@patternfly/react-core/dist/styles/base.css'; import { CodeEditor } from '@patternfly/react-code-editor'; ``` -Install peer deps - -```json -"monaco-editor": "^0.21.3", -"react": "^17 || ^18", -"react-dom": "^17 || ^18" -``` - #### With create-react-app Projects If you created your project with `create-react-app` you'll have some extra work to do, or you wont have syntax highlighting. Using the webpack plugin requires updating your webpack config, which `create-react-app` abstracts away. You can `npm eject` your project, but you may not want to do that. To keep your app set up in the `create-react-app` style but to get access to your webpack config you can use `react-app-rewired`. diff --git a/packages/react-code-editor/package.json b/packages/react-code-editor/package.json index 8e267b8faee..56224581737 100644 --- a/packages/react-code-editor/package.json +++ b/packages/react-code-editor/package.json @@ -42,6 +42,7 @@ "react-dom": "^17 || ^18" }, "devDependencies": { + "monaco-editor": "^0.47.0", "rimraf": "^2.6.2", "typescript": "^4.7.4" } diff --git a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx index 9aab8cc69a4..ac7fc3f5d4b 100644 --- a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx @@ -16,7 +16,7 @@ import { TooltipPosition } from '@patternfly/react-core'; import Editor, { EditorProps, Monaco } from '@monaco-editor/react'; -import { editor } from 'monaco-editor/esm/vs/editor/editor.api'; +import type { editor } from 'monaco-editor'; import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon'; import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon'; diff --git a/packages/react-core/CHANGELOG.md b/packages/react-core/CHANGELOG.md index 0a893b5a2d2..a03bed4ec0e 100644 --- a/packages/react-core/CHANGELOG.md +++ b/packages/react-core/CHANGELOG.md @@ -3,6 +3,327 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.3.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.24...@patternfly/react-core@5.3.0-prerelease.25) (2024-04-09) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.3.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.23...@patternfly/react-core@5.3.0-prerelease.24) (2024-04-08) + +### Features + +- **MenuToggle:** allow split action toggle text ([#10256](https://github.com/patternfly/patternfly-react/issues/10256)) ([afd3b85](https://github.com/patternfly/patternfly-react/commit/afd3b85ef307117784527740d6ae6d442055fbb0)) + +# [5.3.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.22...@patternfly/react-core@5.3.0-prerelease.23) (2024-04-01) + +### Bug Fixes + +- **GenerateId:** revert default behavior change ([#10232](https://github.com/patternfly/patternfly-react/issues/10232)) ([eed19ab](https://github.com/patternfly/patternfly-react/commit/eed19ab298e7c4686fc89436dc0fe04e078ddf8d)) + +# 5.3.0-prerelease.22 (2024-03-29) + +### Features + +- **Label:** allow clickable labels to be disabled ([#10199](https://github.com/patternfly/patternfly-react/issues/10199)) ([fda9ced](https://github.com/patternfly/patternfly-react/commit/fda9ced579ea0a19ed3f52fa9e06b33aad4210f2)) + +# [5.3.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.20...@patternfly/react-core@5.3.0-prerelease.21) (2024-03-28) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.3.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.19...@patternfly/react-core@5.3.0-prerelease.20) (2024-03-28) + +### Bug Fixes + +- **Card:** updated v5 logic to prevent unclickable cards ([#10202](https://github.com/patternfly/patternfly-react/issues/10202)) ([779e288](https://github.com/patternfly/patternfly-react/commit/779e288960dae6a2ea5198d948a668d3fb7b6cdc)) + +# [5.3.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.18...@patternfly/react-core@5.3.0-prerelease.19) (2024-03-27) + +### Bug Fixes + +- **TextArea:** remove invalid `onFocus` and `onBlur` props ([#10193](https://github.com/patternfly/patternfly-react/issues/10193)) ([afb2e19](https://github.com/patternfly/patternfly-react/commit/afb2e19f01b0135d0212f9a4249251d8ae6a9360)), closes [#10192](https://github.com/patternfly/patternfly-react/issues/10192) + +# [5.3.0-prerelease.18](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.17...@patternfly/react-core@5.3.0-prerelease.18) (2024-03-27) + +### Features + +- **MenuToggle/Select:** add status ([#10209](https://github.com/patternfly/patternfly-react/issues/10209)) ([2afe1bf](https://github.com/patternfly/patternfly-react/commit/2afe1bf95c7b1ff39eab007442b910c1c985206e)) +- **templates:** add templates package ([#10110](https://github.com/patternfly/patternfly-react/issues/10110)) ([41a22fb](https://github.com/patternfly/patternfly-react/commit/41a22fbc6d7e6b874fb3a862d6558ac6d17fae03)) + +# [5.3.0-prerelease.17](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.16...@patternfly/react-core@5.3.0-prerelease.17) (2024-03-27) + +### Bug Fixes + +- **GenerateId:** add randomness to id generator to prevent id collisions ([#10178](https://github.com/patternfly/patternfly-react/issues/10178)) ([2375deb](https://github.com/patternfly/patternfly-react/commit/2375deb10e266445e8aff9da5b2fbbc033fbcf26)) + +# [5.3.0-prerelease.16](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.15...@patternfly/react-core@5.3.0-prerelease.16) (2024-03-26) + +### Features + +- **Dropdown:** Added support for setting height for dropdown ([#10149](https://github.com/patternfly/patternfly-react/issues/10149)) ([9db5e7b](https://github.com/patternfly/patternfly-react/commit/9db5e7bda682eb034c1efb0998db9256d4b150c7)) + +# 5.3.0-prerelease.15 (2024-03-26) + +### Bug Fixes + +- **misc:** demos not working due to variables not defined ([#10169](https://github.com/patternfly/patternfly-react/issues/10169)) ([e045572](https://github.com/patternfly/patternfly-react/commit/e045572e9ce326585e929fc4e2eb35e15d2b2d1b)) + +# 5.3.0-prerelease.14 (2024-03-26) + +### Bug Fixes + +- **ClipboardCopy:** warn when clipboard API is unavailable ([#10186](https://github.com/patternfly/patternfly-react/issues/10186)) ([38736a1](https://github.com/patternfly/patternfly-react/commit/38736a1e6b827aacc6a70e72cb36ff9457b99b42)) +- **MenuToggle:** fix indeterminate checkbox error, toggle click behavior ([#10066](https://github.com/patternfly/patternfly-react/issues/10066)) ([132939e](https://github.com/patternfly/patternfly-react/commit/132939eb64859a4051dd2c7948829e39e57fa56d)) +- **Table:** updated a11y for empty/nontext Th components ([#10152](https://github.com/patternfly/patternfly-react/issues/10152)) ([48d8140](https://github.com/patternfly/patternfly-react/commit/48d8140d5ecd1d467b88c573cffbd86183dce898)) + +# [5.3.0-prerelease.13](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.12...@patternfly/react-core@5.3.0-prerelease.13) (2024-03-25) + +### Bug Fixes + +- **docs:** fix undefined dashboard wrapper error in demos ([#10191](https://github.com/patternfly/patternfly-react/issues/10191)) ([3b1987a](https://github.com/patternfly/patternfly-react/commit/3b1987a7991c2f8ce596a30ac094bc0aa7eb3b1f)) + +# [5.3.0-prerelease.12](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.11...@patternfly/react-core@5.3.0-prerelease.12) (2024-03-22) + +**Note:** Version bump only for package @patternfly/react-core + +# 5.3.0-prerelease.11 (2024-03-20) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.3.0-prerelease.10](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.9...@patternfly/react-core@5.3.0-prerelease.10) (2024-03-15) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.3.0-prerelease.9](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.8...@patternfly/react-core@5.3.0-prerelease.9) (2024-03-12) + +### Bug Fixes + +- **Menu:** Fix crash in menu referencing invalid array index ([#10153](https://github.com/patternfly/patternfly-react/issues/10153)) ([d3b53f5](https://github.com/patternfly/patternfly-react/commit/d3b53f515d71321a127f0bf8c4660a8bbac791c1)) + +# 5.3.0-prerelease.8 (2024-03-11) + +### Bug Fixes + +- **Select:** focus first item when opened by click ([#10125](https://github.com/patternfly/patternfly-react/issues/10125)) ([7ed228a](https://github.com/patternfly/patternfly-react/commit/7ed228af0bac0da1a575a9773022e106ae3972f9)) + +# [5.3.0-prerelease.7](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.6...@patternfly/react-core@5.3.0-prerelease.7) (2024-02-28) + +### Bug Fixes + +- **deps:** bump to latest core ([#10116](https://github.com/patternfly/patternfly-react/issues/10116)) ([dc1aceb](https://github.com/patternfly/patternfly-react/commit/dc1aceb0ee880631320b85bfb068be13d7852a37)) + +# [5.3.0-prerelease.6](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.5...@patternfly/react-core@5.3.0-prerelease.6) (2024-02-28) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.3.0-prerelease.5](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.4...@patternfly/react-core@5.3.0-prerelease.5) (2024-02-28) + +### Bug Fixes + +- **Popper:** check for undefined before accessing ([#10086](https://github.com/patternfly/patternfly-react/issues/10086)) ([c5869ec](https://github.com/patternfly/patternfly-react/commit/c5869ec57b9970785360216d7f07d1f387b13fa6)) + +### Features + +- **SearchInput:** Add ability to add id to input in SearchInput component ([#9974](https://github.com/patternfly/patternfly-react/issues/9974)) ([2d7171e](https://github.com/patternfly/patternfly-react/commit/2d7171e41495cb074ed517f34179510ed7479b8b)) + +# [5.3.0-prerelease.4](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.3...@patternfly/react-core@5.3.0-prerelease.4) (2024-02-27) + +### Features + +- **DualListSelector next:** Add next composable Dual List Selector ([#9901](https://github.com/patternfly/patternfly-react/issues/9901)) ([18c1ab3](https://github.com/patternfly/patternfly-react/commit/18c1ab31c38706963b7ebd42e6461dcdda04dc8b)) + +# [5.3.0-prerelease.3](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.2...@patternfly/react-core@5.3.0-prerelease.3) (2024-02-26) + +### Reverts + +- Revert "bug(ClipboardCopy): change children type to string (#9743)" (#9895) ([fbe5c81](https://github.com/patternfly/patternfly-react/commit/fbe5c810d1ee8c6fa41236c26e3204861d143624)), closes [#9743](https://github.com/patternfly/patternfly-react/issues/9743) [#9895](https://github.com/patternfly/patternfly-react/issues/9895) + +# [5.3.0-prerelease.2](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.3.0-prerelease.1...@patternfly/react-core@5.3.0-prerelease.2) (2024-02-19) + +### Bug Fixes + +- **Menu toggle:** Passed aria label prop value to typeahead variant ([#10084](https://github.com/patternfly/patternfly-react/issues/10084)) ([871abd8](https://github.com/patternfly/patternfly-react/commit/871abd8f0afba15a9f44f61e6f76f612501537e2)) + +# 5.3.0-prerelease.1 (2024-02-19) + +### Features + +- **JumpLinks:** support passing a reference to scroll element ([#9961](https://github.com/patternfly/patternfly-react/issues/9961)) ([a5a180c](https://github.com/patternfly/patternfly-react/commit/a5a180c816284d40aeeeda457afaf5934219ce1d)) + +# 5.3.0-prerelease.0 (2024-02-02) + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-core + +# 5.2.0 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-core + +# 5.2.0-prerelease.50 (2024-02-02) + +**Note:** Version bump only for package @patternfly/react-core + +# 5.2.0-prerelease.49 (2024-01-29) + +### Bug Fixes + +- prevent console warning in checkbox & radio ([#10048](https://github.com/patternfly/patternfly-react/issues/10048)) ([8709f20](https://github.com/patternfly/patternfly-react/commit/8709f206d23926d1fe20bd326667801a3dee303c)) + +# [5.2.0-prerelease.48](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.47...@patternfly/react-core@5.2.0-prerelease.48) (2024-01-17) + +### Bug Fixes + +- **ClipboardCopy:** update main content on children change when expanded ([#10015](https://github.com/patternfly/patternfly-react/issues/10015)) ([9395dd5](https://github.com/patternfly/patternfly-react/commit/9395dd560fe50572aefb4b8ea84ba40121f23c63)) + +# 5.2.0-prerelease.47 (2024-01-16) + +### Bug Fixes + +- **Clipboard copy:** Fixed regression with updating main content when expanded ([#9975](https://github.com/patternfly/patternfly-react/issues/9975)) ([a189781](https://github.com/patternfly/patternfly-react/commit/a18978182e9bf533503d93961150232f74c173f7)) + +# [5.2.0-prerelease.46](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.45...@patternfly/react-core@5.2.0-prerelease.46) (2024-01-15) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.45](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.44...@patternfly/react-core@5.2.0-prerelease.45) (2024-01-11) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.44](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.43...@patternfly/react-core@5.2.0-prerelease.44) (2024-01-10) + +### Bug Fixes + +- **Popover:** doc click event ([#9952](https://github.com/patternfly/patternfly-react/issues/9952)) ([74c30e8](https://github.com/patternfly/patternfly-react/commit/74c30e8313ea889598c55f7e1dd04b568e31847c)) + +# [5.2.0-prerelease.43](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.42...@patternfly/react-core@5.2.0-prerelease.43) (2024-01-09) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.42](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.41...@patternfly/react-core@5.2.0-prerelease.42) (2024-01-08) + +### Features + +- **DragDrop:** new drag drop styling fixes ([#9784](https://github.com/patternfly/patternfly-react/issues/9784)) ([19ddee7](https://github.com/patternfly/patternfly-react/commit/19ddee701efb222b931b83c531987405860d604f)) + +# 5.2.0-prerelease.41 (2024-01-05) + +### Features + +- **Modal next:** Introduce a next composable Modal ([#9852](https://github.com/patternfly/patternfly-react/issues/9852)) ([7ec2aff](https://github.com/patternfly/patternfly-react/commit/7ec2aff1d8dd1c6762c9d912c1d2e60a6b604ddd)) + +# [5.2.0-prerelease.40](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.39...@patternfly/react-core@5.2.0-prerelease.40) (2024-01-04) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.39](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.38...@patternfly/react-core@5.2.0-prerelease.39) (2024-01-03) + +### Bug Fixes + +- **Chip:** prevented duplicate ID being applied ([#9886](https://github.com/patternfly/patternfly-react/issues/9886)) ([91b7d62](https://github.com/patternfly/patternfly-react/commit/91b7d62cb3503f65371ab27478ffff091262b04b)) + +# [5.2.0-prerelease.38](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.37...@patternfly/react-core@5.2.0-prerelease.38) (2024-01-02) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.37](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.36...@patternfly/react-core@5.2.0-prerelease.37) (2023-12-20) + +### Features + +- **Accordion:** added toggle alignment functionality ([#9877](https://github.com/patternfly/patternfly-react/issues/9877)) ([58e0071](https://github.com/patternfly/patternfly-react/commit/58e0071d2ef57de7ded5f633024a868decb8e833)) + +# [5.2.0-prerelease.36](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.35...@patternfly/react-core@5.2.0-prerelease.36) (2023-12-14) + +### Bug Fixes + +- **MenuItem:** Add download to MenuItem ([#9892](https://github.com/patternfly/patternfly-react/issues/9892)) ([2afb5fd](https://github.com/patternfly/patternfly-react/commit/2afb5fdeb8ade43aee6dadaccf9067a0939212c7)) + +# [5.2.0-prerelease.35](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.34...@patternfly/react-core@5.2.0-prerelease.35) (2023-12-11) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.34](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.33...@patternfly/react-core@5.2.0-prerelease.34) (2023-12-07) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.33](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.32...@patternfly/react-core@5.2.0-prerelease.33) (2023-12-06) + +### Bug Fixes + +- **AlertGroupDemo:** crashed when adding default alerts ([#9826](https://github.com/patternfly/patternfly-react/issues/9826)) ([9244cf0](https://github.com/patternfly/patternfly-react/commit/9244cf07bd599f295d623a6e37e8d15b3c7c3d40)) + +# [5.2.0-prerelease.32](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.31...@patternfly/react-core@5.2.0-prerelease.32) (2023-11-21) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.31](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.30...@patternfly/react-core@5.2.0-prerelease.31) (2023-11-17) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.30](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.29...@patternfly/react-core@5.2.0-prerelease.30) (2023-11-16) + +### Bug Fixes + +- **Chip:** update tooltip vis when chip updates ([#9819](https://github.com/patternfly/patternfly-react/issues/9819)) ([18c140a](https://github.com/patternfly/patternfly-react/commit/18c140a2adcc1833e4b095755aa7495d1d88a177)) + +# [5.2.0-prerelease.29](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.28...@patternfly/react-core@5.2.0-prerelease.29) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.28](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.27...@patternfly/react-core@5.2.0-prerelease.28) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.26...@patternfly/react-core@5.2.0-prerelease.27) (2023-11-14) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.25...@patternfly/react-core@5.2.0-prerelease.26) (2023-11-13) + +### Bug Fixes + +- **DatePicker:** updated logic for parsing and focus management ([#9794](https://github.com/patternfly/patternfly-react/issues/9794)) ([a12cf31](https://github.com/patternfly/patternfly-react/commit/a12cf313f0924a61a8cf20ee78b4b27290b9c05f)) + +# [5.2.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.24...@patternfly/react-core@5.2.0-prerelease.25) (2023-11-10) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.23...@patternfly/react-core@5.2.0-prerelease.24) (2023-11-03) + +### Bug Fixes + +- **ClipboardCopy:** kepp caret position ([#9772](https://github.com/patternfly/patternfly-react/issues/9772)) ([981361e](https://github.com/patternfly/patternfly-react/commit/981361e0de354bbe06c4a799b6e7c92228dab51f)) + +### Features + +- **Datalist:** implement full page Basic demo to match HTML [#9048](https://github.com/patternfly/patternfly-react/issues/9048) ([#9087](https://github.com/patternfly/patternfly-react/issues/9087)) ([ab18059](https://github.com/patternfly/patternfly-react/commit/ab1805993ed5e2b5ed3d2f1be4131e035152b468)) + +# [5.2.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.22...@patternfly/react-core@5.2.0-prerelease.23) (2023-11-03) + +**Note:** Version bump only for package @patternfly/react-core + +# [5.2.0-prerelease.22](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.21...@patternfly/react-core@5.2.0-prerelease.22) (2023-11-02) + +### Bug Fixes + +- **TreeView:** define button type ([#9770](https://github.com/patternfly/patternfly-react/issues/9770)) ([a772c6d](https://github.com/patternfly/patternfly-react/commit/a772c6d67bfa4154979ee14a34ec954406503109)) + +# [5.2.0-prerelease.21](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.20...@patternfly/react-core@5.2.0-prerelease.21) (2023-11-02) + +### Bug Fixes + +- **Notification Drawer:** Added screen reader text for notification drawer item read state ([#9569](https://github.com/patternfly/patternfly-react/issues/9569)) ([bc19f91](https://github.com/patternfly/patternfly-react/commit/bc19f9148e872fb62d8cd2bf644a771d9c5650d7)) +- **Text input:** Added aria-expanded ([#9705](https://github.com/patternfly/patternfly-react/issues/9705)) ([7f6a62c](https://github.com/patternfly/patternfly-react/commit/7f6a62c1a3f860a8759c63cde17da6b763dd7b48)) +- **Wizard:** onStepChange - skip isDisabled & isHidden ([#9748](https://github.com/patternfly/patternfly-react/issues/9748)) ([4d4d623](https://github.com/patternfly/patternfly-react/commit/4d4d623d294bbc7821c6dc9156980f2b8c609c96)) + +### Features + +- **Wizard:** ability to add props to WizardFooter buttons ([#9709](https://github.com/patternfly/patternfly-react/issues/9709)) ([9f21cee](https://github.com/patternfly/patternfly-react/commit/9f21cee5438c8ec4d0e2c5c938f9fffda013757b)) + +# [5.2.0-prerelease.20](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@5.2.0-prerelease.19...@patternfly/react-core@5.2.0-prerelease.20) (2023-11-02) + +### Bug Fixes + +- **RTL:** added right-to-left page demo ([#9694](https://github.com/patternfly/patternfly-react/issues/9694)) ([d7308ae](https://github.com/patternfly/patternfly-react/commit/d7308aebec1e3ff22df548b5613f058c9ba35262)) + # [6.0.0-alpha.50](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.0.0-alpha.49...@patternfly/react-core@6.0.0-alpha.50) (2024-04-02) **Note:** Version bump only for package @patternfly/react-core diff --git a/packages/react-core/README.md b/packages/react-core/README.md index 899d79c251c..cd5c12196a3 100644 --- a/packages/react-core/README.md +++ b/packages/react-core/README.md @@ -53,3 +53,4 @@ All React contributors must first be [PatternFly community contributors](https:/ ### License PatternFly React is licensed under the [MIT License](https://github.com/patternfly/patternfly-react/tree/main/LICENSE). + diff --git a/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx b/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx index cd8c6b03396..d86677109bb 100644 --- a/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx +++ b/packages/react-core/src/components/Accordion/__tests__/AccordionToggle.test.tsx @@ -211,6 +211,34 @@ test('Renders toggle icon before toggle text when togglePosition from context = expect(toggle.firstChild).toHaveClass(styles.accordionToggleIcon); }); +test('Renders toggle text before toggle icon by default', () => { + render( + + + Test + + + ); + + const toggle = screen.getByRole('button'); + + expect(toggle.firstChild).toHaveClass(styles.accordionToggleText); +}); + +test('Renders toggle icon before toggle text when togglePosition from context = "start"', () => { + render( + + + Test + + + ); + + const toggle = screen.getByRole('button'); + + expect(toggle.firstChild).toHaveClass(styles.accordionToggleIcon); +}); + test('Matches the snapshot', () => { const { asFragment } = render( diff --git a/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx b/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx index 6c5a3f722dd..879289a6725 100644 --- a/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx +++ b/packages/react-core/src/components/CalendarMonth/CalendarMonth.tsx @@ -83,9 +83,6 @@ export interface CalendarProps extends CalendarFormat, Omit boolean)[]; } -// Must be numeric given current header design -const yearFormat = (date: Date) => date.getFullYear(); - const buildCalendar = (year: number, month: number, weekStart: number, validators: ((date: Date) => boolean)[]) => { const defaultDate = new Date(year, month); @@ -164,6 +161,13 @@ export const CalendarMonth = ({ }; const initialDate = getInitialDate(); const [focusedDate, setFocusedDate] = React.useState(initialDate); + + // Must be numeric given current header design + const yearFormat = (date: Date) => date.getFullYear(); + // + const yearFormatted = yearFormat(focusedDate); + const [yearInput, setYearInput] = React.useState(yearFormatted.toString()); + const [hoveredDate, setHoveredDate] = React.useState(new Date(focusedDate)); const focusRef = React.useRef(); const [hiddenMonthId] = React.useState(getUniqueId('hidden-month-span')); @@ -191,6 +195,7 @@ export const CalendarMonth = ({ setHoveredDate(newDate); setShouldFocus(false); onMonthChange(ev, newDate); + setYearInput(yearFormat(newDate).toString()); }; const onKeyDown = (ev: React.KeyboardEvent) => { @@ -217,6 +222,34 @@ export const CalendarMonth = ({ const changeMonth = (newMonth: number, newYear?: number) => new Date(newYear ?? focusedDate.getFullYear(), newMonth, 1); + const MIN_YEAR = 1900; + const MAX_YEAR = 2100; + + const handleYearInputChange = (event: React.FormEvent, yearStr: string) => { + if (!/^\d{0,4}$/.test(yearStr)) { + return; + } + + setYearInput(yearStr); + + if (yearStr.length === 4) { + const yearNum = Number(yearStr); + + if (yearNum >= MIN_YEAR && yearNum <= MAX_YEAR) { + const newDate = changeYear(yearNum); + setFocusedDate(newDate); + setHoveredDate(newDate); + setShouldFocus(false); + + // We need to manually focus the year input in FireFox when the scroll buttons are clicked, as FireFox doesn't place focus automatically + (event.target as HTMLElement).focus(); + onMonthChange(event, newDate); + } else { + setYearInput(yearFormatted.toString()); + } + } + }; + const addMonth = (toAdd: -1 | 1) => { let newMonth = focusedDate.getMonth() + toAdd; let newYear = focusedDate.getFullYear(); @@ -254,7 +287,6 @@ export const CalendarMonth = ({ } const isHoveredDateValid = isValidated(hoveredDate); const monthFormatted = monthFormat(focusedDate); - const yearFormatted = yearFormat(focusedDate); const calendarToRender = (
@@ -321,15 +353,8 @@ export const CalendarMonth = ({ , year: string) => { - const newDate = changeYear(Number(year)); - setFocusedDate(newDate); - setHoveredDate(newDate); - setShouldFocus(false); - focusRef.current?.blur(); // will unfocus a date when changing year via up/down arrows - onMonthChange(ev, newDate); - }} + value={yearInput} + onChange={handleYearInputChange} />
diff --git a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx index 1fc674de587..2ded3cc3cdc 100644 --- a/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx +++ b/packages/react-core/src/components/ClipboardCopy/ClipboardCopy.tsx @@ -10,8 +10,22 @@ import { ClipboardCopyToggle } from './ClipboardCopyToggle'; import { ClipboardCopyExpanded } from './ClipboardCopyExpanded'; import { getOUIAProps, OUIAProps } from '../../helpers'; -export const clipboardCopyFunc = (event: React.ClipboardEvent, text?: string) => { - navigator.clipboard.writeText(text.toString()); +export const clipboardCopyFunc = (_event: React.ClipboardEvent, text?: React.ReactNode) => { + try { + navigator.clipboard.writeText(text.toString()); + } catch (error) { + // eslint-disable-next-line no-console + console.warn( + "Clipboard API not found, this copy function will not work. This is likely because you're using an", + "unsupported browser or you're not using HTTPS. \n\nIf you're a developer building an application which needs", + "to support copying to the clipboard without the clipboard API, you'll have to create your own copy", + 'function and pass it to the ClipboardCopy component as the onCopy prop. For more information see', + 'https://developer.mozilla.org/en-US/docs/Web/API/Navigator/clipboard' + ); + + // eslint-disable-next-line no-console + console.error(error); + } }; export enum ClipboardCopyVariant { @@ -70,8 +84,8 @@ export interface ClipboardCopyProps extends Omit exitDelay?: number; /** Delay in ms before the tooltip appears. */ entryDelay?: number; - /** A function that is triggered on clicking the copy button. */ - onCopy?: (event: React.ClipboardEvent, text?: string) => void; + /** A function that is triggered on clicking the copy button. This will replace the existing clipboard copy functionality entirely. */ + onCopy?: (event: React.ClipboardEvent, text?: React.ReactNode) => void; /** A function that is triggered on changing the text. */ onChange?: (event: React.FormEvent, text?: string) => void; /** The text which is copied. */ diff --git a/packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx b/packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx index 4d2b38cb5a6..88221d26dcd 100644 --- a/packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx +++ b/packages/react-core/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx @@ -4,6 +4,8 @@ import { ClipboardCopy } from '../ClipboardCopy'; import styles from '@patternfly/react-styles/css/components/ClipboardCopy/clipboard-copy'; import userEvent from '@testing-library/user-event'; +jest.mock('../../../helpers/GenerateId/GenerateId'); + jest.mock('../ClipboardCopyButton', () => ({ ClipboardCopyButton: ({ 'aria-label': ariaLabel, children, entryDelay, exitDelay, maxWidth, position, onClick }) => (
diff --git a/packages/react-core/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap b/packages/react-core/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap index 3912ac8b5c8..3e5b6a2c056 100644 --- a/packages/react-core/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap +++ b/packages/react-core/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap @@ -21,7 +21,7 @@ exports[`Matches snapshot 1`] = ` data-ouia-component-id="OUIA-Generated-TextInputBase-26" data-ouia-component-type="PF5/TextInput" data-ouia-safe="true" - id="text-input-34" + id="text-input-generated-id" type="text" value="Copyable text" /> diff --git a/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx b/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx index 067370270c7..c215634bb50 100644 --- a/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx +++ b/packages/react-core/src/components/Drawer/__tests__/Drawer.test.tsx @@ -14,6 +14,8 @@ import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import { KeyTypes } from '../../../helpers'; +jest.mock('../../../helpers/GenerateId/GenerateId'); + Object.values([ { isExpanded: true, isInline: false, isStatic: false }, { isExpanded: false, isInline: false, isStatic: false }, diff --git a/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx b/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx index 0f1135707e9..afdbf1c1a89 100644 --- a/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +++ b/packages/react-core/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx @@ -34,6 +34,8 @@ test(`Renders with class ${styles.modifiers.secondary} when colorVariant="second expect(screen.getByText('Drawer panel content')).toHaveClass(styles.modifiers.secondary); }); +jest.mock('../../../helpers/GenerateId/GenerateId'); + test('Does not render with aria-labelledby by default', () => { render( diff --git a/packages/react-core/src/components/Drawer/__tests__/Generated/DrawerPanelContent.test.tsx b/packages/react-core/src/components/Drawer/__tests__/Generated/DrawerPanelContent.test.tsx index 4648dc9f0e5..ed8676d0943 100644 --- a/packages/react-core/src/components/Drawer/__tests__/Generated/DrawerPanelContent.test.tsx +++ b/packages/react-core/src/components/Drawer/__tests__/Generated/DrawerPanelContent.test.tsx @@ -7,6 +7,8 @@ import { DrawerPanelContent } from '../../DrawerPanelContent'; // any missing imports can usually be resolved by adding them here import {} from '../..'; +jest.mock('../../../../helpers/GenerateId/GenerateId'); + it('DrawerPanelContent should match snapshot (auto-generated)', () => { const { asFragment } = render(ReactNode
} />); expect(asFragment()).toMatchSnapshot(); diff --git a/packages/react-core/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap b/packages/react-core/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap index 2f08c599b56..b17ab76a1e7 100644 --- a/packages/react-core/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap +++ b/packages/react-core/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap @@ -5,7 +5,7 @@ exports[`DrawerPanelContent should match snapshot (auto-generated) 1`] = `
@@ -298,7 +298,7 @@ exports[`Drawer isExpanded = false and isInline = true and isStatic = false 1`]
@@ -324,7 +324,7 @@ exports[`Drawer isExpanded = true and isInline = false and isStatic = false 1`]
= ({ @@ -83,6 +87,8 @@ const DropdownBase: React.FunctionComponent = ({ zIndex = 9999, popperProps, onOpenChangeKeys = ['Escape', 'Tab'], + menuHeight, + maxMenuHeight, ...props }: DropdownProps) => { const localMenuRef = React.useRef(); @@ -111,8 +117,8 @@ const DropdownBase: React.FunctionComponent = ({ }; const handleClick = (event: MouseEvent) => { - // toggle was clicked open via keyboard, focus on first menu item - if (isOpen && toggleRef.current?.contains(event.target as Node) && event.detail === 0) { + // toggle was opened, focus on first menu item + if (isOpen && toggleRef.current?.contains(event.target as Node)) { setTimeout(() => { const firstElement = menuRef?.current?.querySelector( 'li button:not(:disabled),li input:not(:disabled),li a:not([aria-disabled="true"])' @@ -138,6 +144,8 @@ const DropdownBase: React.FunctionComponent = ({ }; }, [isOpen, menuRef, toggleRef, onOpenChange, onOpenChangeKeys]); + const scrollable = maxMenuHeight !== undefined || menuHeight !== undefined || isScrollable; + const menu = ( = ({ shouldFocusToggleOnSelect && toggleRef.current.focus(); }} isPlain={isPlain} - isScrollable={isScrollable} + isScrollable={scrollable} {...props} {...ouiaProps} > - {children} + + {children} + ); return ( diff --git a/packages/react-core/src/components/Form/__tests__/FormFieldGroup.test.tsx b/packages/react-core/src/components/Form/__tests__/FormFieldGroup.test.tsx index 04e42efa54c..3ddf4674ad7 100644 --- a/packages/react-core/src/components/Form/__tests__/FormFieldGroup.test.tsx +++ b/packages/react-core/src/components/Form/__tests__/FormFieldGroup.test.tsx @@ -7,6 +7,8 @@ import { FormFieldGroupExpandable } from '../FormFieldGroupExpandable'; import { FormFieldGroupHeader } from '../FormFieldGroupHeader'; import { Button } from '../../Button'; +jest.mock('../../../helpers/GenerateId/GenerateId'); + test('Check form field group example against snapshot', () => { const FieldGroup = ( { const Section = ; const { asFragment } = render(Section); diff --git a/packages/react-core/src/components/Form/__tests__/__snapshots__/FormFieldGroup.test.tsx.snap b/packages/react-core/src/components/Form/__tests__/__snapshots__/FormFieldGroup.test.tsx.snap index 614ced13041..e375a3d4385 100644 --- a/packages/react-core/src/components/Form/__tests__/__snapshots__/FormFieldGroup.test.tsx.snap +++ b/packages/react-core/src/components/Form/__tests__/__snapshots__/FormFieldGroup.test.tsx.snap @@ -17,12 +17,12 @@ exports[`Check expandable form field group example against snapshot 1`] = ` aria-disabled="false" aria-expanded="true" aria-label="toggle" - aria-labelledby="title-text-id2 form-field-group-toggle0" + aria-labelledby="title-text-id2 generated-id" class="pf-v6-c-button pf-m-plain" data-ouia-component-id="OUIA-Generated-Button-plain-1" data-ouia-component-type="PF5/Button" data-ouia-safe="true" - id="form-field-group-toggle0" + id="generated-id" type="button" >

Title

diff --git a/packages/react-core/src/components/Label/Label.tsx b/packages/react-core/src/components/Label/Label.tsx index 9d82b3644b5..78bef70da64 100644 --- a/packages/react-core/src/components/Label/Label.tsx +++ b/packages/react-core/src/components/Label/Label.tsx @@ -27,6 +27,8 @@ export interface LabelProps extends React.HTMLProps { status?: 'success' | 'warning' | 'danger' | 'info' | 'custom'; /** Flag indicating the label is compact. */ isCompact?: boolean; + /** Flag indicating the label is disabled. Works only on clickable labels, so either href or onClick props must be passed in. */ + isDisabled?: boolean; /** @beta Flag indicating the label is editable. */ isEditable?: boolean; /** @beta Additional props passed to the editable label text div. Optionally passing onInput and onBlur callbacks will allow finer custom text input control. */ @@ -106,6 +108,7 @@ export const Label: React.FunctionComponent = ({ variant = 'filled', status, isCompact = false, + isDisabled = false, isEditable = false, editableProps, textMaxWidth, @@ -224,29 +227,23 @@ export const Label: React.FunctionComponent = ({ } }; - const LabelComponent = (isOverflowLabel || isAddLabel ? 'button' : 'span') as any; + const isClickableDisabled = (href || onLabelClick) && isDisabled; - let _closeBtnAriaLabel = 'Close label'; - if (closeBtnAriaLabel) { - _closeBtnAriaLabel = closeBtnAriaLabel; - } else if (typeof children === 'string') { - _closeBtnAriaLabel = `Close ${children}`; - } - - const defaultButton = ( + const defaultCloseButton = ( ); - const button = {closeBtn || defaultButton}; + const closeButton = {closeBtn || defaultCloseButton}; const textRef = React.createRef(); // ref to apply tooltip when rendered is used const componentRef = React.useRef(); @@ -302,6 +299,8 @@ export const Label: React.FunctionComponent = ({ className: css(styles.labelContent, isClickable && styles.modifiers.clickable), ...(isTooltipVisible && { tabIndex: 0 }), ...(href && { href }), + // Need to prevent onClick since aria-disabled won't prevent AT from triggering the link + ...(href && isDisabled && { onClick: (event: MouseEvent) => event.preventDefault() }), ...(isButton && clickableLabelProps), ...(isEditable && { ref: editableButtonRef, @@ -310,7 +309,9 @@ export const Label: React.FunctionComponent = ({ e.stopPropagation(); }, ...editableProps - }) + }), + ...(isClickableDisabled && isButton && { disabled: true }), + ...(isClickableDisabled && href && { tabindex: -1, 'aria-disabled': true }) }; let labelComponentChild = ( @@ -336,11 +337,14 @@ export const Label: React.FunctionComponent = ({ ); } + const LabelComponent = (isOverflowLabel ? 'button' : 'span') as any; + return ( = ({ onClick={isOverflowLabel || isAddLabel ? onLabelClick : undefined} > {!isEditableActive && labelComponentChild} - {!isEditableActive && onClose && button} + {!isEditableActive && onClose && closeButton} {isEditableActive && ( { test('label group default', () => { const { asFragment } = render( diff --git a/packages/react-core/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap b/packages/react-core/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap index be9cdd92224..fe6a192ac94 100644 --- a/packages/react-core/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap +++ b/packages/react-core/src/components/Label/__tests__/__snapshots__/LabelGroup.test.tsx.snap @@ -134,12 +134,12 @@ exports[`LabelGroup label group with category 1`] = `
    @@ -177,12 +177,12 @@ exports[`LabelGroup label group with category and tooltip 1`] = `
      @@ -220,12 +220,12 @@ exports[`LabelGroup label group with closable category 1`] = `
        @@ -254,12 +254,12 @@ exports[`LabelGroup label group with closable category 1`] = `
diff --git a/packages/react-core/src/components/MenuToggle/MenuToggleCheckbox.tsx b/packages/react-core/src/components/MenuToggle/MenuToggleCheckbox.tsx index a2d7aeee354..ac9e017169c 100644 --- a/packages/react-core/src/components/MenuToggle/MenuToggleCheckbox.tsx +++ b/packages/react-core/src/components/MenuToggle/MenuToggleCheckbox.tsx @@ -84,7 +84,7 @@ class MenuToggleCheckbox extends React.Component ); return ( -