Skip to content

Commit 5fb129a

Browse files
authored
Merge branch 'patternfly:main' into main
2 parents 973e70d + 46b82e5 commit 5fb129a

47 files changed

Lines changed: 808 additions & 166 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/react-charts/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [8.3.0-prerelease.17](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-charts@8.3.0-prerelease.16...@patternfly/react-charts@8.3.0-prerelease.17) (2025-06-23)
7+
8+
**Note:** Version bump only for package @patternfly/react-charts
9+
10+
# [8.3.0-prerelease.16](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-charts@8.3.0-prerelease.15...@patternfly/react-charts@8.3.0-prerelease.16) (2025-06-20)
11+
12+
**Note:** Version bump only for package @patternfly/react-charts
13+
14+
# [8.3.0-prerelease.15](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-charts@8.3.0-prerelease.14...@patternfly/react-charts@8.3.0-prerelease.15) (2025-06-18)
15+
16+
**Note:** Version bump only for package @patternfly/react-charts
17+
618
# [8.3.0-prerelease.14](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-charts@8.3.0-prerelease.13...@patternfly/react-charts@8.3.0-prerelease.14) (2025-06-17)
719

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

packages/react-charts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternfly/react-charts",
3-
"version": "8.3.0-prerelease.14",
3+
"version": "8.3.0-prerelease.17",
44
"description": "This library provides a set of React chart components for use with the PatternFly reference implementation.",
55
"main": "dist/js/index.js",
66
"module": "dist/esm/index.js",

packages/react-charts/src/victory/components/ChartTheme/examples/ChartTheme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
id: Themes
2+
id: Colors for charts
33
section: charts
44
hideDarkMode: true
55
---

packages/react-code-editor/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [6.3.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.3.0-prerelease.26...@patternfly/react-code-editor@6.3.0-prerelease.27) (2025-06-23)
7+
8+
**Note:** Version bump only for package @patternfly/react-code-editor
9+
10+
# [6.3.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.3.0-prerelease.25...@patternfly/react-code-editor@6.3.0-prerelease.26) (2025-06-20)
11+
12+
**Note:** Version bump only for package @patternfly/react-code-editor
13+
14+
# [6.3.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.3.0-prerelease.24...@patternfly/react-code-editor@6.3.0-prerelease.25) (2025-06-18)
15+
16+
**Note:** Version bump only for package @patternfly/react-code-editor
17+
618
# [6.3.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-code-editor@6.3.0-prerelease.23...@patternfly/react-code-editor@6.3.0-prerelease.24) (2025-06-17)
719

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

packages/react-code-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternfly/react-code-editor",
3-
"version": "6.3.0-prerelease.24",
3+
"version": "6.3.0-prerelease.27",
44
"description": "This package provides a PatternFly wrapper for the Monaco code editor\n",
55
"main": "dist/js/index.js",
66
"module": "dist/esm/index.js",

