@patternfly/react-core 4.237.1 → 4.237.4

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/components/Dropdown/DropdownItem.d.ts +1 -1
  3. package/dist/esm/components/Dropdown/DropdownItem.d.ts.map +1 -1
  4. package/dist/esm/components/Dropdown/DropdownToggleCheckbox.js +2 -1
  5. package/dist/esm/components/Dropdown/DropdownToggleCheckbox.js.map +1 -1
  6. package/dist/esm/components/Dropdown/InternalDropdownItem.js +14 -11
  7. package/dist/esm/components/Dropdown/InternalDropdownItem.js.map +1 -1
  8. package/dist/esm/components/Dropdown/Toggle.js +9 -7
  9. package/dist/esm/components/Dropdown/Toggle.js.map +1 -1
  10. package/dist/esm/components/Modal/Modal.d.ts +2 -2
  11. package/dist/esm/components/Modal/Modal.d.ts.map +1 -1
  12. package/dist/esm/components/Modal/Modal.js +2 -1
  13. package/dist/esm/components/Modal/Modal.js.map +1 -1
  14. package/dist/esm/components/Modal/ModalBoxTitle.js +1 -1
  15. package/dist/esm/components/Modal/ModalBoxTitle.js.map +1 -1
  16. package/dist/esm/components/TreeView/TreeView.js +2 -2
  17. package/dist/esm/components/TreeView/TreeView.js.map +1 -1
  18. package/dist/esm/components/TreeView/TreeViewListItem.d.ts +1 -1
  19. package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  20. package/dist/esm/components/TreeView/TreeViewRoot.d.ts.map +1 -1
  21. package/dist/esm/components/TreeView/TreeViewRoot.js +30 -26
  22. package/dist/esm/components/TreeView/TreeViewRoot.js.map +1 -1
  23. package/dist/js/components/Dropdown/DropdownItem.d.ts +1 -1
  24. package/dist/js/components/Dropdown/DropdownItem.d.ts.map +1 -1
  25. package/dist/js/components/Dropdown/DropdownToggleCheckbox.js +2 -1
  26. package/dist/js/components/Dropdown/DropdownToggleCheckbox.js.map +1 -1
  27. package/dist/js/components/Dropdown/InternalDropdownItem.js +14 -11
  28. package/dist/js/components/Dropdown/InternalDropdownItem.js.map +1 -1
  29. package/dist/js/components/Dropdown/Toggle.js +9 -7
  30. package/dist/js/components/Dropdown/Toggle.js.map +1 -1
  31. package/dist/js/components/Modal/Modal.d.ts +2 -2
  32. package/dist/js/components/Modal/Modal.d.ts.map +1 -1
  33. package/dist/js/components/Modal/Modal.js +2 -1
  34. package/dist/js/components/Modal/Modal.js.map +1 -1
  35. package/dist/js/components/Modal/ModalBoxTitle.js +1 -1
  36. package/dist/js/components/Modal/ModalBoxTitle.js.map +1 -1
  37. package/dist/js/components/TreeView/TreeView.js +2 -2
  38. package/dist/js/components/TreeView/TreeView.js.map +1 -1
  39. package/dist/js/components/TreeView/TreeViewListItem.d.ts +1 -1
  40. package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  41. package/dist/js/components/TreeView/TreeViewRoot.d.ts.map +1 -1
  42. package/dist/js/components/TreeView/TreeViewRoot.js +30 -26
  43. package/dist/js/components/TreeView/TreeViewRoot.js.map +1 -1
  44. package/dist/umd/react-core.min.css +86 -86
  45. package/dist/umd/react-core.min.js +6 -6
  46. package/package.json +5 -5
  47. package/src/components/Dropdown/DropdownItem.tsx +1 -1
  48. package/src/components/Dropdown/DropdownToggleCheckbox.tsx +1 -1
  49. package/src/components/Dropdown/InternalDropdownItem.tsx +10 -10
  50. package/src/components/Dropdown/Toggle.tsx +8 -8
  51. package/src/components/Modal/Modal.tsx +3 -3
  52. package/src/components/Modal/ModalBoxTitle.tsx +1 -1
  53. package/src/components/TreeView/TreeView.tsx +1 -1
  54. package/src/components/TreeView/TreeViewListItem.tsx +1 -1
  55. package/src/components/TreeView/TreeViewRoot.tsx +29 -25
  56. package/src/demos/BackToTop.md +1 -1
  57. package/src/demos/Banner.md +3 -3
  58. package/src/demos/Card/Card.md +2 -2
  59. package/src/demos/JumpLinks.md +3 -3
  60. package/src/demos/Nav.md +15 -15
  61. package/src/demos/PrimaryDetail.md +7 -7
  62. package/src/demos/Tabs.md +3 -3
  63. package/src/demos/Toolbar.md +2 -2
  64. package/src/demos/Wizard/WizardDemo.md +3 -3
  65. package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +1 -1
  66. package/src/demos/examples/DashboardWrapper.js +1 -1
  67. package/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js +1 -1
  68. package/src/demos/examples/Nav/NavDrilldown.tsx +1 -1
  69. package/src/demos/examples/Tabs/GrayTabs.tsx +1 -1
  70. package/src/demos/examples/Tabs/ModalTabs.tsx +1 -1
  71. package/src/demos/examples/Tabs/NestedTabs.tsx +1 -1
  72. package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +1 -1
  73. package/src/demos/examples/Tabs/TabsAndTable.tsx +1 -1
  74. package/src/demos/examples/Tabs/TabsAndTablesAutoWidthTabs.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.237.1",
