@patternfly/react-core 4.193.0 → 4.194.3

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": "4.193.0",
3
+ "version": "4.194.3",
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",
@@ -34,9 +34,9 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.44.0",
38
- "@patternfly/react-styles": "^4.43.0",
39
- "@patternfly/react-tokens": "^4.45.0",
37
+ "@patternfly/react-icons": "^4.45.3",
38
+ "@patternfly/react-styles": "^4.44.3",
39
+ "@patternfly/react-tokens": "^4.46.3",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "acfe91c96bf582f580d05d671f1fd979bd88d830"
63
+ "gitHead": "819e282fa1648ccfca1f5adc4fc1e1aacb1fbdc3"
64
64
  }
@@ -14,6 +14,8 @@ export interface MenuToggleProps
14
14
  isExpanded?: boolean;
15
15
  /** Flag indicating the toggle is disabled */
16
16
  isDisabled?: boolean;
17
+ /** Flag indicating the toggle is full height */
18
+ isFullHeight?: boolean;
17
19
  /** Variant styles of the menu toggle */
18
20
  variant?: 'default' | 'plain' | 'primary' | 'plainText';
19
21
  /** Optional icon rendered inside the toggle, before the children content */
@@ -30,11 +32,23 @@ export class MenuToggleBase extends React.Component<MenuToggleProps> {
30
32
  className: '',
31
33
  isExpanded: false,
32
34
  isDisabled: false,
35
+ isFullHeight: false,
33
36
  variant: 'default'
34
37
  };
35
38
 
36
39
  render() {
37
- const { children, className, icon, badge, isExpanded, isDisabled, variant, innerRef, ...props } = this.props;
40
+ const {
41
+ children,
42
+ className,
43
+ icon,
44
+ badge,
45
+ isExpanded,
46
+ isDisabled,
47
+ isFullHeight,
48
+ variant,
49
+ innerRef,
50
+ ...props
51
+ } = this.props;
38
52
 
39
53
  const isPlain = variant === 'plain';
40
54
  const isPlainText = variant === 'plainText';
@@ -59,6 +73,7 @@ export class MenuToggleBase extends React.Component<MenuToggleProps> {
59
73
  variant === 'primary' && styles.modifiers.primary,
60
74
  (isPlain || isPlainText) && styles.modifiers.plain,
61
75
  isPlainText && styles.modifiers.text,
76
+ isFullHeight && styles.modifiers.fullHeight,
62
77
  className
63
78
  )}
64
79
  type="button"
@@ -9,6 +9,7 @@ exports[`menu toggle passes additional classes 1`] = `
9
9
  innerRef={null}
10
10
  isDisabled={false}
11
11
  isExpanded={false}
12
+ isFullHeight={false}
12
13
  variant="default"
13
14
  >
14
15
  <button
@@ -66,6 +67,7 @@ exports[`menu toggle renders successfully 1`] = `
66
67
  innerRef={null}
67
68
  isDisabled={false}
68
69
  isExpanded={false}
70
+ isFullHeight={false}
69
71
  variant="default"
70
72
  >
71
73
  <button
@@ -134,6 +136,7 @@ exports[`menu toggle shows badge 1`] = `
134
136
  innerRef={null}
135
137
  isDisabled={false}
136
138
  isExpanded={false}
139
+ isFullHeight={false}
137
140
  variant="default"
138
141
  >
139
142
  <button
@@ -217,6 +220,7 @@ exports[`menu toggle shows icon 1`] = `
217
220
  innerRef={null}
218
221
  isDisabled={false}
219
222
  isExpanded={false}
223
+ isFullHeight={false}
220
224
  variant="default"
221
225
  >
222
226
  <button
@@ -304,6 +308,7 @@ exports[`menu toggle shows isDisabled 1`] = `
304
308
  innerRef={null}
305
309
  isDisabled={true}
306
310
  isExpanded={false}
311
+ isFullHeight={false}
307
312
  variant="default"
308
313
  >
309
314
  <button
@@ -364,6 +369,7 @@ exports[`menu toggle shows isExpanded 1`] = `
364
369
  innerRef={null}
365
370
  isDisabled={false}
366
371
  isExpanded={true}
372
+ isFullHeight={false}
367
373
  variant="default"
368
374
  >
369
375
  <button
@@ -423,6 +429,7 @@ exports[`menu toggle shows isPlain 1`] = `
423
429
  innerRef={null}
424
430
  isDisabled={false}
425
431
  isExpanded={false}
432
+ isFullHeight={false}
426
433
  variant="plain"
427
434
  >
428
435
  <button
@@ -468,6 +475,7 @@ exports[`menu toggle shows isPrimary 1`] = `
468
475
  innerRef={null}
469
476
  isDisabled={false}
470
477
  isExpanded={false}
478
+ isFullHeight={false}
471
479
  variant="primary"
472
480
  >
473
481
  <button
@@ -527,6 +535,7 @@ exports[`menu toggle shows plain text 1`] = `
527
535
  innerRef={null}
528
536
  isDisabled={false}
529
537
  isExpanded={false}
538
+ isFullHeight={false}
530
539
  variant="plainText"
531
540
  >
532
541
  <button
@@ -122,3 +122,16 @@ import { MenuToggle } from '@patternfly/react-core';
122
122
  </MenuToggle>
123
123
  </React.Fragment>
124
124
  ```
125
+
126
+ ### Full height
127
+
128
+ ```ts
129
+ import React from 'react';
130
+ import { MenuToggle } from '@patternfly/react-core';
131
+
132
+ <div style={{ height: "80px" }}>
133
+ <MenuToggle isFullHeight aria-label="Full height menu toggle">
134
+ Full height
135
+ </MenuToggle>
136
+ </div>
137
+ ```