Skip to content

Commit

Permalink
Rebase postv5 (#9393)
Browse files Browse the repository at this point in the history
* chore(deps): bump docs framework (#9370)

* chore(docs): Updated screenshots (#9337)

* chore(docs): Updated screenshots

* updated screenshots after logo update

---------

Co-authored-by: Titani <[email protected]>

* chore(release): releasing packages [ci skip]

 - @patternfly/[email protected]

* chore(deps): bump to latest chore version (#9389)

* chore(deps): bump to latest chore version

* bump to 16

* chore(release): releasing packages [ci skip]

 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - [email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]

* fix(fileupload): use default readonly text input instead of plain (#9387)

* fix(fileupload): use default readonly text input instead of plain

* chore(build): snaps

* fix(CodeEditor): prevent clicks in textarea from opening fileupload (#9385)

* fix(toolbar): added chip container class to toolbar content (#9379)

* feat(Menu): added support for tooltips to menu (#9382)

* fix(whitespace): Update readme to trigger release

* chore(release): releasing packages [ci skip]

 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - @patternfly/[email protected]
 - [email protected]
 - @patternfly/[email protected]

* fix(Toolbar): resolved typeerror on full page demo (#9355)

* chore(TreeView): converted examples to TS (#9286)

* fix(ExpandableSection): added ARIA attributes (#9303)

* fix(ExpandableSection): added ARIA attributes

* Updated failing snapshots due to mismatching generated ID

* chore(Tooltip): updated unit tests (#9295)

* chore(Tooltip): updated unit tests

* Updated mock and tests

* Updated based on Austin feedback

* Updated integration tests

* Removed unused imports

* Updated remaining tests using Popper mock

* Removed extraenous snapshot test

* Removed test

* Split out onTooltipHidden test

* chore(Card): added tests for new clickable/selectable (#9262)

* chore(Card): added tests for new clickable/selectable

* Added tests for clickable cards

* Updated card with actions test

* fix(Slider): reverted taborder (#9293)

* fix(chore): Fix deprecated wizard integration tests (#9312)

* fix(chore): Fix deprecated wizard integration tests

* updated non deprecated test as well

---------

Co-authored-by: Titani <[email protected]>

---------

Co-authored-by: Titani <[email protected]>
Co-authored-by: patternfly-build <[email protected]>
Co-authored-by: Michael Coker <[email protected]>
Co-authored-by: Dallas <[email protected]>
Co-authored-by: Dana Gutride <[email protected]>
Co-authored-by: Eric Olkowski <[email protected]>
  • Loading branch information
7 people authored Jul 21, 2023
1 parent 77369cd commit 0d5ec4f
Show file tree
Hide file tree
Showing 100 changed files with 218 additions and 91 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This project provides a set of React components for the [PatternFly project](htt
3. [Contribution guidelines](#Contribution-guidelines)
4. [License](#License)

Using PatternFly 3? Take a look at the [PatternFly 3 React component information](https://github.com/patternfly/patternfly-react/blob/patternfly-3/README.md).
Using PatternFly 3? Take a look at the [PatternFly 3 React component information](https://github.com/patternfly/patternfly-react/blob/patternfly-3/README.md).

### PatternFly React packages

Expand Down
4 changes: 4 additions & 0 deletions packages/react-charts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 7.0.0-prerelease.12 (2023-07-20)

**Note:** Version bump only for package @patternfly/react-charts

# [7.0.0-prerelease.11](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-07-14)

**Note:** Version bump only for package @patternfly/react-charts
Expand Down
6 changes: 3 additions & 3 deletions packages/react-charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-charts",
"version": "7.0.0-prerelease.11",
"version": "7.0.0-prerelease.12",
"description": "This library provides a set of React chart components for use with the PatternFly reference implementation.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -29,8 +29,8 @@
},
"homepage": "https://github.com/patternfly/patternfly-react#readme",
"dependencies": {
"@patternfly/react-styles": "^5.0.0-prerelease.6",
"@patternfly/react-tokens": "^5.0.0-prerelease.8",
"@patternfly/react-styles": "^5.0.0-prerelease.7",
"@patternfly/react-tokens": "^5.0.0-prerelease.9",
"hoist-non-react-statics": "^3.3.0",
"lodash": "^4.17.19",
"tslib": "^2.5.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/react-code-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.0.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-07-20)

### Bug Fixes

- **CodeEditor:** prevent clicks in textarea from opening fileupload ([#9385](https://github.com/patternfly/patternfly-react/issues/9385)) ([959bc7e](https://github.com/patternfly/patternfly-react/commit/959bc7ef2723bc3ef57db906ded7b1854b577eee))

# 5.0.0-prerelease.24 (2023-07-20)

**Note:** Version bump only for package @patternfly/react-code-editor

# [5.0.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-07-14)

**Note:** Version bump only for package @patternfly/react-code-editor
Expand Down
8 changes: 4 additions & 4 deletions packages/react-code-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-code-editor",
"version": "5.0.0-prerelease.23",
"version": "5.0.0-prerelease.25",
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -30,9 +30,9 @@
"clean": "rimraf dist"
},
"dependencies": {
"@patternfly/react-core": "^5.0.0-prerelease.23",
"@patternfly/react-icons": "^5.0.0-prerelease.8",
"@patternfly/react-styles": "^5.0.0-prerelease.6",
"@patternfly/react-core": "^5.0.0-prerelease.25",
"@patternfly/react-icons": "^5.0.0-prerelease.9",
"@patternfly/react-styles": "^5.0.0-prerelease.7",
"react-dropzone": "14.2.3",
"tslib": "^2.5.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ export class CodeEditor extends React.Component<CodeEditorProps, CodeEditorState
{isUploadEnabled || providedEmptyState ? (
<div
{...getRootProps({
onClick: (event) => event.preventDefault() // Prevents clicking TextArea from opening file dialog
onClick: (event) => event.stopPropagation() // Prevents clicking TextArea from opening file dialog
})}
className={`pf-v5-c-file-upload ${isDragActive && 'pf-m-drag-hover'} ${isLoading && 'pf-m-loading'}`}
>
Expand Down
15 changes: 15 additions & 0 deletions packages/react-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# [5.0.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-07-20)

### Bug Fixes

- **fileupload:** use default readonly text input instead of plain ([#9387](https://github.com/patternfly/patternfly-react/issues/9387)) ([cc8f777](https://github.com/patternfly/patternfly-react/commit/cc8f777364e65dfc883e653d36931e885b56e804))
- **toolbar:** added chip container class to toolbar content ([#9379](https://github.com/patternfly/patternfly-react/issues/9379)) ([df21278](https://github.com/patternfly/patternfly-react/commit/df2127881a00299e8bf73dab14dfc7482598a14b))

### Features

- **Menu:** added support for tooltips to menu ([#9382](https://github.com/patternfly/patternfly-react/issues/9382)) ([8579096](https://github.com/patternfly/patternfly-react/commit/8579096dbc4ff48217e5e3e71923a589f60cda7f))

# 5.0.0-prerelease.24 (2023-07-20)

**Note:** Version bump only for package @patternfly/react-core

# [5.0.0-prerelease.23](https://github.com/patternfly/patternfly-react/compare/@patternfly/[email protected]...@patternfly/[email protected]) (2023-07-14)

**Note:** Version bump only for package @patternfly/react-core
Expand Down
10 changes: 5 additions & 5 deletions packages/react-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patternfly/react-core",
"version": "5.0.0-prerelease.23",
"version": "5.0.0-prerelease.25",
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
"main": "dist/js/index.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -46,15 +46,15 @@
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
},
"dependencies": {
"@patternfly/react-icons": "^5.0.0-prerelease.8",
"@patternfly/react-styles": "^5.0.0-prerelease.6",
"@patternfly/react-tokens": "^5.0.0-prerelease.8",
"@patternfly/react-icons": "^5.0.0-prerelease.9",
"@patternfly/react-styles": "^5.0.0-prerelease.7",
"@patternfly/react-tokens": "^5.0.0-prerelease.9",
"focus-trap": "7.4.3",
"react-dropzone": "^14.2.3",
"tslib": "^2.5.0"
},
"devDependencies": {
"@patternfly/patternfly": "5.0.0-prerelease.13",
"@patternfly/patternfly": "5.0.0-prerelease.16",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.2",
Expand Down
9 changes: 9 additions & 0 deletions packages/react-core/src/components/Dropdown/DropdownItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { css } from '@patternfly/react-styles';
import { MenuItemProps, MenuItem } from '../Menu';
import { TooltipProps } from '../Tooltip';
import { useOUIAProps, OUIAProps } from '../../helpers';

/**
Expand All @@ -17,6 +18,8 @@ export interface DropdownItemProps extends Omit<MenuItemProps, 'ref'>, OUIAProps
description?: React.ReactNode;
/** Render item as disabled option */
isDisabled?: boolean;
/** Render item as aria-disabled option */
isAriaDisabled?: boolean;
/** Identifies the component in the dropdown onSelect callback */
value?: any;
/** Callback for item click */
Expand All @@ -25,18 +28,22 @@ export interface DropdownItemProps extends Omit<MenuItemProps, 'ref'>, OUIAProps
ouiaId?: number | string;
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
ouiaSafe?: boolean;
/** Props for adding a tooltip to a menu item */
tooltipProps?: TooltipProps;
}

const DropdownItemBase: React.FunctionComponent<DropdownItemProps> = ({
children,
className,
description,
isDisabled,
isAriaDisabled,
value,
onClick,
ouiaId,
ouiaSafe,
innerRef,
tooltipProps,
...props
}: DropdownItemProps) => {
const ouiaProps = useOUIAProps(DropdownItem.displayName, ouiaId, ouiaSafe);
Expand All @@ -45,8 +52,10 @@ const DropdownItemBase: React.FunctionComponent<DropdownItemProps> = ({
className={css(className)}
description={description}
isDisabled={isDisabled}
isAriaDisabled={isAriaDisabled}
itemId={value}
onClick={onClick}
tooltipProps={tooltipProps}
ref={innerRef}
{...ouiaProps}
{...props}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ propComponents:
'DropdownList',
'MenuToggle',
'DropdownToggleProps',
'DropdownPopperProps'
'DropdownPopperProps',
'TooltipProps'
]
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ export const DropdownBasic: React.FunctionComponent = () => {
<DropdownItem value={3} isDisabled key="disabled link" to="#default-link4">
Disabled Link
</DropdownItem>
<DropdownItem value={4} isAriaDisabled key="aria-disabled link" to="#default-link5" tooltipProps={{content: "aria-disabled link", position: "top"}}>
Aria-disabled Link
</DropdownItem>
<Divider component="li" key="separator" />
<DropdownItem value={4} key="separated action">
<DropdownItem value={5} key="separated action">
Separated Action
</DropdownItem>
<DropdownItem value={5} key="separated link" to="#default-link6" onClick={(ev) => ev.preventDefault()}>
<DropdownItem value={6} key="separated link" to="#default-link6" onClick={(ev) => ev.preventDefault()}>
Separated Link
</DropdownItem>
</DropdownList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const FileUploadField: React.FunctionComponent<FileUploadFieldProps> = ({
<InputGroup>
<InputGroupItem isFill>
<TextInput
readOnlyVariant="plain" // Always read-only regardless of isReadOnly prop (which is just for the TextArea)
readOnlyVariant="default" // Always read-only regardless of isReadOnly prop (which is just for the TextArea)
isDisabled={isDisabled}
id={`${id}-filename`}
name={`${id}-filename`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports[`simple fileupload 1`] = `
class="pf-v5-c-input-group__item pf-m-fill"
>
<span
class="pf-v5-c-form-control pf-m-readonly pf-m-plain"
class="pf-v5-c-form-control pf-m-readonly"
>
<input
aria-describedby="simple-text-file-browse-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`simple fileuploadfield 1`] = `
class="pf-v5-c-input-group__item pf-m-fill"
>
<span
class="pf-v5-c-form-control pf-m-readonly pf-m-plain"
class="pf-v5-c-form-control pf-m-readonly"
>
<input
aria-describedby="custom-file-upload-browse-button"
Expand Down
2 changes: 2 additions & 0 deletions packages/react-core/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
(navigableElement?.tagName === 'DIV' && navigableElement.querySelector('input')) || // for MenuSearchInput
((navigableElement.firstChild as Element)?.tagName === 'LABEL' &&
navigableElement.querySelector('input')) || // for MenuItem checkboxes
((navigableElement.firstChild as Element)?.tagName === 'DIV' &&
navigableElement.querySelector('a, button, input')) || // For aria-disabled element that is rendered inside a div with "display: contents" styling
(navigableElement.firstChild as Element)
}
noHorizontalArrowHandling={
Expand Down
Loading

0 comments on commit 0d5ec4f

Please sign in to comment.