From 4a58c89cce6f58507a6436652b02655a6533d308 Mon Sep 17 00:00:00 2001 From: Titani Labaj <39532947+tlabaj@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:18:04 -0500 Subject: [PATCH] V6 rebase (#10033) 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 accoridan examples * updates to fix docs * bump docs-framework version --------- Signed-off-by: gitdallas 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: Titani --- package.json | 2 +- packages/react-charts/CHANGELOG.md | 20 + packages/react-charts/package.json | 36 +- .../react-charts/single-packages.config.json | 9 +- packages/react-code-editor/CHANGELOG.md | 122 +++ packages/react-code-editor/package.json | 6 +- .../src/components/CodeEditor/CodeEditor.tsx | 9 +- .../CodeEditor/__test__/CodeEditor.test.tsx | 111 +- .../__test__/CodeEditorControl.test.tsx | 18 + .../__snapshots__/CodeEditor.test.tsx.snap | 447 +------- .../CodeEditorControl.test.tsx.snap | 22 + packages/react-core/CHANGELOG.md | 156 +++ .../react-core/single-packages.config.json | 8 +- .../src/components/Accordion/Accordion.tsx | 7 +- .../components/Accordion/AccordionContext.ts | 1 + .../components/Accordion/AccordionToggle.tsx | 16 +- .../Accordion/__tests__/Accordion.test.tsx | 12 + .../__tests__/AccordionToggle.test.tsx | 28 + .../Accordion/examples/Accordion.md | 5 + .../examples/AccordionToggleIconAtStart.tsx | 102 ++ .../src/components/Checkbox/Checkbox.tsx | 92 +- .../Checkbox/__tests__/Checkbox.test.tsx | 41 + .../react-core/src/components/Chip/Chip.tsx | 2 + .../__snapshots__/Chip.test.tsx.snap | 1 - .../ClipboardCopy/ClipboardCopy.tsx | 3 +- .../DataListAction.test.tsx.snap~HEAD | 11 + .../DataListAction.test.tsx.snap~main | 11 + .../DataListItemCells.test.tsx.snap~HEAD | 9 + .../DataListItemCells.test.tsx.snap~main | 9 + .../DataListItemRow.test.tsx.snap~HEAD | 9 + .../DataListItemRow.test.tsx.snap~main | 9 + .../components/DataList/examples/DataList.md | 4 +- .../components/DragDrop/examples/DragDrop.md | 6 +- .../DragDrop/examples/DragDropBasic.tsx | 8 +- .../examples/DragDropMultipleLists.tsx | 9 +- .../src/components/DragDrop/index.ts | 1 + .../examples/DualListSelector.md | 4 +- .../src/components/DualListSelector/index.ts | 2 + .../components/FileUpload/FileUploadField.tsx | 6 +- .../__snapshots__/FileUpload.test.tsx.snap | 1 - .../FileUploadField.test.tsx.snap | 1 - .../src/components/Popover/Popover.tsx | 8 +- .../react-core/src/components/Radio/Radio.tsx | 77 +- .../components/Radio/__tests__/Radio.test.tsx | 41 + packages/react-core/src/components/index.ts | 2 +- .../ExpandableSection/ExpandableSection.md | 17 + .../examples/ExpandableTextDemo.tsx | 30 + packages/react-core/src/index.ts | 2 +- .../src/next/components/Modal/Modal.tsx | 202 ++++ .../src/next/components/Modal/ModalBody.tsx | 42 + .../src/next/components/Modal/ModalBox.tsx | 63 ++ .../components/Modal/ModalBoxCloseButton.tsx | 38 + .../components/Modal/ModalBoxDescription.tsx | 24 + .../next/components/Modal/ModalBoxTitle.tsx | 75 ++ .../next/components/Modal/ModalContent.tsx | 131 +++ .../src/next/components/Modal/ModalFooter.tsx | 23 + .../src/next/components/Modal/ModalHeader.tsx | 71 ++ .../components/Modal/__tests__/Modal.test.tsx | 145 +++ .../Modal/__tests__/ModalBody.test.tsx | 60 ++ .../Modal/__tests__/ModalBox.test.tsx | 58 ++ .../__tests__/ModalBoxCloseButton.test.tsx | 18 + .../__tests__/ModalBoxDescription.test.tsx | 8 + .../Modal/__tests__/ModalBoxHeader.test.tsx | 21 + .../Modal/__tests__/ModalBoxTitle.test.tsx | 37 + .../Modal/__tests__/ModalContent.test.tsx | 46 + .../Modal/__tests__/ModalFooter.test.tsx | 8 + .../__snapshots__/ModalBody.test.tsx.snap | 12 + .../__snapshots__/ModalBox.test.tsx.snap | 86 ++ .../ModalBoxDescription.test.tsx.snap | 12 + .../ModalBoxHeader.test.tsx.snap | 46 + .../__snapshots__/ModalBoxTitle.test.tsx.snap | 218 ++++ .../__snapshots__/ModalContent.test.tsx.snap | 128 +++ .../__snapshots__/ModalFooter.test.tsx.snap | 11 + .../next/components/Modal/examples/Modal.md | 148 +++ .../components/Modal/examples/ModalBasic.tsx | 43 + .../Modal/examples/ModalCustomFocus.tsx | 43 + .../Modal/examples/ModalCustomHeader.tsx | 58 ++ .../Modal/examples/ModalCustomTitleIcon.tsx | 54 + .../Modal/examples/ModalCustomWidth.tsx | 43 + .../Modal/examples/ModalNoHeaderFooter.tsx | 40 + .../components/Modal/examples/ModalSize.tsx | 63 ++ .../Modal/examples/ModalTitleIcon.tsx | 48 + .../Modal/examples/ModalTopAligned.tsx | 43 + .../Modal/examples/ModalWithDescription.tsx | 80 ++ .../Modal/examples/ModalWithDropdown.tsx | 105 ++ .../Modal/examples/ModalWithForm.tsx | 211 ++++ .../Modal/examples/ModalWithHelp.tsx | 63 ++ .../examples/ModalWithOverflowingContent.tsx | 75 ++ .../Modal/examples/ModalWithWizard.tsx | 59 ++ .../src/next/components/Modal/index.ts | 4 + .../react-core/src/next/components/index.ts | 2 +- packages/react-core/src/styles/index.ts | 1 + packages/react-docs/CHANGELOG.md | 130 +++ packages/react-docs/package.json | 3 +- .../patternfly-docs/patternfly-docs.source.js | 5 + packages/react-drag-drop/CHANGELOG.md | 40 + packages/react-drag-drop/package.json | 49 + packages/react-drag-drop/src/index.ts | 1 + .../next/components/DragDrop/DragButton.tsx | 27 + .../next/components/DragDrop/DragDropSort.tsx | 182 ++++ .../next/components/DragDrop/Draggable.tsx | 58 ++ .../DragDrop/DraggableDataListItem.tsx | 61 ++ .../DraggableDualListSelectorListItem.tsx | 93 ++ .../next/components/DragDrop/Droppable.tsx | 27 + .../components/DragDrop/DroppableContext.ts | 6 + .../DragDrop/__tests__/DragDrop.test.tsx | 19 + .../__snapshots__/DragDrop.test.tsx.snap | 59 ++ .../DragDrop/examples/BasicSorting.tsx | 19 + .../examples/BasicSortingWithDragButton.tsx | 20 + .../DragDrop/examples/DataListDraggable.tsx | 38 + .../components/DragDrop/examples/DragDrop.md | 32 + .../DragDrop/examples/DragDropDemos.md | 37 + .../examples/DualListSelectorDraggable.tsx | 154 +++ .../src/next/components/DragDrop/index.ts | 1 + .../src/next/components/index.ts | 1 + packages/react-drag-drop/src/next/index.ts | 1 + packages/react-drag-drop/tsconfig.cjs.json | 8 + packages/react-drag-drop/tsconfig.json | 23 + packages/react-icons/CHANGELOG.md | 20 + .../react-icons/single-packages.config.json | 6 +- packages/react-integration/CHANGELOG.md | 28 + .../cypress/integration/chip.spec.ts | 2 +- .../cypress/integration/codeeditor.spec.ts | 5 +- .../cypress/integration/modalnext.spec.ts | 106 ++ .../demo-app-ts/CHANGELOG.md | 120 +++ .../demo-app-ts/src/Demos.ts | 5 + .../demos/ModalNextDemo/ModalNextDemo.tsx | 622 +++++++++++ .../demo-app-ts/src/components/demos/index.ts | 1 + packages/react-integration/package.json | 2 - packages/react-styles/CHANGELOG.md | 12 + packages/react-table/CHANGELOG.md | 118 +++ .../react-table/single-packages.config.json | 9 +- packages/react-tokens/CHANGELOG.md | 12 + .../CHANGELOG.md | 9 + packages/tsconfig.cjs.json | 3 + packages/tsconfig.json | 3 + scripts/promote.sh | 1 + yarn.lock | 966 ++++++++---------- 138 files changed, 6318 insertions(+), 1145 deletions(-) create mode 100644 packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditorControl.test.tsx create mode 100644 packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditorControl.test.tsx.snap create mode 100644 packages/react-core/src/components/Accordion/examples/AccordionToggleIconAtStart.tsx create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListAction.test.tsx.snap~HEAD create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListAction.test.tsx.snap~main create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListItemCells.test.tsx.snap~HEAD create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListItemCells.test.tsx.snap~main create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListItemRow.test.tsx.snap~HEAD create mode 100644 packages/react-core/src/components/DataList/__tests__/__snapshots__/DataListItemRow.test.tsx.snap~main create mode 100644 packages/react-core/src/demos/ExpandableSection/ExpandableSection.md create mode 100644 packages/react-core/src/demos/ExpandableSection/examples/ExpandableTextDemo.tsx create mode 100644 packages/react-core/src/next/components/Modal/Modal.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalBody.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalBox.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalBoxCloseButton.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalBoxDescription.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalBoxTitle.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalContent.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalFooter.tsx create mode 100644 packages/react-core/src/next/components/Modal/ModalHeader.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/Modal.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBody.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBox.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBoxCloseButton.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBoxDescription.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBoxHeader.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalBoxTitle.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalContent.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/ModalFooter.test.tsx create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalBody.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalBox.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalBoxDescription.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalBoxHeader.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalBoxTitle.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalContent.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/__tests__/__snapshots__/ModalFooter.test.tsx.snap create mode 100644 packages/react-core/src/next/components/Modal/examples/Modal.md create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalBasic.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalCustomFocus.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalCustomHeader.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalCustomTitleIcon.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalCustomWidth.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalNoHeaderFooter.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalSize.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalTitleIcon.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalTopAligned.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithDescription.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithDropdown.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithForm.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithHelp.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithOverflowingContent.tsx create mode 100644 packages/react-core/src/next/components/Modal/examples/ModalWithWizard.tsx create mode 100644 packages/react-core/src/next/components/Modal/index.ts create mode 100644 packages/react-core/src/styles/index.ts create mode 100644 packages/react-drag-drop/CHANGELOG.md create mode 100644 packages/react-drag-drop/package.json create mode 100644 packages/react-drag-drop/src/index.ts create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DragButton.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DragDropSort.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/Draggable.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DraggableDataListItem.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DraggableDualListSelectorListItem.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/Droppable.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/DroppableContext.ts create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/__tests__/DragDrop.test.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/__tests__/__snapshots__/DragDrop.test.tsx.snap create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/BasicSorting.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/BasicSortingWithDragButton.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/DataListDraggable.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/DragDrop.md create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/DragDropDemos.md create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/examples/DualListSelectorDraggable.tsx create mode 100644 packages/react-drag-drop/src/next/components/DragDrop/index.ts create mode 100644 packages/react-drag-drop/src/next/components/index.ts create mode 100644 packages/react-drag-drop/src/next/index.ts create mode 100644 packages/react-drag-drop/tsconfig.cjs.json create mode 100644 packages/react-drag-drop/tsconfig.json create mode 100644 packages/react-integration/cypress/integration/modalnext.spec.ts create mode 100644 packages/react-integration/demo-app-ts/src/components/demos/ModalNextDemo/ModalNextDemo.tsx diff --git a/package.json b/package.json index 57a66b9b94c..f8c3db8b07e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "@octokit/rest": "^20.0.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "14.5.1", + "@testing-library/user-event": "14.5.2", "@types/jest": "29.5.11", "@types/react": "^18", "@types/react-dom": "^18", diff --git a/packages/react-charts/CHANGELOG.md b/packages/react-charts/CHANGELOG.md index 5dc94f89f87..ef05ba4377a 100644 --- a/packages/react-charts/CHANGELOG.md +++ b/packages/react-charts/CHANGELOG.md @@ -73,6 +73,26 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **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 + # 7.2.0-prerelease.5 (2023-10-26) **Note:** Version bump only for package @patternfly/react-charts diff --git a/packages/react-charts/package.json b/packages/react-charts/package.json index 7408c90da01..b9856cbe77a 100644 --- a/packages/react-charts/package.json +++ b/packages/react-charts/package.json @@ -32,25 +32,25 @@ "@patternfly/react-styles": "^6.0.0-alpha.9", "@patternfly/react-tokens": "^6.0.0-alpha.9", "hoist-non-react-statics": "^3.3.0", - "lodash": "^4.17.19", + "lodash": "^4.17.21", "tslib": "^2.5.0", - "victory-area": "^36.6.11", - "victory-axis": "^36.6.11", - "victory-bar": "^36.6.11", - "victory-box-plot": "^36.6.11", - "victory-chart": "^36.6.11", - "victory-core": "^36.6.11", - "victory-create-container": "^36.6.11", - "victory-cursor-container": "^36.6.11", - "victory-group": "^36.6.11", - "victory-legend": "^36.6.11", - "victory-line": "^36.6.11", - "victory-pie": "^36.6.11", - "victory-scatter": "^36.6.11", - "victory-stack": "^36.6.11", - "victory-tooltip": "^36.6.11", - "victory-voronoi-container": "^36.6.11", - "victory-zoom-container": "^36.6.11" + "victory-area": "^36.8.1", + "victory-axis": "^36.8.1", + "victory-bar": "^36.8.1", + "victory-box-plot": "^36.8.1", + "victory-chart": "^36.8.1", + "victory-core": "^36.8.1", + "victory-create-container": "^36.8.1", + "victory-cursor-container": "^36.8.1", + "victory-group": "^36.8.1", + "victory-legend": "^36.8.1", + "victory-line": "^36.8.1", + "victory-pie": "^36.8.1", + "victory-scatter": "^36.8.1", + "victory-stack": "^36.8.1", + "victory-tooltip": "^36.8.1", + "victory-voronoi-container": "^36.8.1", + "victory-zoom-container": "^36.8.1" }, "peerDependencies": { "react": "^17 || ^18", diff --git a/packages/react-charts/single-packages.config.json b/packages/react-charts/single-packages.config.json index 3f8a214d194..4a9651bb17d 100644 --- a/packages/react-charts/single-packages.config.json +++ b/packages/react-charts/single-packages.config.json @@ -1,7 +1,4 @@ { - "packageName": "@patternfly/react-charts", - "exclude": [ - "dist/esm/deprecated/index.js", - "dist/esm/next/index.js" - ] -} \ No newline at end of file + "packageName": "@patternfly/react-charts", + "exclude": ["dist/esm/deprecated/index.js", "dist/esm/next/index.js"] +} diff --git a/packages/react-code-editor/CHANGELOG.md b/packages/react-code-editor/CHANGELOG.md index bd80f3d7f50..af0411dfd3f 100644 --- a/packages/react-code-editor/CHANGELOG.md +++ b/packages/react-code-editor/CHANGELOG.md @@ -237,6 +237,128 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline **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 + # [5.2.0-prerelease.19](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@5.2.0-prerelease.18...@patternfly/react-code-editor@5.2.0-prerelease.19) (2023-10-30) **Note:** Version bump only for package @patternfly/react-code-editor diff --git a/packages/react-code-editor/package.json b/packages/react-code-editor/package.json index c03163af405..9de77b50c5b 100644 --- a/packages/react-code-editor/package.json +++ b/packages/react-code-editor/package.json @@ -34,12 +34,12 @@ "@patternfly/react-icons": "^6.0.0-alpha.9", "@patternfly/react-styles": "^6.0.0-alpha.9", "react-dropzone": "14.2.3", - "tslib": "^2.5.0" + "tslib": "^2.5.0", + "@monaco-editor/react": "^4.6.0" }, "peerDependencies": { "react": "^17 || ^18", - "react-dom": "^17 || ^18", - "react-monaco-editor": "^0.51.0" + "react-dom": "^17 || ^18" }, "devDependencies": { "rimraf": "^2.6.2", diff --git a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx index d7b84a73836..0311481f349 100644 --- a/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/CodeEditor.tsx @@ -15,7 +15,7 @@ import { PopoverProps, TooltipPosition } from '@patternfly/react-core'; -import MonacoEditor, { ChangeHandler, EditorDidMount } from 'react-monaco-editor'; +import Editor, { Monaco } from '@monaco-editor/react'; import { editor } from 'monaco-editor/esm/vs/editor/editor.api'; import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon'; import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon'; @@ -26,6 +26,9 @@ import Dropzone, { FileRejection } from 'react-dropzone'; import { CodeEditorContext } from './CodeEditorUtils'; import { CodeEditorControl } from './CodeEditorControl'; +export type ChangeHandler = (value: string, event: editor.IModelContentChangedEvent) => void; +export type EditorDidMount = (editor: editor.IStandaloneCodeEditor, monaco: Monaco) => void; + export interface Shortcut { description: string; keys: string[]; @@ -619,7 +622,7 @@ class CodeEditor extends React.Component { const editor = (
- { options={options} overrideServices={overrideServices} onChange={this.onChange} - editorDidMount={this.editorDidMount} + onMount={this.editorDidMount} theme={isDarkTheme ? 'vs-dark' : 'vs-light'} />
diff --git a/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx index 3703f1ad875..78e403d5fec 100644 --- a/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx +++ b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditor.test.tsx @@ -1,46 +1,79 @@ import React from 'react'; -import { render } from '@testing-library/react'; +import { render, screen, act } from '@testing-library/react'; import { CodeEditor, Language } from '../CodeEditor'; +import styles from '@patternfly/react-styles/css/components/CodeEditor/code-editor'; +import fileUploadStyles from '@patternfly/react-styles/css/components/FileUpload/file-upload'; -Object.defineProperty(window, 'matchMedia', { - writable: true, - value: jest.fn().mockImplementation((query) => ({ - matches: false, - media: query, - onchange: null, - addListener: jest.fn(), // Deprecated - removeListener: jest.fn(), // Deprecated - addEventListener: jest.fn(), - removeEventListener: jest.fn(), - dispatchEvent: jest.fn() - })) -}); - -describe('CodeEditor', () => { - beforeAll(() => { - window.HTMLCanvasElement.prototype.getContext = () => ({}) as any; - }); +jest.mock('@monaco-editor/react', () => jest.fn(() =>
)); - test('matches snapshot without props', () => { - const { asFragment } = render(); - expect(asFragment()).toMatchSnapshot(); - }); +test('Matches snapshot without props', () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); + +test('Matches snapshot with control buttons enabled', () => { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); +}); + +test(`Renders with default classes ${styles.codeEditor}, ${styles.codeEditorMain}, ${styles.codeEditorCode}`, () => { + render(); + expect(screen.getByTestId('mock-editor').parentElement).toHaveClass(styles.codeEditorCode); + expect(screen.getByTestId('mock-editor').parentElement?.parentElement).toHaveClass(styles.codeEditorMain); + expect(screen.getByTestId('mock-editor').parentElement?.parentElement?.parentElement).toHaveClass(styles.codeEditor); +}); + +test('Renders custom class when className is passed', () => { + render(); + expect(screen.getByTestId('mock-editor').parentElement?.parentElement?.parentElement).toHaveClass('custom'); +}); + +test(`Renders with ${styles.modifiers.readOnly} when isReadOnly = true`, () => { + render(); + expect(screen.getByTestId('mock-editor').parentElement?.parentElement?.parentElement).toHaveClass( + styles.modifiers.readOnly + ); +}); + +test(`Renders with ${fileUploadStyles.fileUpload} when isUploadEnabled = true`, () => { + render(); + expect(screen.getByTestId('mock-editor').parentElement?.parentElement?.parentElement).toHaveClass( + fileUploadStyles.fileUpload + ); +}); + +test(`Renders with empty state when code = undefined`, () => { + render(empty} />); + expect(screen.getByText('empty')).toBeInTheDocument(); +}); + +test(`Renders with empty state when isUploadEnabled = true and code = undefined`, () => { + render(empty} isUploadEnabled />); + expect(screen.getByText('empty')).toBeInTheDocument(); +}); + +test(`Renders with language label when isLanguageLabelVisible`, () => { + render(); + expect(screen.getByText('JAVA')).toBeInTheDocument(); +}); + +test(`Renders with custom controls when customControls is passed`, () => { + render(control} />); + expect(screen.getByText('control')).toBeInTheDocument(); +}); + +test(`Renders with custom header content when headerMainContent is passed`, () => { + render(); + expect(screen.getByText('header content')).toBeInTheDocument(); +}); - test('matches snapshot with all props', () => { - const { asFragment } = render( - - ); - expect(asFragment()).toMatchSnapshot(); +test(`Renders with shortcuts when shortcutsPopoverButtonText is passed`, () => { + render( + + ); + expect(screen.getByText('shortcuts-button')).toBeInTheDocument(); + act(() => { + screen.getByText('shortcuts-button').click(); }); + expect(screen.getByText('shortcuts')).toBeInTheDocument(); }); diff --git a/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditorControl.test.tsx b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditorControl.test.tsx new file mode 100644 index 00000000000..847cf6cda33 --- /dev/null +++ b/packages/react-code-editor/src/components/CodeEditor/__test__/CodeEditorControl.test.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import { CodeEditorControl } from '../CodeEditorControl'; + +test('Matches snapshot', () => { + const { asFragment } = render(icon} onClick={jest.fn()} />); + expect(asFragment()).toMatchSnapshot(); +}); + +test('Renders with custom class when className is passed', () => { + render(icon} onClick={jest.fn()} />); + expect(screen.getByText('icon').parentElement).toHaveClass('custom'); +}); + +test('Renders with accessible name when aria-label is passed', () => { + render(icon} onClick={jest.fn()} />); + expect(screen.getByLabelText('aria-test')); +}); diff --git a/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap b/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap index a81731992c9..2dfcbd78dd7 100644 --- a/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap +++ b/packages/react-code-editor/src/components/CodeEditor/__test__/__snapshots__/CodeEditor.test.tsx.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`CodeEditor matches snapshot with all props 1`] = ` +exports[`Matches snapshot with control buttons enabled 1`] = `
-
- - - - - JAVASCRIPT - -
-
-
-