@patternfly/react-core 5.0.0-alpha.30 → 5.0.0-alpha.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "5.0.0-alpha.30",
3
+ "version": "5.0.0-alpha.32",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -70,5 +70,5 @@
70
70
  "react": "^16.8 || ^17 || ^18",
71
71
  "react-dom": "^16.8 || ^17 || ^18"
72
72
  },
73
- "gitHead": "3a4498b375958d9bfcb068471ed5ecc8138ea32d"
73
+ "gitHead": "ae6e5dacc213505fbe7623395b6ca395ee853579"
74
74
  }
@@ -55,8 +55,6 @@ export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'actio
55
55
  timeoutAnimation?: number;
56
56
  /** Title of the alert. */
57
57
  title: React.ReactNode;
58
- /** @deprecated Sets the heading level to use for the alert title. Default is h4. */
59
- titleHeadingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
60
58
  /** Sets the element to use as the alert title. Default is h4. */
61
59
  component?: keyof JSX.IntrinsicElements;
62
60
  /** Adds accessible text to the alert toggle. */
@@ -98,7 +96,6 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
98
96
  actionClose,
99
97
  actionLinks,
100
98
  title,
101
- titleHeadingLevel,
102
99
  component = 'h4',
103
100
  children = '',
104
101
  className = '',
@@ -126,13 +123,7 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
126
123
  );
127
124
 
128
125
  const titleRef = React.useRef(null);
129
- const TitleComponent = (titleHeadingLevel || component) as any;
130
- if (titleHeadingLevel !== undefined) {
131
- // eslint-disable-next-line no-console
132
- console.warn(
133
- 'Alert: titleHeadingLevel is deprecated, please use the newer component prop instead to set the alert title element.'
134
- );
135
- }
126
+ const TitleComponent = component as any;
136
127
 
137
128
  const divRef = React.useRef<HTMLDivElement>();
138
129
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
@@ -179,9 +179,9 @@ test('Renders the title as an h4 by default', () => {
179
179
  expect(screen.getByRole('heading', { level: 4, name: 'Default alert: Some title' })).toBeVisible();
180
180
  });
181
181
 
182
- test('Renders the title as other heading levels when one is passed using titleHeadingLevel', () => {
182
+ test('Renders the title as other heading levels when one is passed using component', () => {
183
183
  render(
184
- <Alert title="Some title" titleHeadingLevel="h1">
184
+ <Alert title="Some title" component="h1">
185
185
  Some alert
186
186
  </Alert>
187
187
  );
@@ -11,7 +11,7 @@ jest.mock('../../Tooltip', () => ({
11
11
  )
12
12
  }));
13
13
 
14
- test('Matches snapshot', () => {
14
+ xtest('Matches snapshot', () => {
15
15
  /** Due to how the datetime attribute is contstructed internally, dateTime must be
16
16
  * manually passed for this snapshot to pass on GitHub.
17
17
  */