3
+ "version": "4.237.4",
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",
@@ -44,9 +44,9 @@
44
44
  "generate": "node scripts/copyStyles.js"
45
45
  },
46
46
  "dependencies": {
47
- "@patternfly/react-icons": "^4.88.1",
48
- "@patternfly/react-styles": "^4.87.1",
49
- "@patternfly/react-tokens": "^4.89.1",
47
+ "@patternfly/react-icons": "^4.88.4",
48
+ "@patternfly/react-styles": "^4.87.4",
49
+ "@patternfly/react-tokens": "^4.89.4",
50
50
  "focus-trap": "6.9.2",
51
51
  "react-dropzone": "9.0.0",
52
52
  "tippy.js": "5.1.2",
@@ -70,5 +70,5 @@
70
70
  "react": "^16.8.0 || ^17.0.0",
71
71
  "react-dom": "^16.8.0 || ^17.0.0"
72
72
  },
73
- "gitHead": "d79e7376228e02cd37e0eec224643d9aa439d010"
73
+ "gitHead": "c45164ec148b97dd7fe65152852de24813fba68e"
74
74
  }
@@ -3,7 +3,7 @@ import { InternalDropdownItemProps, InternalDropdownItem } from './InternalDropd
3
3
  import { DropdownArrowContext } from './dropdownConstants';
4
4
  import { useOUIAProps, OUIAProps } from '../../helpers';
5
5
 
