From e314b59ac02455c1f34552b70f159fe60a48561a Mon Sep 17 00:00:00 2001 From: Titani Labaj <39532947+tlabaj@users.noreply.github.com> Date: Fri, 19 Apr 2024 09:22:35 -0400 Subject: [PATCH] chore(rebase): rebase 6v branch" (#10272) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(RTL): added right-to-left page demo (#9694) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.20 - @patternfly/react-core@5.2.0-prerelease.20 - @patternfly/react-docs@6.2.0-prerelease.20 - demo-app-ts@5.1.1-prerelease.43 - @patternfly/react-table@5.2.0-prerelease.20 * fix(Wizard): onStepChange - skip isDisabled & isHidden (#9748) * fix(Text input): Added aria-expanded (#9705) * fix(Text input): Added aria-expanded * add interface * updates from review * fix(Notification Drawer): Added screen reader text for notification drawer item read state (#9569) * fix(Notification Drawer): Added screen reader text for notification drawer item read state * fix snapshot * Update prop description * add aria-live * update snapshots * feat(Wizard): ability to add props to WizardFooter buttons (#9709) * feat: ability to add props to WizardFooter buttons * fix(WizardFooter): null check * fix(Wizard): simpler design of adding footer buttons props * test(Wizard): can add props to footer buttons * docs(WizardFooter): move comment so docs have correct description * refactor(WizardFooter): move FooterButtonProps to types file * chore(Divider): update tests to new standards (#9714) * chore(Divider): update tests to new standards * changes from PR review * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.21 - @patternfly/react-core@5.2.0-prerelease.21 - @patternfly/react-docs@6.2.0-prerelease.21 - demo-app-ts@5.1.1-prerelease.44 - @patternfly/react-table@5.2.0-prerelease.21 * fix(TreeView): define button type (#9770) * bug(build): fixed built ESM files importing CJS files from react-styles (#9347) * bug(build): fixed built ESM files importing CJS files from react-styles * edited yarn.lock to invalidate deps cache in GH actions * excluded file extensions from react-styles path transform in ESM build * updated jest config to transform .mjs files * updated pr action to invalidate deps cache if package files added/edited * chore(deps): Add ts-node to support executing typescript files directly * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.22 - @patternfly/react-core@5.2.0-prerelease.22 - @patternfly/react-docs@6.2.0-prerelease.22 - demo-app-ts@5.1.1-prerelease.45 - @patternfly/react-table@5.2.0-prerelease.22 - transformer-react-styles-esm-imports@1.0.1-prerelease.0 * chore(deps): update dependency @patternfly/patternfly to v5.2.0-prerelease.4 (#9780) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.2.0-prerelease.6 - @patternfly/react-code-editor@5.2.0-prerelease.23 - @patternfly/react-core@5.2.0-prerelease.23 - @patternfly/react-docs@6.2.0-prerelease.23 - @patternfly/react-icons@5.2.0-prerelease.6 - demo-app-ts@5.1.1-prerelease.46 - @patternfly/react-styles@5.2.0-prerelease.4 - @patternfly/react-table@5.2.0-prerelease.23 - @patternfly/react-tokens@5.2.0-prerelease.5 * feat(Datalist): implement full page Basic demo to match HTML #9048 (#9087) * feat(Datalist): implement full page Basic demo to match HTML #9048 * fix syntax error * comments applied * comments applied * comments applied * comments applied * \xa0 comments applied * move key per review comments * address PR comments * revert change to package.json * Converted basic demo to TS --------- Co-authored-by: nicolethoen Co-authored-by: Eric Olkowski * fix(ClipboardCopy): kepp caret position (#9772) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.24 - @patternfly/react-core@5.2.0-prerelease.24 - @patternfly/react-docs@6.2.0-prerelease.24 - demo-app-ts@5.1.1-prerelease.47 - @patternfly/react-table@5.2.0-prerelease.24 * chore(deps): update devdependencies (#9757) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @patternfly/patternfly to v5.2.0-prerelease.5 (#9806) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update devdependencies (#9800) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.2.0-prerelease.7 - @patternfly/react-code-editor@5.2.0-prerelease.25 - @patternfly/react-core@5.2.0-prerelease.25 - @patternfly/react-docs@6.2.0-prerelease.25 - @patternfly/react-icons@5.2.0-prerelease.7 - demo-app-ts@5.1.1-prerelease.48 - @patternfly/react-styles@5.2.0-prerelease.5 - @patternfly/react-table@5.2.0-prerelease.25 - @patternfly/react-tokens@5.2.0-prerelease.6 * fix(DatePicker): updated logic for parsing and focus management (#9794) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.26 - @patternfly/react-core@5.2.0-prerelease.26 - @patternfly/react-docs@6.2.0-prerelease.26 - demo-app-ts@5.1.1-prerelease.49 - @patternfly/react-table@5.2.0-prerelease.26 * chore(PrimaryDetail): convert demos to TS (#9787) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.27 - @patternfly/react-core@5.2.0-prerelease.27 - @patternfly/react-docs@6.2.0-prerelease.27 - demo-app-ts@5.1.1-prerelease.50 - @patternfly/react-table@5.2.0-prerelease.27 * chore(misc): clean up instances of Array.apply (#9798) * clean up instances of Array.apply * rename item to value * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.28 - @patternfly/react-core@5.2.0-prerelease.28 - @patternfly/react-docs@6.2.0-prerelease.28 - @patternfly/react-integration@5.1.1-prerelease.15 - demo-app-ts@5.1.1-prerelease.51 - @patternfly/react-table@5.2.0-prerelease.28 * chore(eslint): Added React Testing Library linter plugin (#9805) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.29 - @patternfly/react-core@5.2.0-prerelease.29 - @patternfly/react-docs@6.2.0-prerelease.29 - @patternfly/react-icons@5.2.0-prerelease.8 - demo-app-ts@5.1.1-prerelease.52 - @patternfly/react-table@5.2.0-prerelease.29 * chore(DataList): update tests (#9672) * add spread prop test, update test * chore(DataList): update tests * fix merge error * break out into separate files, pr feedback * updates * fix some example ids * minor test updates * revert action change * bug(ClipboardCopy): change children type to string (#9743) * bug(ClipboardCopy): change children type to string Signed-off-by: gitdallas * fix clipboardcopyexpanded to work with string children Signed-off-by: gitdallas * refactor a bit * fix bad rebase --------- Signed-off-by: gitdallas * chore(deps): update devdependencies (#9817) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix Search Input - composable advanced search demo (#9484) * Search Input - composable advanced search fix date * remove isFill from datePicker * docs(custom menu): add example with search input inline filtering (#9687) * docs(custom menu): add example with search input inline filtering * refactor(demo menu): rename to InlineSearchFilterMenuDemo * chore(HelperText): update tests (#9761) * chore(HelperText): update tests * break out helpertextitem tests, update tests * updates * fix lint * fix(Chip): update tooltip vis when chip updates (#9819) * fix(Chip): enable tooltip when chip updates * fix casting * chore(DescriptionList): update tests (#9753) * chore(DescriptionList): update tests * break out tests, pr feedback * updates * add autofit width mod test * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.30 - @patternfly/react-core@5.2.0-prerelease.30 - @patternfly/react-docs@6.2.0-prerelease.30 - demo-app-ts@5.1.1-prerelease.53 - @patternfly/react-table@5.2.0-prerelease.30 * chore(TreeView): updated tests (#9773) * chore(TreeView): updated tests * Added tests for TreeViewListItem * Added tests for TreeViewRoot and TreeView * Updated snapshots and queries * chore(Table) convert demos to ts (#9621) * chore(table) convert to TS chore(DashboardWrapper) convert to TS chore(Table) convert demos to TS delete superfluous dashboard components declare as ts files remove duplicate ids fix import errors, WIP build errors sync toolbar demo with main * update import paths * fix more import paths * try import from dist/esm * fix build * convert remaining table demos to ts, WIP draggable logic * revert col management with draggable to previous dnd implementation * align file names with demo names, cleanup types, fix TS errors in demo files * update fileNames in table.md * PR feedback from Eric * fix category dropdown * fix demos, remove table actions that do not support main purpose of column management demos * add fix for a11y tests as suggested by Eric * update toolbar snap * add param type to labelText --------- Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.31 - @patternfly/react-core@5.2.0-prerelease.31 - @patternfly/react-docs@6.2.0-prerelease.31 - demo-app-ts@5.1.1-prerelease.54 - @patternfly/react-table@5.2.0-prerelease.31 * chore(deps): update devdependencies (#9829) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * docs(select): Adds documentation to React examples. (#9536) * fix conflicts * docs(select): Adds documentation for React examples. * Adds content to new select React examples. * Updates typeahead with create example. * Clarify mult typeahead with create content. * Finalizing wording. * Updates content from review. --------- Co-authored-by: nicolethoen * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.32 - @patternfly/react-core@5.2.0-prerelease.32 - @patternfly/react-docs@6.2.0-prerelease.32 - demo-app-ts@5.1.1-prerelease.55 - @patternfly/react-table@5.2.0-prerelease.32 * chore(deps): update devdependencies (#9833) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update devdependencies (#9837) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix link to patternfly community contributors document (#9840) * chore(deps): update devdependencies (#9846) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(Table): make tooltip prop consistent (#9803) * fix(Table): make tooltip prop consistent * make tooltip ReactNode and add tooltipProps to Th * add prop to useEffect * fix logic for keyboard focus * fix useeffect * chore(DataList): convert data list react demo to TS (#9818) * convert data list react demo to TS * update function component name to match file * fix(AlertGroupDemo): crashed when adding default alerts (#9826) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.33 - @patternfly/react-core@5.2.0-prerelease.33 - @patternfly/react-docs@6.2.0-prerelease.33 - demo-app-ts@5.1.1-prerelease.56 - @patternfly/react-table@5.2.0-prerelease.33 * chore(deps): update dependency @types/jest to v29.5.11 (#9854) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Popover returnFocusOnDeactivate prop (#9865) Closes https://github.com/patternfly/patternfly-react/issues/9863 * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.34 - @patternfly/react-core@5.2.0-prerelease.34 - @patternfly/react-docs@6.2.0-prerelease.34 - demo-app-ts@5.1.1-prerelease.57 - @patternfly/react-table@5.2.0-prerelease.34 * chore(deps): update dependency @patternfly/patternfly to v5.2.0-prerelease.7 (#9867) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.2.0-prerelease.8 - @patternfly/react-code-editor@5.2.0-prerelease.35 - @patternfly/react-core@5.2.0-prerelease.35 - @patternfly/react-docs@6.2.0-prerelease.35 - @patternfly/react-icons@5.2.0-prerelease.9 - demo-app-ts@5.1.1-prerelease.58 - @patternfly/react-styles@5.2.0-prerelease.6 - @patternfly/react-table@5.2.0-prerelease.35 - @patternfly/react-tokens@5.2.0-prerelease.7 * chore(deps): update devdependencies (#9873) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(MenuItem): Add download to MenuItem (#9892) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.36 - @patternfly/react-core@5.2.0-prerelease.36 - @patternfly/react-docs@6.2.0-prerelease.36 - @patternfly/react-integration@5.1.1-prerelease.16 - demo-app-ts@5.1.1-prerelease.59 - @patternfly/react-table@5.2.0-prerelease.36 * feat(Accordion): added toggle alignment functionality (#9877) * feat(Accordion): added toggle alignment functionality * Updated prop name and description * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.37 - @patternfly/react-core@5.2.0-prerelease.37 - @patternfly/react-docs@6.2.0-prerelease.37 - demo-app-ts@5.1.1-prerelease.60 - @patternfly/react-table@5.2.0-prerelease.37 * chore(deps): update devdependencies (#9885) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: add primary button with icon to button docs (#9871) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.38 - @patternfly/react-core@5.2.0-prerelease.38 - @patternfly/react-docs@6.2.0-prerelease.38 - demo-app-ts@5.1.1-prerelease.61 - @patternfly/react-table@5.2.0-prerelease.38 * fix(Chip): prevented duplicate ID being applied (#9886) * fix(Chip): prevented duplicate ID being applied * Updated snapshot * Updated integration test selector * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.39 - @patternfly/react-core@5.2.0-prerelease.39 - @patternfly/react-docs@6.2.0-prerelease.39 - @patternfly/react-integration@5.1.1-prerelease.17 - demo-app-ts@5.1.1-prerelease.62 - @patternfly/react-table@5.2.0-prerelease.39 * chore(expandablesection): Added a demo to show how to use expandable section to create an expandable text component. (#9887) * chore(expandablesection): Added a demo to show how to use expandable section to create an expandable text component. * Update packages/react-core/src/demos/ExpandableSection/ExpandableSection.md Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com> * Update packages/react-core/src/demos/ExpandableSection/ExpandableSection.md Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com> * Update packages/react-core/src/demos/ExpandableSection/ExpandableSection.md Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com> --------- Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com> Co-authored-by: Titani Labaj <39532947+tlabaj@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.40 - @patternfly/react-core@5.2.0-prerelease.40 - @patternfly/react-docs@6.2.0-prerelease.40 - demo-app-ts@5.1.1-prerelease.63 - @patternfly/react-table@5.2.0-prerelease.40 * feat(CodeEditor): use new monaco package (#9842) * feat(CodeEditor): use new monaco package * remove commented code * fix integration * update tests and mock out editor * move to direct dependency * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.41 - @patternfly/react-docs@6.2.0-prerelease.41 - @patternfly/react-integration@5.1.1-prerelease.18 * feat(Modal next): Introduce a next composable Modal (#9852) * feat(Modal next): Introduce a next composble Modal * upodate for failing tests * add integration test * updates from review * updates from Erin's comments * Updates from comments * chore(build): Fix lint issues (#9938) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.42 - @patternfly/react-core@5.2.0-prerelease.41 - @patternfly/react-docs@6.2.0-prerelease.42 - @patternfly/react-integration@5.1.1-prerelease.19 - demo-app-ts@5.1.1-prerelease.64 - @patternfly/react-table@5.2.0-prerelease.41 * feat(DragDrop): new drag drop styling fixes (#9784) * feat(DragDrop): introduce new package and deprecate old implementation * refactor a bunch * style fixes * fix lint errors * fix lint * update snap * update duallistselector example, try exporting interface from separate file * bump versions in dragdrop for mismatch * fix versions * pr feedback * fix versions after merge * version update after rebase * update md * move into next folder for docgen * update version after rebase * update ver after rebase * update ver after rebase * update ver after rebase * remove unused prop, update wording * move some examples to demos * update ver after rebase * update new demos text * update wording p1 * update wording p2 * update wording p3 * update wording p4 * fix links * remove beta flags since page is beta * update ver after rebase --------- Co-authored-by: nicolethoen * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.43 - @patternfly/react-core@5.2.0-prerelease.42 - @patternfly/react-docs@6.2.0-prerelease.43 - @patternfly/react-drag-drop@5.2.0-prerelease.0 - demo-app-ts@5.1.1-prerelease.65 - @patternfly/react-table@5.2.0-prerelease.42 * Add support for isLabelWrapped and component in Checkbox / Radio (#9830) * feat(Checkbox): add support for isLabelWrapped and isLabelBeforeButton * feat(Radio): add support for component * refactor(Radio/Checkbox): check isLabelBeforeButton only once * feat(Radio/Checkbox): add support for component === "label" behaving the same as isLabelWrapped * docs(Radio/Checkbox): update props description * test(Checkbox): add unit tests * test(Checkbox): unit test * test(Radio): unit tests * chore(build): Fix lint errors (#9950) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.44 - @patternfly/react-core@5.2.0-prerelease.43 - @patternfly/react-docs@6.2.0-prerelease.44 - @patternfly/react-drag-drop@5.2.0-prerelease.1 - demo-app-ts@5.1.1-prerelease.66 - @patternfly/react-table@5.2.0-prerelease.43 * chore(deps): update devdependencies (#9932) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(Popover): doc click event (#9952) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.45 - @patternfly/react-core@5.2.0-prerelease.44 - @patternfly/react-docs@6.2.0-prerelease.45 - @patternfly/react-drag-drop@5.2.0-prerelease.2 - demo-app-ts@5.1.1-prerelease.67 - @patternfly/react-table@5.2.0-prerelease.44 * Update react-core dist/dynamic to include exported styles (#9939) * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.2.0-prerelease.9 - @patternfly/react-code-editor@5.2.0-prerelease.46 - @patternfly/react-core@5.2.0-prerelease.45 - @patternfly/react-docs@6.2.0-prerelease.46 - @patternfly/react-drag-drop@5.2.0-prerelease.3 - @patternfly/react-icons@5.2.0-prerelease.10 - demo-app-ts@5.1.1-prerelease.68 - @patternfly/react-table@5.2.0-prerelease.45 * chore(deps): update devdependencies (#9955) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * FileUploadField fix to set name attribute on input element (#9941) * FileUploadField name attribute fix * update snapshots * prevent breaking change --------- Co-authored-by: nicolethoen * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.47 - @patternfly/react-core@5.2.0-prerelease.46 - @patternfly/react-docs@6.2.0-prerelease.47 - @patternfly/react-drag-drop@5.2.0-prerelease.4 - demo-app-ts@5.1.1-prerelease.69 - @patternfly/react-table@5.2.0-prerelease.46 * chore(deps): update devdependencies (#9967) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update Victory dependencies (#9963) * feat(charts): Victory dependency update Closes https://github.com/patternfly/patternfly-react/issues/9960 * chore(charts): update lodash dependency * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.2.0-prerelease.10 - @patternfly/react-docs@6.2.0-prerelease.48 * fix(Clipboard copy): Fixed regression with updating main content when expanded (#9975) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.48 - @patternfly/react-core@5.2.0-prerelease.47 - @patternfly/react-docs@6.2.0-prerelease.49 - @patternfly/react-drag-drop@5.2.0-prerelease.5 - demo-app-ts@5.1.1-prerelease.70 - @patternfly/react-table@5.2.0-prerelease.47 * fix(ClipboardCopy): update main content on children change when expanded (#10015) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.49 - @patternfly/react-core@5.2.0-prerelease.48 - @patternfly/react-docs@6.2.0-prerelease.50 - @patternfly/react-drag-drop@5.2.0-prerelease.6 - demo-app-ts@5.1.1-prerelease.71 - @patternfly/react-table@5.2.0-prerelease.48 * feat(DragDrop): fix import warning (#10023) * chore(release): releasing packages [ci skip] - @patternfly/react-docs@6.2.0-prerelease.51 - @patternfly/react-drag-drop@5.2.0-prerelease.7 * fix: prevent console warning in checkbox & radio (#10048) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.50 - @patternfly/react-core@5.2.0-prerelease.49 - @patternfly/react-docs@6.2.0-prerelease.52 - @patternfly/react-drag-drop@5.2.0-prerelease.8 - demo-app-ts@5.1.1-prerelease.72 - @patternfly/react-table@5.2.0-prerelease.49 * chore(release): releasing packages [ci skip] - eslint-plugin-patternfly-react@5.2.0 - @patternfly/react-charts@7.2.0 - @patternfly/react-code-editor@5.2.0 - @patternfly/react-core@5.2.0 - @patternfly/react-docs@6.2.0 - @patternfly/react-drag-drop@5.2.0 - @patternfly/react-icons@5.2.0 - @patternfly/react-styles@5.2.0 - @patternfly/react-table@5.2.0 - @patternfly/react-tokens@5.2.0 * chore(release): releasing packages [ci skip] - eslint-plugin-patternfly-react@5.3.0-prerelease.0 - @patternfly/react-charts@7.3.0-prerelease.0 - @patternfly/react-code-editor@5.3.0-prerelease.0 - @patternfly/react-core@5.3.0-prerelease.0 - @patternfly/react-docs@6.3.0-prerelease.0 - @patternfly/react-drag-drop@5.3.0-prerelease.0 - @patternfly/react-icons@5.3.0-prerelease.0 - @patternfly/react-styles@5.3.0-prerelease.0 - @patternfly/react-table@5.3.0-prerelease.0 - @patternfly/react-tokens@5.3.0-prerelease.0 * Revert release attempt (#10062) * Revert "chore(release): releasing packages [ci skip]" This reverts commit 30b52a096ba55243f4bae78eb38732924dc0ef72. * Revert "chore(release): releasing packages [ci skip]" This reverts commit b2e8cc2547a21bcdf4d3df5523991ab2938689eb. * fix: version of eslint-plugin-patternfly-react * chore: do promotion in two steps [ci skip] * fix: white space change to trigger prerelease * chore(release): releasing packages [ci skip] - eslint-plugin-patternfly-react@5.2.1-prerelease.0 * chore(build): add script to stop exporting demos in built files (#10063) * chore(build): add script to stop exporting demos in built files * chore(build): update to remove demo exports from shipped TS files also * chore(ci): update deployment to clean exports of demos * fix: whitespace change to trigger prerelease * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.2.0-prerelease.51 - @patternfly/react-core@5.2.0-prerelease.50 - @patternfly/react-docs@6.2.0-prerelease.53 - @patternfly/react-drag-drop@5.2.0-prerelease.9 - demo-app-ts@5.1.1-prerelease.73 - @patternfly/react-table@5.2.0-prerelease.50 * chore: update promote script [ci skip] * chore(release): releasing packages [ci skip] - eslint-plugin-patternfly-react@5.2.1 - @patternfly/react-charts@7.2.0 - @patternfly/react-code-editor@5.2.0 - @patternfly/react-core@5.2.0 - @patternfly/react-docs@6.2.0 - @patternfly/react-drag-drop@5.2.0 - @patternfly/react-icons@5.2.0 - @patternfly/react-styles@5.2.0 - @patternfly/react-table@5.2.0 - @patternfly/react-tokens@5.2.0 * chore: prep repo for 5.3 development [ci skip] * chore(release): releasing packages [ci skip] - eslint-plugin-patternfly-react@5.3.0-prerelease.0 - @patternfly/react-charts@7.3.0-prerelease.0 - @patternfly/react-code-editor@5.3.0-prerelease.0 - @patternfly/react-core@5.3.0-prerelease.0 - @patternfly/react-docs@6.3.0-prerelease.0 - @patternfly/react-drag-drop@5.3.0-prerelease.0 - @patternfly/react-icons@5.3.0-prerelease.0 - @patternfly/react-styles@5.3.0-prerelease.0 - @patternfly/react-table@5.3.0-prerelease.0 - @patternfly/react-tokens@5.3.0-prerelease.0 * fix: demo-app version bump issue (#10072) * chore(release): releasing packages [ci skip] - @patternfly/react-integration@5.1.1-prerelease.20 - demo-app-ts@5.1.1-prerelease.74 * fix(charts): adjust for Victory types changes (#10082) Fixes https://github.com/patternfly/patternfly-react/issues/10078 Fixes https://github.com/patternfly/patternfly-react/issues/10064 * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.1 - @patternfly/react-docs@6.3.0-prerelease.1 * feat(CodeEditor): pass additional props to monaco-editor, update readme (#10080) * feat(CodeEditor): pass through additional props to Editor * update readme * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.1 - @patternfly/react-docs@6.3.0-prerelease.2 * feat(JumpLinks): support passing a reference to scroll element (#9961) * feat(JumpLinks): support passing a reference to scroll HTMLElement * docs(JumpLinks): update demo to show example with scrollableRef * refactor(JumpLinks): getScrollableElement check if HTMLElement first Co-authored-by: Christian Vogt * docs(JumpLinks): mention scrollableRef as an option --------- Co-authored-by: Christian Vogt * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.2 - @patternfly/react-core@5.3.0-prerelease.1 - @patternfly/react-docs@6.3.0-prerelease.3 - @patternfly/react-drag-drop@5.3.0-prerelease.1 - demo-app-ts@5.1.1-prerelease.75 - @patternfly/react-table@5.3.0-prerelease.1 * fix(Menu toggle): Passed aria label prop value to typeahead variant (#10084) * fix(Menu toggle): Passed aria label prop value to typeahead variant * Fix failing build. Add back default so it does not break consumers * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.3 - @patternfly/react-core@5.3.0-prerelease.2 - @patternfly/react-docs@6.3.0-prerelease.4 - @patternfly/react-drag-drop@5.3.0-prerelease.2 - demo-app-ts@5.1.1-prerelease.76 - @patternfly/react-table@5.3.0-prerelease.2 * Revert "bug(ClipboardCopy): change children type to string (#9743)" (#9895) This reverts commit a4142535c28ed5ec3f852668fa37ac2361d75b2f. * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.4 - @patternfly/react-core@5.3.0-prerelease.3 - @patternfly/react-docs@6.3.0-prerelease.5 - @patternfly/react-drag-drop@5.3.0-prerelease.3 - demo-app-ts@5.1.1-prerelease.77 - @patternfly/react-table@5.3.0-prerelease.3 * feat(DualListSelector next): Add next composable Dual List Selector (#9901) * create next environment * updated all examples to be composable * fix double VO for list controls * remove obsolete example files * rename examples * use stronger types for unknowns * remove business logic in main component * fix tests * fixed a11y failures * update composability based on PR review * rm unnecessary funct and update tests * rm prop null assignment and add beta tag * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.5 - @patternfly/react-core@5.3.0-prerelease.4 - @patternfly/react-docs@6.3.0-prerelease.6 - @patternfly/react-drag-drop@5.3.0-prerelease.4 - demo-app-ts@5.1.1-prerelease.78 - @patternfly/react-table@5.3.0-prerelease.4 * fix(Popper): check for undefined before accessing (#10086) * chore(chars): Clean up chart examples (#10094) https://github.com/patternfly/patternfly-react/issues/10093 * bug(Select): expose height and max height props for Menu content (#10075) * bug(Select): expose height and max height props for Menu contnet * add isScrollable prop * Update packages/react-core/src/components/Select/Select.tsx Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> --------- Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> * feat(SearchInput): Add ability to add id to input in SearchInput component (#9974) * Add ability to add id to SearchInput * Fix typo * Update prop name and add tests * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.2 - @patternfly/react-code-editor@5.3.0-prerelease.6 - @patternfly/react-core@5.3.0-prerelease.5 - @patternfly/react-docs@6.3.0-prerelease.7 - @patternfly/react-drag-drop@5.3.0-prerelease.5 - demo-app-ts@5.1.1-prerelease.79 - @patternfly/react-table@5.3.0-prerelease.5 * chore(DashboardWrapper,DashboardHeader): fix for table imports (#10114) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.7 - @patternfly/react-core@5.3.0-prerelease.6 - @patternfly/react-docs@6.3.0-prerelease.8 - @patternfly/react-drag-drop@5.3.0-prerelease.6 - demo-app-ts@5.1.1-prerelease.80 - @patternfly/react-table@5.3.0-prerelease.6 * fix(deps): bump to latest core (#10116) * chore(deps): bump to latest core * fix(deps): update to latest promoted core version * fix(deps): remove ^ from core version --------- Co-authored-by: Austin Sullivan * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.3 - @patternfly/react-code-editor@5.3.0-prerelease.8 - @patternfly/react-core@5.3.0-prerelease.7 - @patternfly/react-docs@6.3.0-prerelease.9 - @patternfly/react-drag-drop@5.3.0-prerelease.7 - @patternfly/react-icons@5.3.0-prerelease.1 - demo-app-ts@5.1.1-prerelease.81 - @patternfly/react-styles@5.3.0-prerelease.1 - @patternfly/react-table@5.3.0-prerelease.7 - @patternfly/react-tokens@5.3.0-prerelease.1 * fix(charts) - ChartLegendTooltip.title has wrong type (#10129) * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.4 - @patternfly/react-docs@6.3.0-prerelease.10 * fix(Select): focus first item when opened by click (#10125) * fix(select): focus first item when opened by click * fix(dropdown/menu/pagination): Update to focus first item on click * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.9 - @patternfly/react-core@5.3.0-prerelease.8 - @patternfly/react-docs@6.3.0-prerelease.11 - @patternfly/react-drag-drop@5.3.0-prerelease.8 - demo-app-ts@5.1.1-prerelease.82 - @patternfly/react-table@5.3.0-prerelease.8 * fix(Menu): Fix crash in menu referencing invalid array index (#10153) * Fix crash in menu * Update code best on review feedback * fix linting * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.10 - @patternfly/react-core@5.3.0-prerelease.9 - @patternfly/react-docs@6.3.0-prerelease.12 - @patternfly/react-drag-drop@5.3.0-prerelease.9 - demo-app-ts@5.1.1-prerelease.83 - @patternfly/react-table@5.3.0-prerelease.9 * :bug: Address datepicker crashing when manually entering year (#10134) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.11 - @patternfly/react-core@5.3.0-prerelease.10 - @patternfly/react-docs@6.3.0-prerelease.13 - @patternfly/react-drag-drop@5.3.0-prerelease.10 - demo-app-ts@5.1.1-prerelease.84 - @patternfly/react-table@5.3.0-prerelease.10 * fix(Table): remove demos from package exports (#10165) * chore(release): releasing packages [ci skip] - @patternfly/react-docs@6.3.0-prerelease.14 - @patternfly/react-table@5.3.0-prerelease.11 * chore(Drag and drop): Marked old impmentation as deprecated (#10145) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.12 - @patternfly/react-core@5.3.0-prerelease.11 - @patternfly/react-docs@6.3.0-prerelease.15 - @patternfly/react-drag-drop@5.3.0-prerelease.11 - demo-app-ts@5.1.1-prerelease.85 - @patternfly/react-table@5.3.0-prerelease.12 * chore(CI): reenable release dist caching (#10148) * chore(deps): update dependency @patternfly/patternfly to v5.3.0-prerelease.4 (#10147) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.5 - @patternfly/react-code-editor@5.3.0-prerelease.13 - @patternfly/react-core@5.3.0-prerelease.12 - @patternfly/react-docs@6.3.0-prerelease.16 - @patternfly/react-drag-drop@5.3.0-prerelease.12 - @patternfly/react-icons@5.3.0-prerelease.2 - demo-app-ts@5.1.1-prerelease.86 - @patternfly/react-styles@5.3.0-prerelease.2 - @patternfly/react-table@5.3.0-prerelease.13 - @patternfly/react-tokens@5.3.0-prerelease.2 * fix(docs): fix undefined dashboard wrapper error in demos (#10191) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.14 - @patternfly/react-core@5.3.0-prerelease.13 - @patternfly/react-docs@6.3.0-prerelease.17 - @patternfly/react-drag-drop@5.3.0-prerelease.13 - demo-app-ts@5.1.1-prerelease.87 - @patternfly/react-table@5.3.0-prerelease.14 * chore(react-code-editor): add missing `monaco-editor` dependency (#10198) Signed-off-by: Jon Koops * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.15 - @patternfly/react-docs@6.3.0-prerelease.18 * chore(deps): update dependency @patternfly/patternfly to v5.3.0-prerelease.5 (#10200) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(ClipboardCopy): warn when clipboard API is unavailable (#10186) * bug(Select): Remove checkbox from no results found option (#10163) * fix(Table): updated a11y for empty/nontext Th components (#10152) * fix(Table): updated a11y for empty/nontext Th components * Updated additional examples and demos * Added initial Th test file * Updated deprecated snapshots, removed outdated integration test * fix(Table): added ActionsColumn prop to control close on click (#10179) * fix(Table): added ActionsColumn prop to control close on click * Added prop to prevent onOpenChange from being called * fix(TableSortableResponsive demo): end page number (#10170) * fix(MenuToggle): fix indeterminate checkbox error, toggle click behavior (#10066) * fix(MenuToggle): fix indeterminate checkbox error, toggle click behavior * revamp toggle click for checkbox * chore(release): releasing packages [ci skip] - @patternfly/react-charts@7.3.0-prerelease.6 - @patternfly/react-code-editor@5.3.0-prerelease.16 - @patternfly/react-core@5.3.0-prerelease.14 - @patternfly/react-docs@6.3.0-prerelease.19 - @patternfly/react-drag-drop@5.3.0-prerelease.14 - @patternfly/react-icons@5.3.0-prerelease.3 - @patternfly/react-integration@5.1.1-prerelease.21 - demo-app-ts@5.1.1-prerelease.88 - @patternfly/react-styles@5.3.0-prerelease.3 - @patternfly/react-table@5.3.0-prerelease.15 - @patternfly/react-tokens@5.3.0-prerelease.3 * chore: simplify Babel configuration (#10189) Signed-off-by: Jon Koops * chore(release): releasing packages [ci skip] - @patternfly/react-docs@6.3.0-prerelease.20 * fix(misc): demos not working due to variables not defined (#10169) * fix(Tabs): broken demos * fix(Banner): broken demo * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.17 - @patternfly/react-core@5.3.0-prerelease.15 - @patternfly/react-docs@6.3.0-prerelease.21 - @patternfly/react-drag-drop@5.3.0-prerelease.15 - demo-app-ts@5.1.1-prerelease.89 - @patternfly/react-table@5.3.0-prerelease.16 * feat(Dropdown): Added support for setting height for dropdown (#10149) * feat(Dropdown): Added support for setting height for dropdown * apply isScrollable to menu if maxMenuHeight or menuHeight is defined * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.18 - @patternfly/react-core@5.3.0-prerelease.16 - @patternfly/react-docs@6.3.0-prerelease.22 - @patternfly/react-drag-drop@5.3.0-prerelease.16 - demo-app-ts@5.1.1-prerelease.90 - @patternfly/react-table@5.3.0-prerelease.17 * fix(GenerateId): add randomness to id generator to prevent id collisions (#10178) * fix(GenerateId): add randomness to id generator to prevent id collisions * chore(docs): Correct prop description * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.19 - @patternfly/react-core@5.3.0-prerelease.17 - @patternfly/react-docs@6.3.0-prerelease.23 - @patternfly/react-drag-drop@5.3.0-prerelease.17 - demo-app-ts@5.1.1-prerelease.91 - @patternfly/react-table@5.3.0-prerelease.18 * feat(templates): add templates package (#10110) * feat(templates): add templates package * revert v6 merge change from previous branch loc * update template location to tab * update ver after rebase * add descriptions to simple select * pr feedback * fix merge * update docs-framework and code-editor * fix jest mocks * back out codeeditor changes * update templates version * update templates version * pr updates * yarn lockfile * update options type * Revert "yarn lockfile" This reverts commit 6839ce23050cc723f5a138dd680c7037200c1fd8. * lockfile revert * update ver * update type * doc build try 1 * feat(MenuToggle/Select): add status (#10209) * feat(MenuToggle/Select): add status * pr feedback * update menutoggle example * update example desc * mark prop as beta * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.20 - @patternfly/react-core@5.3.0-prerelease.18 - @patternfly/react-docs@6.3.0-prerelease.24 - @patternfly/react-drag-drop@5.3.0-prerelease.18 - demo-app-ts@5.1.1-prerelease.92 - @patternfly/react-table@5.3.0-prerelease.19 - @patternfly/react-templates@1.0.0-prerelease.0 * fix(TextArea): remove invalid `onFocus` and `onBlur` props (#10193) Closes #10192 Signed-off-by: Jon Koops * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.21 - @patternfly/react-core@5.3.0-prerelease.19 - @patternfly/react-docs@6.3.0-prerelease.25 - @patternfly/react-drag-drop@5.3.0-prerelease.19 - demo-app-ts@5.1.1-prerelease.93 - @patternfly/react-table@5.3.0-prerelease.20 - @patternfly/react-templates@1.0.0-prerelease.1 * fix(Card): updated v5 logic to prevent unclickable cards (#10202) * fix(Card): updated v5 logic to prevent unclickable cards * Updated API to have isSelected control selectable card state * Updated cypress test * Updated cypress test * Updated cypress test * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.22 - @patternfly/react-core@5.3.0-prerelease.20 - @patternfly/react-docs@6.3.0-prerelease.26 - @patternfly/react-drag-drop@5.3.0-prerelease.20 - @patternfly/react-integration@5.1.1-prerelease.22 - demo-app-ts@5.1.1-prerelease.94 - @patternfly/react-table@5.3.0-prerelease.21 - @patternfly/react-templates@1.0.0-prerelease.2 * Convert right-to-left demo to TS (#10164) * covert RTL demo to TS * update component type jsx to tsx * update type js to ts * fix doc build job * implement review comments * fix types * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.23 - @patternfly/react-core@5.3.0-prerelease.21 - @patternfly/react-docs@6.3.0-prerelease.27 - @patternfly/react-drag-drop@5.3.0-prerelease.21 - demo-app-ts@5.1.1-prerelease.95 - @patternfly/react-table@5.3.0-prerelease.22 - @patternfly/react-templates@1.0.0-prerelease.3 * feat(Select): add checkbox variant of the simple select template (#10159) * feat(Select): add checkbox variant of the simple select template * chore(Select): rename template * fix(Select): mock generated id in CheckboxSelect snapshot tests * chore(release): releasing packages [ci skip] - @patternfly/react-docs@6.3.0-prerelease.28 - @patternfly/react-templates@1.0.0-prerelease.4 * chore(Table): added more arialabeling for empty/nontext Table headers (#10205) * chore(release): releasing packages [ci skip] - @patternfly/react-docs@6.3.0-prerelease.29 - @patternfly/react-table@5.3.0-prerelease.23 * feat(Label): allow clickable labels to be disabled (#10199) * refactor(Label): rename button to closeButton * feat(Label): allow clickable labels to be disabled * docs(Label): add examples of clickable disabled * refactor(Label): use style token for pf-m-disabled * Prevented anchor onClick firing for AT --------- Co-authored-by: Eric Olkowski * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.24 - @patternfly/react-core@5.3.0-prerelease.22 - @patternfly/react-docs@6.3.0-prerelease.30 - @patternfly/react-drag-drop@5.3.0-prerelease.22 - demo-app-ts@5.1.1-prerelease.96 - @patternfly/react-table@5.3.0-prerelease.24 - @patternfly/react-templates@1.0.0-prerelease.5 * fix(GenerateId): revert default behavior change (#10232) * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.25 - @patternfly/react-core@5.3.0-prerelease.23 - @patternfly/react-docs@6.3.0-prerelease.31 - @patternfly/react-drag-drop@5.3.0-prerelease.23 - demo-app-ts@5.1.1-prerelease.97 - @patternfly/react-table@5.3.0-prerelease.25 - @patternfly/react-templates@1.0.0-prerelease.6 * chore: Create PF6_alpha_bug_request.md [ci skip] * feat(MenuToggle): allow split action toggle text (#10256) * feat(MenuToggle): allow split action toggle text * use var * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.26 - @patternfly/react-core@5.3.0-prerelease.24 - @patternfly/react-docs@6.3.0-prerelease.32 - @patternfly/react-drag-drop@5.3.0-prerelease.24 - demo-app-ts@5.1.1-prerelease.98 - @patternfly/react-table@5.3.0-prerelease.26 - @patternfly/react-templates@1.0.0-prerelease.7 * fix(deploy): Redeployed to npm * Update README.md * Update README.md * chore(release): releasing packages [ci skip] - @patternfly/react-code-editor@5.3.0-prerelease.27 - @patternfly/react-core@5.3.0-prerelease.25 - @patternfly/react-docs@6.3.0-prerelease.33 - @patternfly/react-drag-drop@5.3.0-prerelease.25 - demo-app-ts@5.1.1-prerelease.99 - @patternfly/react-table@5.3.0-prerelease.27 - @patternfly/react-templates@1.0.0-prerelease.8 * update jest config * update template version * update snapshots * update failing snapshot * update framework version * address review comment * update snapshots --------- Signed-off-by: gitdallas Signed-off-by: Jon Koops Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Co-authored-by: patternfly-build Co-authored-by: Jeff Puzzo <96431149+jpuzz0@users.noreply.github.com> Co-authored-by: adamviktora <84135613+adamviktora@users.noreply.github.com> Co-authored-by: Mark Franceschelli <39063664+mfrances17@users.noreply.github.com> Co-authored-by: kmcfaul <45077788+kmcfaul@users.noreply.github.com> Co-authored-by: Austin Sullivan Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kells512 <72694484+Kells512@users.noreply.github.com> Co-authored-by: nicolethoen Co-authored-by: Eric Olkowski Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> Co-authored-by: Jenny <32821331+jenny-s51@users.noreply.github.com> Co-authored-by: Dallas Co-authored-by: Maria Co-authored-by: Dominik Petřík <77832970+Dominik-Petrik@users.noreply.github.com> Co-authored-by: Erin Donehoo <105813956+edonehoo@users.noreply.github.com> Co-authored-by: Yurith Rubio <78481690+yurith-rubio@users.noreply.github.com> Co-authored-by: Joachim Schuler Co-authored-by: Robb Hamilton Co-authored-by: Donald Labaj Co-authored-by: Vojtech Szocs Co-authored-by: James Talton Co-authored-by: Dan Labrecque Co-authored-by: Christian Vogt Co-authored-by: Jessie Co-authored-by: Ian Bolton Co-authored-by: Jon Koops Co-authored-by: Ajay Pratap --- .../ISSUE_TEMPLATE/PF6_alpha_bug_request.md | 17 + .gitignore | 1 + README.md | 1 + babel.config.js | 20 +- jest.config.js | 6 +- package.json | 19 +- .../CHANGELOG.md | 16 + packages/react-charts/CHANGELOG.md | 56 + .../ChartLegendTooltip/ChartLegendTooltip.tsx | 7 +- packages/react-code-editor/CHANGELOG.md | 250 ++ packages/react-code-editor/README.md | 22 +- packages/react-code-editor/package.json | 1 + .../src/components/CodeEditor/CodeEditor.tsx | 2 +- packages/react-core/CHANGELOG.md | 321 ++ packages/react-core/README.md | 1 + .../__tests__/AccordionToggle.test.tsx | 28 + .../CalendarMonth/CalendarMonth.tsx | 51 +- .../ClipboardCopy/ClipboardCopy.tsx | 22 +- .../__tests__/ClipboardCopy.test.tsx | 2 + .../__snapshots__/ClipboardCopy.test.tsx.snap | 2 +- .../Drawer/__tests__/Drawer.test.tsx | 2 + .../__tests__/DrawerPanelContent.test.tsx | 2 + .../Generated/DrawerPanelContent.test.tsx | 2 + .../DrawerPanelContent.test.tsx.snap | 2 +- .../__snapshots__/Drawer.test.tsx.snap | 16 +- .../src/components/Dropdown/Dropdown.tsx | 18 +- .../Form/__tests__/FormFieldGroup.test.tsx | 2 + .../Form/__tests__/FormSection.test.tsx | 2 + .../FormFieldGroup.test.tsx.snap | 4 +- .../__snapshots__/FormSection.test.tsx.snap | 4 +- .../react-core/src/components/Label/Label.tsx | 30 +- .../Label/__tests__/LabelGroup.test.tsx | 2 + .../__snapshots__/LabelGroup.test.tsx.snap | 16 +- .../Label/examples/LabelCompact.tsx | 25 +- .../components/Label/examples/LabelFilled.tsx | 124 +- .../Label/examples/LabelOutline.tsx | 152 +- .../react-core/src/components/Menu/Menu.tsx | 8 +- .../src/components/Menu/MenuContainer.tsx | 4 +- .../src/components/MenuToggle/MenuToggle.tsx | 40 +- .../MenuToggle/MenuToggleCheckbox.tsx | 4 +- .../MenuToggle/__tests__/MenuToggle.test.tsx | 15 + .../MenuToggle/examples/MenuToggle.md | 26 +- ...oggleSplitButtonCheckboxWithToggleText.tsx | 51 + .../MenuToggle/examples/MenuToggleStatus.tsx | 20 + .../__tests__/MultipleFileUpload.test.tsx | 2 + .../MultipleFileUploadStatus.test.tsx | 2 + .../MultipleFileUploadStatus.test.tsx.snap | 32 +- .../Pagination/PaginationOptionsMenu.tsx | 6 +- .../__tests__/SearchInput.test.tsx | 1 + .../__snapshots__/SearchInput.test.tsx.snap | 4 +- .../src/components/Select/Select.tsx | 4 +- .../src/components/Select/examples/Select.md | 42 +- .../examples/SelectMultiTypeaheadCheckbox.tsx | 7 +- .../Select/examples/SelectValidated.tsx | 74 + .../components/Tabs/__tests__/Tabs.test.tsx | 2 + .../__snapshots__/Tabs.test.tsx.snap | 6 +- .../src/components/TextArea/TextArea.tsx | 4 - .../Toolbar/__tests__/Toolbar.test.tsx | 2 + .../__snapshots__/Toolbar.test.tsx.snap | 8 +- packages/react-core/src/demos/AlertGroup.md | 1 + packages/react-core/src/demos/BackToTop.md | 1 + packages/react-core/src/demos/Banner.md | 9 +- .../react-core/src/demos/CardView/CardView.md | 2 + .../src/demos/CardView/examples/CardView.tsx | 2 +- .../demos/DataList/examples/DataListBasic.tsx | 10 +- packages/react-core/src/demos/DataListDemo.md | 1 + .../examples/FilterAttributeSearch.tsx | 2 +- .../Filters/examples/FilterCheckboxSelect.tsx | 2 +- .../demos/Filters/examples/FilterFaceted.tsx | 2 +- .../examples/FilterMixedSelectGroup.tsx | 2 +- .../examples/FilterSameSelectGroup.tsx | 2 +- .../Filters/examples/FilterSearchInput.tsx | 2 +- .../Filters/examples/FilterSingleSelect.tsx | 2 +- packages/react-core/src/demos/JumpLinks.md | 3 +- .../react-core/src/demos/PrimaryDetail.md | 1 + packages/react-core/src/demos/RTL/RTL.md | 2 +- .../src/demos/RTL/examples/PaginatedTable.tsx | 533 ++++ packages/react-core/src/demos/Tabs.md | 7 +- packages/react-core/src/demos/Toolbar.md | 1 + .../react-core/src/demos/Wizard/WizardDemo.md | 1 + .../AlertGroupToastWithNotificationDrawer.tsx | 2 +- .../examples/BackToTop/BackToTopNameDemo.tsx | 2 +- .../src/demos/examples/Card/CardStatus.tsx | 2 +- .../examples/JumpLinks/JumpLinksWithDrawer.js | 2 +- .../src/demos/examples/Nav/NavDefault.tsx | 2 +- .../src/demos/examples/Nav/NavExpandable.tsx | 2 +- .../src/demos/examples/Nav/NavWithSubnav.tsx | 2 +- .../PrimaryDetailContentPadding.tsx | 2 +- .../PrimaryDetail/PrimaryDetailFullPage.tsx | 2 +- .../PrimaryDetailInlineModifier.tsx | 2 +- .../src/demos/examples/Tabs/ModalTabs.tsx | 2 +- .../src/demos/examples/Tabs/NestedTabs.tsx | 2 +- .../examples/Tabs/NestedUnindentedTabs.tsx | 2 +- .../src/demos/examples/Tabs/TabsAndTable.tsx | 2 +- .../Toolbar/ConsoleLogViewerToolbar.tsx | 2 +- .../src/demos/examples/Wizard/InModal.tsx | 2 +- .../Chip/__tests__/ChipGroup.test.tsx | 6 +- .../Select/__tests__/Select.test.tsx | 2 + .../__snapshots__/Select.test.tsx.snap | 38 +- .../src/helpers/GenerateId/GenerateId.ts | 20 +- .../GenerateId/__mocks__/GenerateId.ts | 11 + .../GenerateId/__tests__/GenerateId.test.tsx | 4 +- packages/react-docs/CHANGELOG.md | 284 ++ packages/react-docs/package.json | 2 +- .../patternfly-docs/patternfly-docs.source.js | 5 + packages/react-drag-drop/CHANGELOG.md | 159 + packages/react-icons/CHANGELOG.md | 44 + packages/react-integration/CHANGELOG.md | 46 + .../integration/tableselectable.spec.ts | 5 +- .../demo-app-ts/CHANGELOG.md | 238 ++ .../components/demos/CardDemo/CardDemo.tsx | 4 +- .../demos/TableDemo/TableComposableDemo.tsx | 6 +- packages/react-styles/CHANGELOG.md | 36 + packages/react-table/CHANGELOG.md | 250 ++ .../src/components/Table/ActionsColumn.tsx | 61 +- .../src/components/Table/TableTypes.tsx | 2 + .../react-table/src/components/Table/Th.tsx | 22 +- .../components/Table/__tests__/Th.test.tsx | 31 + .../Table/examples/TableActions.tsx | 4 +- .../Table/examples/TableActionsOverflow.tsx | 2 +- .../examples/TableCompoundExpandable.tsx | 2 +- .../Table/examples/TableDraggable.tsx | 35 +- .../Table/examples/TableExpandable.tsx | 2 +- .../Table/examples/TableNestedExpandable.tsx | 2 +- .../examples/TableNestedStickyHeader.tsx | 3 - .../examples/TableNestedTableExpandable.tsx | 2 +- .../Table/examples/TableSelectable.tsx | 1 + .../Table/examples/TableSelectableRadio.tsx | 2 +- .../Table/examples/TableStripedExpandable.tsx | 2 +- .../Table/utils/decorators/selectable.tsx | 2 +- .../src/demos/examples/TableBulkSelect.tsx | 2 +- .../demos/examples/TableColumnManagement.tsx | 12 +- .../demos/examples/TableCompoundExpansion.tsx | 14 +- .../demos/examples/TableExpandCollapseAll.tsx | 3 +- .../__snapshots__/Table.test.tsx.snap | 14 +- packages/react-templates/.gitignore | 2 + packages/react-templates/.npmignore | 2 + packages/react-templates/CHANGELOG.md | 44 + packages/react-templates/README.md | 42 + packages/react-templates/package.json | 50 + packages/react-templates/rollup.config.js | 7 + .../single-packages.config.json | 4 + .../components/Select/CheckboxSelect.test.tsx | 256 ++ .../src/components/Select/CheckboxSelect.tsx | 113 + .../Select/CheckboxSelectSnapshots.test.tsx | 32 + .../src/components/Select/SelectSimple.tsx | 100 + .../CheckboxSelectSnapshots.test.tsx.snap | 212 ++ .../Select/examples/CheckboxSelectDemo.tsx | 13 + .../Select/examples/SelectSimpleDemo.tsx | 26 + .../Select/examples/SelectTemplates.md | 28 + .../src/components/Select/index.ts | 2 + .../react-templates/src/components/index.ts | 1 + packages/react-templates/src/index.ts | 1 + packages/react-templates/subpaths.config.json | 4 + packages/react-templates/tsconfig.cjs.json | 8 + packages/react-templates/tsconfig.json | 23 + packages/react-tokens/CHANGELOG.md | 36 + .../CHANGELOG.md | 9 + packages/tsconfig.cjs.json | 3 + packages/tsconfig.json | 3 + scripts/promote.sh | 1 + yarn.lock | 2801 ++++++----------- 162 files changed, 5171 insertions(+), 2264 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/PF6_alpha_bug_request.md create mode 100644 packages/react-core/src/components/MenuToggle/examples/MenuToggleSplitButtonCheckboxWithToggleText.tsx create mode 100644 packages/react-core/src/components/MenuToggle/examples/MenuToggleStatus.tsx create mode 100644 packages/react-core/src/components/Select/examples/SelectValidated.tsx create mode 100644 packages/react-core/src/demos/RTL/examples/PaginatedTable.tsx create mode 100644 packages/react-core/src/helpers/GenerateId/__mocks__/GenerateId.ts create mode 100644 packages/react-table/src/components/Table/__tests__/Th.test.tsx create mode 100644 packages/react-templates/.gitignore create mode 100644 packages/react-templates/.npmignore create mode 100644 packages/react-templates/CHANGELOG.md create mode 100644 packages/react-templates/README.md create mode 100644 packages/react-templates/package.json create mode 100644 packages/react-templates/rollup.config.js create mode 100644 packages/react-templates/single-packages.config.json create mode 100644 packages/react-templates/src/components/Select/CheckboxSelect.test.tsx create mode 100644 packages/react-templates/src/components/Select/CheckboxSelect.tsx create mode 100644 packages/react-templates/src/components/Select/CheckboxSelectSnapshots.test.tsx create mode 100644 packages/react-templates/src/components/Select/SelectSimple.tsx create mode 100644 packages/react-templates/src/components/Select/__snapshots__/CheckboxSelectSnapshots.test.tsx.snap create mode 100644 packages/react-templates/src/components/Select/examples/CheckboxSelectDemo.tsx create mode 100644 packages/react-templates/src/components/Select/examples/SelectSimpleDemo.tsx create mode 100644 packages/react-templates/src/components/Select/examples/SelectTemplates.md create mode 100644 packages/react-templates/src/components/Select/index.ts create mode 100644 packages/react-templates/src/components/index.ts create mode 100644 packages/react-templates/src/index.ts create mode 100644 packages/react-templates/subpaths.config.json create mode 100644 packages/react-templates/tsconfig.cjs.json create mode 100644 packages/react-templates/tsconfig.json 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 ( -