packages/react-core/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,24 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
# [6.3.0-prerelease.27](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.3.0-prerelease.26...@patternfly/react-core@6.3.0-prerelease.27) (2025-06-23)
7+
8+
### Bug Fixes
9+
10+
- Bumped to latest core version. ([#11880](https://github.com/patternfly/patternfly-react/issues/11880)) ([0380aa5](https://github.com/patternfly/patternfly-react/commit/0380aa504b4d0d83459126bfd98b2e4e29cac4e8))
11+
12+
# [6.3.0-prerelease.26](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.3.0-prerelease.25...@patternfly/react-core@6.3.0-prerelease.26) (2025-06-20)
13+
14+
### Features
15+
16+
- **Table:** added optin animations for expansion ([#11865](https://github.com/patternfly/patternfly-react/issues/11865)) ([9adc88b](https://github.com/patternfly/patternfly-react/commit/9adc88b652f77ed5737c9f6dd02885daace1cd2b))
17+
18+
# [6.3.0-prerelease.25](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.3.0-prerelease.24...@patternfly/react-core@6.3.0-prerelease.25) (2025-06-18)
19+
20+
### Features
21+
22+
- **SearchInput:** enable animations ([#11874](https://github.com/patternfly/patternfly-react/issues/11874)) ([50ddd0f](https://github.com/patternfly/patternfly-react/commit/50ddd0f2b8f0c0e53caf4be6a9fa4b2b15f13ceb))
23+
624
# [6.3.0-prerelease.24](https://github.com/patternfly/patternfly-react/compare/@patternfly/react-core@6.3.0-prerelease.23...@patternfly/react-core@6.3.0-prerelease.24) (2025-06-17)
725

826
### Features

packages/react-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patternfly/react-core",
3-
"version": "6.3.0-prerelease.24",
3+
"version": "6.3.0-prerelease.27",
44
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
55
"main": "dist/js/index.js",
66
"module": "dist/esm/index.js",
@@ -54,7 +54,7 @@
5454
"tslib": "^2.8.1"
5555
},
5656
"devDependencies": {
57-
"@patternfly/patternfly": "6.3.0-prerelease.33",
57+
"@patternfly/patternfly": "6.3.0-prerelease.36",
5858
"case-anything": "^3.1.2",
5959
"css": "^3.0.0",
6060
"fs-extra": "^11.3.0"

packages/react-core/src/components/SearchInput/SearchInput.tsx

Lines changed: 103 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { TextInputGroup, TextInputGroupMain, TextInputGroupUtilities } from '../
1414
import { InputGroup, InputGroupItem } from '../InputGroup';
1515
import { Popper } from '../../helpers';
1616
import textInputGroupStyles from '@patternfly/react-styles/css/components/TextInputGroup/text-input-group';
17+
import inputGroupStyles from '@patternfly/react-styles/css/components/InputGroup/input-group';
1718

1819
/** Properties for adding search attributes to an advanced search input. These properties must
1920
* be passed in as an object within an array to the search input component's attribute property.
@@ -41,6 +42,8 @@ export interface SearchInputExpandable {
4142
onToggleExpand: (event: React.SyntheticEvent<HTMLButtonElement>, isExpanded: boolean) => void;
4243
/** An accessible label for the expandable search input toggle. */
4344
toggleAriaLabel: string;
45+
/** Flag indicating animations should be enabled when the search input expands and collapses. Note: this will change the component's DOM structure. In a future breaking change release, this will become the default behavior and will no longer be needed. */
46+
hasAnimations?: boolean;
4447
}
4548

4649
/** The main search input component. */
@@ -177,7 +180,7 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
177180
const popperRef = useRef(null);
178181
const [focusAfterExpandChange, setFocusAfterExpandChange] = useState(false);
179182

180-
const { isExpanded, onToggleExpand, toggleAriaLabel } = expandableInput || {};
183+
const { isExpanded, onToggleExpand, toggleAriaLabel, hasAnimations } = expandableInput || {};
181184

182185
useEffect(() => {
183186
// this effect and the focusAfterExpandChange variable are needed to focus the input/toggle as needed when the
@@ -187,9 +190,13 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
187190
} else if (isExpanded) {
188191
searchInputInputRef?.current?.focus();
189192
} else {
190-
searchInputExpandableToggleRef?.current?.focus();
193+
if (!hasAnimations) {
194+
searchInputExpandableToggleRef?.current?.focus();
195+
}
196+
}
197+
if (!hasAnimations) {
198+
setFocusAfterExpandChange(false);
191199
}
192-
setFocusAfterExpandChange(false);
193200
}, [focusAfterExpandChange, isExpanded, searchInputInputRef, searchInputExpandableToggleRef]);
194201

195202
useEffect(() => {
@@ -349,7 +356,28 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
349356
</TextInputGroup>
350357
);
351358

352-
const expandableToggle = (
359+
const expandToggleButton = (
360+
<Button
361+
variant={ButtonVariant.plain}
362+
aria-label={toggleAriaLabel}
363+
aria-expanded={isExpanded}
364+
icon={<SearchIcon />}
365+
onClick={onExpandHandler}
366+
ref={searchInputExpandableToggleRef}
367+
/>
368+
);
369+
370+
const collapseToggleButton = (
371+
<Button
372+
variant={ButtonVariant.plain}
373+
aria-label={toggleAriaLabel}
374+
aria-expanded={isExpanded}
375+
icon={<TimesIcon />}
376+
onClick={onExpandHandler}
377+
/>
378+
);
379+
380+
const singleButtonToggle = (
353381
<Button
354382
variant={ButtonVariant.plain}
355383
aria-label={toggleAriaLabel}
@@ -360,10 +388,48 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
360388
/>
361389
);
362390

363-
const buildExpandableSearchInput = ({ ...searchInputProps } = {}) => (
391+
const onTransitionEnd = () => {
392+
!isExpanded && focusAfterExpandChange && searchInputExpandableToggleRef?.current?.focus();
393+
setFocusAfterExpandChange(false);
394+
};
395+
396+
const expandableToggle = (
397+
<>
398+
{!hasAnimations && <InputGroupItem isPlain>{singleButtonToggle}</InputGroupItem>}
399+
{hasAnimations && (
400+
<>
401+
<InputGroupItem
402+
className={inputGroupStyles.modifiers.searchExpand}
403+
isPlain
404+
onTransitionEnd={onTransitionEnd}
405+
{...(isExpanded && { inert: '' })}
406+
>
407+
{expandToggleButton}
408+
</InputGroupItem>
409+
<InputGroupItem
410+
className={inputGroupStyles.modifiers.searchAction}
411+
isPlain
412+
{...(!isExpanded && { inert: '' })}
413+
>
414+
{collapseToggleButton}
415+
</InputGroupItem>
416+
</>
417+
)}
418+
</>
419+
);
420+
421+
const buildExpandableSearchInput = ({ ...searchInputProps }: any = {}) => (
364422
<InputGroup {...searchInputProps}>
365-
<InputGroupItem isFill>{buildTextInputGroup()} </InputGroupItem>
366-
<InputGroupItem isPlain>{expandableToggle}</InputGroupItem>
423+
<InputGroupItem
424+
{...(!hasAnimations && { isFill: true })}
425+
{...(hasAnimations && { className: inputGroupStyles.modifiers.searchInput })}
426+
{...(!isExpanded && {
427+
inert: ''
428+
})}
429+
>
430+
{buildTextInputGroup()}
431+
</InputGroupItem>
432+
{expandableToggle}
367433
</InputGroup>
368434
);
369435

@@ -377,9 +443,19 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
377443

378444
const buildSearchTextInputGroupWithExtraButtons = ({ ...searchInputProps } = {}) => (
379445
<InputGroup ref={triggerRef} {...searchInputProps}>
380-
<InputGroupItem isFill>{buildTextInputGroup()}</InputGroupItem>
446+
<InputGroupItem
447+
{...(!hasAnimations && { isFill: true })}
448+
{...(expandableInput && hasAnimations && { className: inputGroupStyles.modifiers.searchInput })}
449+
{...(expandableInput &&
450+
hasAnimations &&
451+
!isExpanded && {
452+
inert: ''
453+
})}
454+
>
455+
{buildTextInputGroup()}
456+
</InputGroupItem>
381457
{(attributes.length > 0 || onToggleAdvancedSearch) && (
382-
<InputGroupItem isPlain>
458+
<InputGroupItem isPlain {...(hasAnimations && { className: inputGroupStyles.modifiers.searchAction })}>
383459
<Button
384460
className={isSearchMenuOpen && 'pf-m-expanded'}
385461
variant={ButtonVariant.control}
@@ -392,7 +468,7 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
392468
</InputGroupItem>
393469
)}
394470
{!!onSearch && (
395-
<InputGroupItem>
471+
<InputGroupItem {...(hasAnimations && { className: inputGroupStyles.modifiers.searchAction })}>
396472
<Button
397473
type="submit"
398474
variant={ButtonVariant.control}
@@ -413,11 +489,15 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
413489

414490
const searchInputProps = {
415491
...props,
416-
className: className && css(className),
492+
className: css(
493+
expandableInput && hasAnimations && inputGroupStyles.modifiers.searchExpandable,
494+
expandableInput && hasAnimations && isExpanded && inputGroupStyles.modifiers.expanded,
495+
className && css(className)
496+
),
417497
innerRef: searchInputRef
418498
};
419499

420-
if (!!expandableInput && !isExpanded) {
500+
if (!!expandableInput && !isExpanded && !hasAnimations) {
421501
return (
422502
<InputGroup {...searchInputProps}>
423503
<InputGroupItem>{expandableToggle}</InputGroupItem>
@@ -449,10 +529,19 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
449529
</div>
450530
);
451531

532+
const advancedSearchInputProps = hasAnimations
533+
? {
534+
className: css(
535+
expandableInput && inputGroupStyles.modifiers.searchExpandable,
536+
expandableInput && isExpanded && inputGroupStyles.modifiers.expanded
537+
)
538+
}
539+
: {};
540+
452541
const AdvancedSearchWithPopper = (
453542
<div className={css(className)} ref={searchInputRef} {...props}>
454543
<Popper
455-
trigger={buildSearchTextInputGroupWithExtraButtons()}
544+
trigger={buildSearchTextInputGroupWithExtraButtons(advancedSearchInputProps)}
456545
triggerRef={triggerRef}
457546
popper={AdvancedSearch}
458547
popperRef={popperRef}
@@ -466,7 +555,7 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
466555

467556
const AdvancedSearchInline = (
468557
<div className={css(className)} ref={searchInputRef} {...props}>
469-
{buildSearchTextInputGroupWithExtraButtons()}
558+
{buildSearchTextInputGroupWithExtraButtons(advancedSearchInputProps)}
470559
{AdvancedSearch}
471560
</div>
472561
);

0 commit comments

Comments
 (0)