6
- export interface DropdownItemProps extends InternalDropdownItemProps, OUIAProps {
6
+ export interface DropdownItemProps extends Omit<InternalDropdownItemProps, 'tabIndex'>, OUIAProps {
7
7
  /** Anything which can be rendered as dropdown item */
8
8
  children?: React.ReactNode;
9
9
  /** Classes applied to root element of dropdown item */
@@ -44,7 +44,7 @@ export class DropdownToggleCheckbox extends React.Component<DropdownToggleCheckb
44
44
  }
45
45
 
46
46
  handleChange = (event: React.FormEvent<HTMLInputElement>) => {
47
- this.props.onChange((event.target as HTMLInputElement).checked, event);
47
+ this.props.onChange?.((event.target as HTMLInputElement).checked, event);
48
48
  };
49
49
 
50
50
  calculateChecked = () => {
@@ -87,7 +87,7 @@ export class InternalDropdownItem extends React.Component<InternalDropdownItemPr
87
87
  componentDidMount() {
88
88
  const { context, index, isDisabled, role, customChild, autoFocus } = this.props;
89
89
  const customRef = customChild ? this.getInnerNode(this.ref.current) : this.ref.current;
90
- context.sendRef(
90
+ context?.sendRef?.(
91
91
  index,
92
92
  [customRef, customChild ? customRef : this.additionalRef.current],
93
93
  isDisabled,
@@ -99,7 +99,7 @@ export class InternalDropdownItem extends React.Component<InternalDropdownItemPr
99
99
  componentDidUpdate() {
100
100
  const { context, index, isDisabled, role, customChild } = this.props;
101
101
  const customRef = customChild ? this.getInnerNode(this.ref.current) : this.ref.current;
102
- context.sendRef(
102
+ context?.sendRef?.(
103
103
  index,
104
104
  [customRef, customChild ? customRef : this.additionalRef.current],
105
105
  isDisabled,
@@ -116,21 +116,21 @@ export class InternalDropdownItem extends React.Component<InternalDropdownItemPr
116
116
  event.preventDefault();
117
117
  }
118
118
  if (event.key === 'ArrowUp') {
119
- this.props.context.keyHandler(this.props.index, innerIndex, KEYHANDLER_DIRECTION.UP);
119
+ this.props.context?.keyHandler?.(this.props.index, innerIndex, KEYHANDLER_DIRECTION.UP);
120
120
  event.stopPropagation();
121
121
  } else if (event.key === 'ArrowDown') {
122
- this.props.context.keyHandler(this.props.index, innerIndex, KEYHANDLER_DIRECTION.DOWN);
122
+ this.props.context?.keyHandler?.(this.props.index, innerIndex, KEYHANDLER_DIRECTION.DOWN);
123
123
  event.stopPropagation();
124
124
  } else if (event.key === 'ArrowRight') {
125
- this.props.context.keyHandler(this.props.index, innerIndex, KEYHANDLER_DIRECTION.RIGHT);
125
+ this.props.context?.keyHandler?.(this.props.index, innerIndex, KEYHANDLER_DIRECTION.RIGHT);
126
126
  event.stopPropagation();
127
127
  } else if (event.key === 'ArrowLeft') {
128
- this.props.context.keyHandler(this.props.index, innerIndex, KEYHANDLER_DIRECTION.LEFT);
128
+ this.props.context?.keyHandler?.(this.props.index, innerIndex, KEYHANDLER_DIRECTION.LEFT);
129
129
  event.stopPropagation();
130
130
  } else if (event.key === 'Enter' || event.key === ' ') {
131
131
  event.target.click();
132
132
  this.props.enterTriggersArrowDown &&
133
- this.props.context.keyHandler(this.props.index, innerIndex, KEYHANDLER_DIRECTION.DOWN);
133
+ this.props.context?.keyHandler?.(this.props.index, innerIndex, KEYHANDLER_DIRECTION.DOWN);
134
134
  }
135
135
  };
136
136
 
@@ -264,13 +264,13 @@ export class InternalDropdownItem extends React.Component<InternalDropdownItemPr
264
264
 
265
265
  return (
266
266
  <li
267
- className={listItemClassName || null}
267
+ {...(listItemClassName && { className: listItemClassName })}
268
268
  role="none"
269
269
  onKeyDown={this.onKeyDown}
270
270
  onClick={(event: any) => {
271
271
  if (!isDisabled && !isAriaDisabled) {
272
- onClick(event);
273
- onSelect(event);
272
+ onClick?.(event);
273
+ onSelect?.(event);
274
274
  }
275
275
  }}
276
276
  id={id}
@@ -89,7 +89,7 @@ export class Toggle extends React.Component<ToggleProps> {
89
89
  const clickedOnToggle = parentRef && parentRef.current && parentRef.current.contains(event.target as Node);
90
90
  const clickedWithinMenu = menuRef && menuRef.contains && menuRef.contains(event.target as Node);
91
91
  if (isOpen && !(clickedOnToggle || clickedWithinMenu)) {
92
- onToggle(false, event);
92
+ onToggle?.(false, event);
93
93
  }
94
94
  };
95
95
 
@@ -103,8 +103,8 @@ export class Toggle extends React.Component<ToggleProps> {
103
103
  (event.key === KeyTypes.Escape || event.key === 'Tab') &&
104
104
  (escFromToggle || escFromWithinMenu)
105
105
  ) {
106
- this.props.onToggle(false, event);
107
- this.buttonRef.current.focus();
106
+ this.props.onToggle?.(false, event);
107
+ this.buttonRef.current?.focus();
108
108
  }
109
109
  };
110
110
 
@@ -118,15 +118,15 @@ export class Toggle extends React.Component<ToggleProps> {
118
118
  }
119
119
  event.preventDefault();
120
120
 
121
- this.props.onToggle(!this.props.isOpen, event);
121
+ this.props.onToggle?.(!this.props.isOpen, event);
122
122
  } else if ((event.key === 'Enter' || event.key === ' ') && !this.props.isOpen) {
123
123
  if (!this.props.bubbleEvent) {
124
124
  event.stopPropagation();
125
125
  }
126
126
  event.preventDefault();
127
127
 
128
- this.props.onToggle(!this.props.isOpen, event);
129
- this.props.onEnter();
128
+ this.props.onToggle?.(!this.props.isOpen, event);
129
+ this.props.onEnter?.();
130
130
  }
131
131
  };
132
132
 
@@ -167,11 +167,11 @@ export class Toggle extends React.Component<ToggleProps> {
167
167
  isPlain && styles.modifiers.plain,
168
168
  isText && styles.modifiers.text,
169
169
  isPrimary && styles.modifiers.primary,
170
- buttonVariantStyles[toggleVariant],
170
+ toggleVariant && buttonVariantStyles[toggleVariant],
171
171
  className
172
172
  )}
173
173
  type={type || 'button'}
174
- onClick={event => onToggle(!isOpen, event)}
174
+ onClick={event => onToggle?.(!isOpen, event)}
175
175
  aria-expanded={isOpen}
176
176
  aria-haspopup={ariaHasPopup}
177
177
  onKeyDown={event => this.onKeyDown(event)}
@@ -26,7 +26,7 @@ export interface ModalProps extends React.HTMLProps<HTMLDivElement>, OUIAProps {
26
26
  /** Optional title label text for screen readers */
27
27
  titleLabel?: string;
28
28
  /** Id to use for Modal Box label */
29
- 'aria-labelledby'?: string | null;
29
+ 'aria-labelledby'?: string;
30
30
  /** Accessible descriptor of modal */
31
31
  'aria-label'?: string;
32
32
  /** Id to use for Modal Box descriptor */
@@ -121,7 +121,7 @@ export class Modal extends React.Component<ModalProps, ModalState> {
121
121
  handleEscKeyClick = (event: KeyboardEvent): void => {
122
122
  const { onEscapePress } = this.props;
123
123
  if (event.key === KeyTypes.Escape && this.props.isOpen) {
124
- onEscapePress ? onEscapePress(event) : this.props.onClose();
124
+ onEscapePress ? onEscapePress(event) : this.props.onClose?.();
125
125
  }
126
126
  };
127
127
 
@@ -143,7 +143,7 @@ export class Modal extends React.Component<ModalProps, ModalState> {
143
143
  }
144
144
  };
145
145
 
146
- isEmpty = (value: string | null) => value === null || value === undefined || value === '';
146
+ isEmpty = (value: string | null | undefined) => value === null || value === undefined || value === '';
147
147
 
148
148
  componentDidMount() {
149
149
  const {
@@ -38,7 +38,7 @@ export const ModalBoxTitle: React.FunctionComponent<ModalBoxTitleProps> = ({
38
38
  ...props
39
39
  }: ModalBoxTitleProps) => {
40
40
  const [hasTooltip, setHasTooltip] = React.useState(false);
41
- const h1 = React.useRef<HTMLHeadingElement>();
41
+ const h1 = React.useRef<HTMLHeadingElement>(null);
42
42
  const label = titleLabel || (isVariantIcon(titleIconVariant) ? `${capitalize(titleIconVariant)} alert:` : titleLabel);
43
43
  const variantIcons = {
44
44
  success: <CheckCircleIcon />,
@@ -101,7 +101,7 @@ export const TreeView: React.FunctionComponent<TreeViewProps> = ({
101
101
  <TreeViewList isNested={isNested} toolbar={toolbar}>
102
102
  {data.map(item => (
103
103
  <TreeViewListItem
104
- key={item.id?.toString() || item.name.toString()}
104
+ key={item.id?.toString() || item.name?.toString()}
105
105
  name={item.name}
106
106
  title={item.title}
107
107
  id={item.id}
@@ -6,7 +6,7 @@ import { TreeViewDataItem } from './TreeView';
6
6
  import { Badge } from '../Badge';
7
7
  import { GenerateId } from '../../helpers/GenerateId/GenerateId';
8
8
 
9
- export interface TreeViewCheckProps extends Partial<React.InputHTMLAttributes<HTMLInputElement>> {
9
+ export interface TreeViewCheckProps extends Omit<Partial<React.InputHTMLAttributes<HTMLInputElement>>, 'checked'> {
10
10
  checked?: boolean | null;
11
11
  }
12
12
 
@@ -26,16 +26,16 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
26
26
  window.addEventListener('keydown', this.props.hasChecks ? this.handleKeysCheckbox : this.handleKeys);
27
27
  }
28
28
  if (this.props.hasChecks) {
29
- const firstToggle = this.treeRef.current.getElementsByClassName('pf-c-tree-view__node-toggle')[0] as HTMLElement;
29
+ const firstToggle = this.treeRef.current?.getElementsByClassName('pf-c-tree-view__node-toggle')[0] as HTMLElement;
30
30
  if (firstToggle) {
31
31
  firstToggle.tabIndex = 0;
32
32
  }
33
- const firstInput = this.treeRef.current.getElementsByTagName('INPUT')[0] as HTMLElement;
33
+ const firstInput = this.treeRef.current?.getElementsByTagName('INPUT')[0] as HTMLElement;
34
34
  if (firstInput) {
35
35
  firstInput.tabIndex = 0;
36
36
  }
37
37
  } else {
38
- (this.treeRef.current.getElementsByClassName('pf-c-tree-view__node')[0] as HTMLElement).tabIndex = 0;
38
+ (this.treeRef.current?.getElementsByClassName('pf-c-tree-view__node')[0] as HTMLElement).tabIndex = 0;
39
39
  }
40
40
  }
41
41
 
@@ -51,7 +51,7 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
51
51
  }
52
52
  const activeElement = document.activeElement;
53
53
  const key = event.key;
54
- const treeItems = Array.from(this.treeRef.current.getElementsByClassName('pf-c-tree-view__node')).filter(
54
+ const treeItems = Array.from(this.treeRef.current?.getElementsByClassName('pf-c-tree-view__node')).filter(
55
55
  el => !el.classList.contains('pf-m-disabled')
56
56
  );
57
57
 
@@ -72,20 +72,22 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
72
72
  );
73
73
 
74
74
  if (['ArrowLeft', 'ArrowRight'].includes(key)) {
75
- const isExpandable = activeElement.firstElementChild.firstElementChild.classList.contains(
75
+ const isExpandable = activeElement?.firstElementChild?.firstElementChild?.classList.contains(
76
76
  'pf-c-tree-view__node-toggle'
77
77
  );
78
- const isExpanded = activeElement.closest('li').classList.contains('pf-m-expanded');
78
+ const isExpanded = activeElement?.closest('li')?.classList.contains('pf-m-expanded');
79
79
  if (key === 'ArrowLeft') {
80
80
  if (isExpandable && isExpanded) {
81
81
  (activeElement as HTMLElement).click();
82
82
  } else {
83
- const parentList = activeElement.closest('ul').parentElement;
84
- if (parentList.tagName !== 'DIV') {
85
- const parentButton = parentList.querySelector('button');
83
+ const parentList = activeElement?.closest('ul')?.parentElement;
84
+ if (parentList?.tagName !== 'DIV') {
85
+ const parentButton = parentList?.querySelector('button');
86
86
  (activeElement as HTMLElement).tabIndex = -1;
87
- parentButton.tabIndex = 0;
88
- parentButton.focus();
87
+ if (parentButton) {
88
+ parentButton.tabIndex = 0;
89
+ parentButton.focus();
90
+ }
89
91
  }
90
92
  }
91
93
  } else {
@@ -93,11 +95,13 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
93
95
  (activeElement as HTMLElement).tabIndex = -1;
94
96
  (activeElement as HTMLElement).click();
95
97
  const childElement = activeElement
96
- .closest('li')
97
- .querySelector('ul > li')
98
- .querySelector('button');
99
- childElement.tabIndex = 0;
100
- childElement.focus();
98
+ ?.closest('li')
99
+ ?.querySelector('ul > li')
100
+ ?.querySelector('button');
101
+ if (childElement) {
102
+ childElement.tabIndex = 0;
103
+ childElement.focus();
104
+ }
101
105
  }
102
106
  }
103
107
  event.preventDefault();
@@ -116,7 +120,7 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
116
120
  event.preventDefault();
117
121
  }
118
122
 
119
- const treeNodes = Array.from(this.treeRef.current.getElementsByClassName('pf-c-tree-view__node'));
123
+ const treeNodes = Array.from(this.treeRef.current?.getElementsByClassName('pf-c-tree-view__node'));
120
124
 
121
125
  handleArrows(
122
126
  event,
@@ -131,21 +135,21 @@ export class TreeViewRoot extends React.Component<TreeViewRootProps> {
131
135
 
132
136
  if (['ArrowLeft', 'ArrowRight'].includes(key)) {
133
137
  if (key === 'ArrowLeft') {
134
- if (activeElement.tagName === 'INPUT') {
135
- activeElement.parentElement.previousSibling &&
138
+ if (activeElement?.tagName === 'INPUT') {
139
+ activeElement?.parentElement?.previousSibling &&
136
140
  (activeElement.parentElement.previousSibling as HTMLElement).focus();
137
- } else if (activeElement.previousSibling) {
138
- if (activeElement.previousElementSibling.tagName === 'SPAN') {
141
+ } else if (activeElement?.previousSibling) {
142
+ if (activeElement.previousElementSibling?.tagName === 'SPAN') {
139
143
  (activeElement.previousSibling.firstChild as HTMLElement).focus();
140
144
  } else {
141
145
  (activeElement.previousSibling as HTMLElement).focus();
142
146
  }
143
147
  }
144
148
  } else {
145
- if (activeElement.tagName === 'INPUT') {
146
- activeElement.parentElement.nextSibling && (activeElement.parentElement.nextSibling as HTMLElement).focus();
147
- } else if (activeElement.nextSibling) {
148
- if (activeElement.nextElementSibling.tagName === 'SPAN') {
149
+ if (activeElement?.tagName === 'INPUT') {
150
+ activeElement.parentElement?.nextSibling && (activeElement.parentElement.nextSibling as HTMLElement).focus();
151
+ } else if (activeElement?.nextSibling) {
152
+ if (activeElement.nextElementSibling?.tagName === 'SPAN') {
149
153
  (activeElement.nextSibling.firstChild as HTMLElement).focus();
150
154
  } else {
151
155
  (activeElement.nextSibling as HTMLElement).focus();
@@ -3,7 +3,7 @@ id: Back to top
3
3
  section: components
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
 
8
8
  ## Demos
9
9
 
@@ -3,7 +3,7 @@ id: Banner
3
3
  section: components
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
 
8
8
  ## Demos
9
9
 
@@ -23,7 +23,7 @@ import {
23
23
  TextContent,
24
24
  Text
25
25
  } from '@patternfly/react-core';
26
- import DashboardWrapper from './examples/DashboardWrapper';
26
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
27
27
 
28
28
  class BannerDemo extends React.Component {
29
29
  render() {
@@ -87,7 +87,7 @@ import {
87
87
  TextContent,
88
88
  Text
89
89
  } from '@patternfly/react-core';
90
- import DashboardWrapper from '../examples/DashboardWrapper';
90
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
91
91
 
92
92
  class BannerDemo extends React.Component {
93
93
  render() {
@@ -3,7 +3,7 @@ id: Card view
3
3
  section: demos
4
4
  ---
5
5
 
6
- import DashboardWrapper from '../examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
 
8
8
  import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
9
9
  import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
@@ -66,7 +66,7 @@ import {
66
66
  ToolbarFilter,
67
67
  ToolbarContent
68
68
  } from '@patternfly/react-core';
69
- import DashboardWrapper from '../examples/DashboardWrapper';
69
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
70
70
 
71
71
  import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
72
72
  import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
@@ -3,7 +3,7 @@ id: Jump links
3
3
  section: components
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
 
8
8
  ## Demos
9
9
 
@@ -33,7 +33,7 @@ import {
33
33
  TextContent,
34
34
  getResizeObserver
35
35
  } from '@patternfly/react-core';
36
- import DashboardWrapper from './examples/DashboardWrapper';
36
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
37
37
 
38
38
  ScrollspyH2 = () => {
39
39
  const headings = [1, 2, 3, 4, 5];
@@ -140,4 +140,4 @@ This demo shows how jump links can be used in combination with a drawer.
140
140
  The `scrollableSelector` prop passed to the jump links component is an `id` that was placed on the `DrawerContent` component.
141
141
 
142
142
  ```js isFullscreen file="./examples/JumpLinks/JumpLinksWithDrawer.js"
143
- ```
143
+ ```
package/src/demos/Nav.md CHANGED
@@ -3,8 +3,8 @@ id: Navigation
3
3
  section: components
4
4
  ---
5
5
 
6
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
7
- import DashboardHeader from './examples/DashboardHeader';
6
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
8
8
  import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
9
9
  import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
10
10
  import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
@@ -34,8 +34,8 @@ import {
34
34
  TextContent,
35
35
  Text
36
36
  } from '@patternfly/react-core';
37
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
38
- import DashboardHeader from './examples/DashboardHeader';
37
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
38
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
39
39
 
40
40
  class PageLayoutDefaultNav extends React.Component {
41
41
  constructor(props) {
@@ -133,7 +133,7 @@ import {
133
133
  TextContent,
134
134
  Text
135
135
  } from '@patternfly/react-core';
136
- import DashboardHeader from './examples/DashboardHeader';
136
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
137
137
 
138
138
  class PageLayoutGroupsNav extends React.Component {
139
139
  constructor(props) {
@@ -242,8 +242,8 @@ import {
242
242
  TextContent,
243
243
  Text
244
244
  } from '@patternfly/react-core';
245
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
246
- import DashboardHeader from './examples/DashboardHeader';
245
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
246
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
247
247
 
248
248
  class PageLayoutExpandableNav extends React.Component {
249
249
  constructor(props) {
@@ -380,7 +380,7 @@ import {
380
380
  PageHeaderToolsGroup,
381
381
  PageHeaderToolsItem
382
382
  } from '@patternfly/react-core';
383
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
383
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
384
384
  import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
385
385
  import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
386
386
  import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
@@ -581,8 +581,8 @@ import {
581
581
  TextContent,
582
582
  Text
583
583
  } from '@patternfly/react-core';
584
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
585
- import DashboardHeader from './examples/DashboardHeader';
584
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
585
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
586
586
 
587
587
  class VerticalNavWithSubnav extends React.Component {
588
588
  constructor(props) {
@@ -737,7 +737,7 @@ import {
737
737
  PageHeaderToolsGroup,
738
738
  PageHeaderToolsItem
739
739
  } from '@patternfly/react-core';
740
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
740
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
741
741
  import CogIcon from '@patternfly/react-icons/dist/esm/icons/cog-icon';
742
742
  import HelpIcon from '@patternfly/react-icons/dist/esm/icons/help-icon';
743
743
  import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
@@ -984,8 +984,8 @@ import {
984
984
  TextContent,
985
985
  Text
986
986
  } from '@patternfly/react-core';
987
- import { DashboardBreadcrumb } from './examples/DashboardWrapper';
988
- import DashboardHeader from './examples/DashboardHeader';
987
+ import { DashboardBreadcrumb } from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
988
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
989
989
 
990
990
  class PageLayoutTertiaryNav extends React.Component {
991
991
  constructor(props) {
@@ -1087,7 +1087,7 @@ import {
1087
1087
  TextContent,
1088
1088
  Text
1089
1089
  } from '@patternfly/react-core';
1090
- import DashboardHeader from './examples/DashboardHeader';
1090
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
1091
1091
 
1092
1092
  class PageLayoutLightNav extends React.Component {
1093
1093
  constructor(props) {
@@ -1436,7 +1436,7 @@ import {
1436
1436
  MenuList,
1437
1437
  MenuItem
1438
1438
  } from '@patternfly/react-core';
1439
- import DashboardHeader from './examples/DashboardHeader';
1439
+ import DashboardHeader from '@patternfly/react-core/src/demos/examples/DashboardHeader';
1440
1440
 
1441
1441
  class VerticalPage extends React.Component {
1442
1442
  constructor(props) {
@@ -3,7 +3,7 @@ id: Primary-detail
3
3
  section: demos
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
8
8
  import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
9
9
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
@@ -70,7 +70,7 @@ import {
70
70
  TextInput,
71
71
  Title
72
72
  } from '@patternfly/react-core';
73
- import DashboardWrapper from './examples/DashboardWrapper';
73
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
74
74
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
75
75
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
76
76
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
@@ -530,7 +530,7 @@ import {
530
530
  TextInput,
531
531
  Title
532
532
  } from '@patternfly/react-core';
533
- import DashboardWrapper from './examples/DashboardWrapper';
533
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
534
534
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
535
535
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
536
536
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
@@ -994,7 +994,7 @@ import {
994
994
  ToolbarContent,
995
995
  ToolbarFilter
996
996
  } from '@patternfly/react-core';
997
- import DashboardWrapper from './examples/DashboardWrapper';
997
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
998
998
  import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
999
999
  import pfIcon from './pf-logo-small.svg';
1000
1000
  import activeMQIcon from './activemq-core_200x150.png';
@@ -1603,7 +1603,7 @@ import {
1603
1603
  TextInput,
1604
1604
  Title
1605
1605
  } from '@patternfly/react-core';
1606
- import DashboardWrapper from './examples/DashboardWrapper';
1606
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
1607
1607
 
1608
1608
  class PrimaryDetailSimpleListInCard extends React.Component {
1609
1609
  constructor(props) {
@@ -1764,7 +1764,7 @@ import {
1764
1764
  TextContent,
1765
1765
  Title
1766
1766
  } from '@patternfly/react-core';
1767
- import DashboardWrapper from './examples/DashboardWrapper';
1767
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
1768
1768
  import CaretDownIcon from '@patternfly/react-icons/dist/esm/icons/caret-down-icon';
1769
1769
 
1770
1770
  class PrimaryDetailDataListInCard extends React.Component {
@@ -2016,7 +2016,7 @@ import {
2016
2016
  TextInput,
2017
2017
  Title
2018
2018
  } from '@patternfly/react-core';
2019
- import DashboardWrapper from './examples/DashboardWrapper';
2019
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
2020
2020
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
2021
2021
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
2022
2022
  import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
package/src/demos/Tabs.md CHANGED
@@ -3,7 +3,7 @@ id: Tabs
3
3
  section: components
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
8
8
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
9
9
  import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
@@ -39,7 +39,7 @@ import {
39
39
  Flex,
40
40
  FlexItem
41
41
  } from '@patternfly/react-core';
42
- import DashboardWrapper from './examples/DashboardWrapper';
42
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
43
43
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
44
44
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
45
45
 
@@ -229,7 +229,7 @@ import {
229
229
  Flex,
230
230
  FlexItem
231
231
  } from '@patternfly/react-core';
232
- import DashboardWrapper from './examples/DashboardWrapper';
232
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
233
233
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
234
234
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
235
235
 
@@ -3,7 +3,7 @@ id: Toolbar
3
3
  section: components
4
4
  ---
5
5
 
6
- import DashboardWrapper from './examples/DashboardWrapper';
6
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
7
7
 
8
8
  import PauseIcon from '@patternfly/react-icons/dist/esm/icons/pause-icon';
9
9
  import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
@@ -40,7 +40,7 @@ import {
40
40
  PageSectionVariants,
41
41
  Tooltip
42
42
  } from '@patternfly/react-core';
43
- import DashboardWrapper from './examples/DashboardWrapper';
43
+ import DashboardWrapper from '@patternfly/react-core/src/demos/examples/DashboardWrapper';
44
44
 
45
45
  import PauseIcon from '@patternfly/react-icons/dist/esm/icons/pause-icon';
46
46
  import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';