@patternfly/react-core 5.2.0-prerelease.23 → 5.2.0-prerelease.25
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/CHANGELOG.md +14 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/Chip/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/DragDrop/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/Text/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/Tile/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/ApplicationLauncher/package.json +1 -1
- package/dist/dynamic/deprecated/components/ContextSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Dropdown/package.json +1 -1
- package/dist/dynamic/deprecated/components/OptionsMenu/package.json +1 -1
- package/dist/dynamic/deprecated/components/PageHeader/package.json +1 -1
- package/dist/dynamic/deprecated/components/Select/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/favorites/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +5 -3
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +20 -8
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +5 -3
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +20 -8
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/styles/base.css +2 -2
- package/dist/umd/react-core.min.js +2 -2
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +25 -12
- package/src/demos/DataList/examples/DataListBasic.tsx +314 -0
- package/src/demos/DataListDemo.md +12 -0
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"5.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"5.2.0-prerelease.24","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"5.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"5.2.0-prerelease.24","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"5.2.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"5.2.0-prerelease.24","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "5.2.0-prerelease.
|
|
3
|
+
"version": "5.2.0-prerelease.25",
|
|
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",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@patternfly/react-icons": "^5.2.0-prerelease.
|
|
49
|
-
"@patternfly/react-styles": "^5.2.0-prerelease.
|
|
50
|
-
"@patternfly/react-tokens": "^5.2.0-prerelease.
|
|
48
|
+
"@patternfly/react-icons": "^5.2.0-prerelease.7",
|
|
49
|
+
"@patternfly/react-styles": "^5.2.0-prerelease.5",
|
|
50
|
+
"@patternfly/react-tokens": "^5.2.0-prerelease.6",
|
|
51
51
|
"focus-trap": "7.5.2",
|
|
52
52
|
"react-dropzone": "^14.2.3",
|
|
53
53
|
"tslib": "^2.5.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@patternfly/patternfly": "5.2.0-prerelease.
|
|
56
|
+
"@patternfly/patternfly": "5.2.0-prerelease.5",
|
|
57
57
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
58
58
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
59
59
|
"@rollup/plugin-replace": "^5.0.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"react": "^17 || ^18",
|
|
72
72
|
"react-dom": "^17 || ^18"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "75442bfa390c914f392c7daf4149e042d03c7e12"
|
|
75
75
|
}
|
|
@@ -21,9 +21,10 @@ export enum ClipboardCopyVariant {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface ClipboardCopyState {
|
|
24
|
-
text: string
|
|
24
|
+
text: string;
|
|
25
25
|
expanded: boolean;
|
|
26
26
|
copied: boolean;
|
|
27
|
+
textWhenExpanded: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
export interface ClipboardCopyProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'>, OUIAProps {
|
|
@@ -72,7 +73,7 @@ export interface ClipboardCopyProps extends Omit<React.HTMLProps<HTMLDivElement>
|
|
|
72
73
|
/** A function that is triggered on clicking the copy button. */
|
|
73
74
|
onCopy?: (event: React.ClipboardEvent<HTMLDivElement>, text?: React.ReactNode) => void;
|
|
74
75
|
/** A function that is triggered on changing the text. */
|
|
75
|
-
onChange?: (event: React.FormEvent, text?: string
|
|
76
|
+
onChange?: (event: React.FormEvent, text?: string) => void;
|
|
76
77
|
/** The text which is copied. */
|
|
77
78
|
children: React.ReactNode;
|
|
78
79
|
/** Additional actions for inline-compact clipboard copy. Should be wrapped with ClipboardCopyAction. */
|
|
@@ -88,12 +89,12 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
88
89
|
timer = null as number;
|
|
89
90
|
constructor(props: ClipboardCopyProps) {
|
|
90
91
|
super(props);
|
|
92
|
+
const text = Array.isArray(this.props.children) ? this.props.children.join('') : (this.props.children as string);
|
|
91
93
|
this.state = {
|
|
92
|
-
text
|
|
93
|
-
? this.props.children.join('')
|
|
94
|
-
: (this.props.children as string | number),
|
|
94
|
+
text,
|
|
95
95
|
expanded: this.props.isExpanded,
|
|
96
|
-
copied: false
|
|
96
|
+
copied: false,
|
|
97
|
+
textWhenExpanded: text
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
|
|
@@ -119,7 +120,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
119
120
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120
121
|
componentDidUpdate = (prevProps: ClipboardCopyProps, prevState: ClipboardCopyState) => {
|
|
121
122
|
if (prevProps.children !== this.props.children) {
|
|
122
|
-
this.setState({ text: this.props.children as string
|
|
123
|
+
this.setState({ text: this.props.children as string });
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
|
|
@@ -136,11 +137,16 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
136
137
|
}));
|
|
137
138
|
};
|
|
138
139
|
|
|
139
|
-
updateText = (event: React.FormEvent, text: string
|
|
140
|
+
updateText = (event: React.FormEvent, text: string) => {
|
|
140
141
|
this.setState({ text });
|
|
141
142
|
this.props.onChange(event, text);
|
|
142
143
|
};
|
|
143
144
|
|
|
145
|
+
updateTextWhenExpanded = (event: React.FormEvent, text: string) => {
|
|
146
|
+
this.setState({ textWhenExpanded: text });
|
|
147
|
+
this.props.onChange(event, text);
|
|
148
|
+
};
|
|
149
|
+
|
|
144
150
|
render = () => {
|
|
145
151
|
const {
|
|
146
152
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
@@ -229,7 +235,14 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
229
235
|
{variant === 'expansion' && (
|
|
230
236
|
<ClipboardCopyToggle
|
|
231
237
|
isExpanded={this.state.expanded}
|
|
232
|
-
onClick={
|
|
238
|
+
onClick={(_event) => {
|
|
239
|
+
this.expandContent(_event);
|
|
240
|
+
if (this.state.expanded) {
|
|
241
|
+
this.setState({ text: this.state.textWhenExpanded });
|
|
242
|
+
} else {
|
|
243
|
+
this.setState({ textWhenExpanded: this.state.text });
|
|
244
|
+
}
|
|
245
|
+
}}
|
|
233
246
|
id={`${toggleIdPrefix}${id}`}
|
|
234
247
|
textId={`${textIdPrefix}${id}`}
|
|
235
248
|
contentId={`${contentIdPrefix}${id}`}
|
|
@@ -239,7 +252,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
239
252
|
<TextInput
|
|
240
253
|
readOnlyVariant={isReadOnly || this.state.expanded ? 'default' : undefined}
|
|
241
254
|
onChange={this.updateText}
|
|
242
|
-
value={this.state.
|
|
255
|
+
value={this.state.expanded ? this.state.textWhenExpanded : this.state.text}
|
|
243
256
|
id={`text-input-${id}`}
|
|
244
257
|
aria-label={textAriaLabel}
|
|
245
258
|
{...(isCode && { dir: 'ltr' })}
|
|
@@ -253,7 +266,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
253
266
|
textId={`text-input-${id}`}
|
|
254
267
|
aria-label={hoverTip}
|
|
255
268
|
onClick={(event: any) => {
|
|
256
|
-
onCopy(event, this.state.text);
|
|
269
|
+
onCopy(event, this.state.expanded ? this.state.textWhenExpanded : this.state.text);
|
|
257
270
|
this.setState({ copied: true });
|
|
258
271
|
}}
|
|
259
272
|
onTooltipHidden={() => this.setState({ copied: false })}
|
|
@@ -266,7 +279,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
|
|
|
266
279
|
isReadOnly={isReadOnly}
|
|
267
280
|
isCode={isCode}
|
|
268
281
|
id={`content-${id}`}
|
|
269
|
-
onChange={this.
|
|
282
|
+
onChange={this.updateTextWhenExpanded}
|
|
270
283
|
>
|
|
271
284
|
{this.state.text}
|
|
272
285
|
</ClipboardCopyExpanded>
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
DataList,
|
|
5
|
+
DataListItem,
|
|
6
|
+
DataListCell,
|
|
7
|
+
DataListItemRow,
|
|
8
|
+
DataListItemCells,
|
|
9
|
+
Flex,
|
|
10
|
+
FlexItem,
|
|
11
|
+
MenuToggle,
|
|
12
|
+
MenuToggleCheckbox,
|
|
13
|
+
OverflowMenu,
|
|
14
|
+
OverflowMenuControl,
|
|
15
|
+
OverflowMenuItem,
|
|
16
|
+
PageSection,
|
|
17
|
+
PageSectionVariants,
|
|
18
|
+
Pagination,
|
|
19
|
+
Text,
|
|
20
|
+
TextContent,
|
|
21
|
+
TextVariants,
|
|
22
|
+
Toolbar,
|
|
23
|
+
ToolbarItem,
|
|
24
|
+
ToolbarContent
|
|
25
|
+
} from '@patternfly/react-core';
|
|
26
|
+
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
27
|
+
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';
|
|
28
|
+
|
|
29
|
+
import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
|
|
30
|
+
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
|
|
31
|
+
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
32
|
+
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
|
|
33
|
+
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
34
|
+
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
|
|
35
|
+
|
|
36
|
+
export const DataListBasic: React.FunctionComponent = () => {
|
|
37
|
+
const renderPagination = () => <Pagination itemCount={5} page={1} variant="top" isCompact />;
|
|
38
|
+
|
|
39
|
+
const toolbarItems = (
|
|
40
|
+
<React.Fragment>
|
|
41
|
+
<ToolbarItem variant="bulk-select">
|
|
42
|
+
<MenuToggle
|
|
43
|
+
aria-label="Select cards"
|
|
44
|
+
splitButtonOptions={{
|
|
45
|
+
items: [
|
|
46
|
+
<MenuToggleCheckbox
|
|
47
|
+
id="split-dropdown-checkbox"
|
|
48
|
+
key="split-dropdown-checkbox"
|
|
49
|
+
aria-label={'Select all cards'}
|
|
50
|
+
/>
|
|
51
|
+
]
|
|
52
|
+
}}
|
|
53
|
+
></MenuToggle>
|
|
54
|
+
</ToolbarItem>
|
|
55
|
+
<ToolbarItem>
|
|
56
|
+
<MenuToggle>Filter by creator name</MenuToggle>
|
|
57
|
+
</ToolbarItem>
|
|
58
|
+
<ToolbarItem variant="overflow-menu">
|
|
59
|
+
<OverflowMenu breakpoint="md">
|
|
60
|
+
<OverflowMenuItem>
|
|
61
|
+
<Button variant="primary">Create instance</Button>
|
|
62
|
+
</OverflowMenuItem>
|
|
63
|
+
<OverflowMenuControl hasAdditionalOptions>
|
|
64
|
+
<MenuToggle aria-label="Toolbar kebab overflow menu" variant="plain">
|
|
65
|
+
<EllipsisVIcon />
|
|
66
|
+
</MenuToggle>
|
|
67
|
+
</OverflowMenuControl>
|
|
68
|
+
</OverflowMenu>
|
|
69
|
+
</ToolbarItem>
|
|
70
|
+
<ToolbarItem variant="pagination" align={{ default: 'alignRight' }}>
|
|
71
|
+
{renderPagination()}
|
|
72
|
+
</ToolbarItem>
|
|
73
|
+
</React.Fragment>
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<React.Fragment>
|
|
78
|
+
<DashboardWrapper mainContainerId="main-content-datalist-view-default-nav" breadcrumb={null}>
|
|
79
|
+
<PageSection variant={PageSectionVariants.light}>
|
|
80
|
+
<TextContent>
|
|
81
|
+
<Text component="h1">Projects</Text>
|
|
82
|
+
<Text component="p">This is a demo that showcases PatternFly Data List</Text>
|
|
83
|
+
</TextContent>
|
|
84
|
+
</PageSection>
|
|
85
|
+
<PageSection isFilled>
|
|
86
|
+
<Toolbar id="toolbar-group-types">
|
|
87
|
+
<ToolbarContent>{toolbarItems}</ToolbarContent>
|
|
88
|
+
</Toolbar>
|
|
89
|
+
<DataList aria-label="Demo data list">
|
|
90
|
+
<DataListItem aria-labelledby="Demo-item1">
|
|
91
|
+
<DataListItemRow>
|
|
92
|
+
<DataListItemCells
|
|
93
|
+
dataListCells={[
|
|
94
|
+
<DataListCell isFilled={false} key="buttons1">
|
|
95
|
+
<Flex direction={{ default: 'column' }}>
|
|
96
|
+
<FlexItem>
|
|
97
|
+
<Text component={TextVariants.p}>patternfly</Text>
|
|
98
|
+
</FlexItem>
|
|
99
|
+
<FlexItem>
|
|
100
|
+
<Text component={TextVariants.small}>
|
|
101
|
+
Working repo for
|
|
102
|
+
<a href="http://www.patternfly.org/">PatternFly</a>
|
|
103
|
+
</Text>
|
|
104
|
+
</FlexItem>
|
|
105
|
+
<FlexItem>
|
|
106
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
107
|
+
<FlexItem>
|
|
108
|
+
<CodeBranchIcon /> 10
|
|
109
|
+
</FlexItem>
|
|
110
|
+
<FlexItem>
|
|
111
|
+
<CodeIcon /> 4
|
|
112
|
+
</FlexItem>
|
|
113
|
+
<FlexItem>
|
|
114
|
+
<CubeIcon /> 5
|
|
115
|
+
</FlexItem>
|
|
116
|
+
<FlexItem> Updated 2 days ago</FlexItem>
|
|
117
|
+
</Flex>
|
|
118
|
+
</FlexItem>
|
|
119
|
+
</Flex>
|
|
120
|
+
</DataListCell>,
|
|
121
|
+
<DataListCell isFilled={false} alignRight key="secondary content align">
|
|
122
|
+
<Flex>
|
|
123
|
+
<FlexItem>
|
|
124
|
+
<Button variant="secondary">Action</Button>
|
|
125
|
+
</FlexItem>
|
|
126
|
+
<FlexItem>
|
|
127
|
+
<a href="#">Link</a>
|
|
128
|
+
</FlexItem>
|
|
129
|
+
</Flex>
|
|
130
|
+
</DataListCell>
|
|
131
|
+
]}
|
|
132
|
+
/>
|
|
133
|
+
</DataListItemRow>
|
|
134
|
+
</DataListItem>
|
|
135
|
+
<DataListItem aria-labelledby="Demo-item2">
|
|
136
|
+
<DataListItemRow>
|
|
137
|
+
<DataListItemCells
|
|
138
|
+
dataListCells={[
|
|
139
|
+
<DataListCell isFilled={false} key="buttons2">
|
|
140
|
+
<Flex direction={{ default: 'column' }}>
|
|
141
|
+
<FlexItem>
|
|
142
|
+
<Text component={TextVariants.small}>patternfly-elements</Text>
|
|
143
|
+
</FlexItem>
|
|
144
|
+
<FlexItem>
|
|
145
|
+
<Text component={TextVariants.small}>PatternFly elements</Text>
|
|
146
|
+
</FlexItem>
|
|
147
|
+
<FlexItem>
|
|
148
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
149
|
+
<FlexItem>
|
|
150
|
+
<CodeBranchIcon /> 5
|
|
151
|
+
</FlexItem>
|
|
152
|
+
<FlexItem>
|
|
153
|
+
<CodeIcon /> 9
|
|
154
|
+
</FlexItem>
|
|
155
|
+
<FlexItem>
|
|
156
|
+
<CubeIcon /> 2
|
|
157
|
+
</FlexItem>
|
|
158
|
+
<FlexItem>
|
|
159
|
+
<CheckCircleIcon />
|
|
160
|
+
11
|
|
161
|
+
</FlexItem>
|
|
162
|
+
<FlexItem>
|
|
163
|
+
<ExclamationTriangleIcon /> 4
|
|
164
|
+
</FlexItem>
|
|
165
|
+
<FlexItem>
|
|
166
|
+
<TimesCircleIcon /> 1
|
|
167
|
+
</FlexItem>
|
|
168
|
+
<FlexItem> Updated 2 days ago</FlexItem>
|
|
169
|
+
</Flex>
|
|
170
|
+
</FlexItem>
|
|
171
|
+
</Flex>
|
|
172
|
+
</DataListCell>,
|
|
173
|
+
<DataListCell isFilled={false} alignRight key="secondary content align">
|
|
174
|
+
<Flex>
|
|
175
|
+
<FlexItem>
|
|
176
|
+
<Button variant="secondary">Action</Button>
|
|
177
|
+
</FlexItem>
|
|
178
|
+
<FlexItem>
|
|
179
|
+
<a href="#">Link</a>
|
|
180
|
+
</FlexItem>
|
|
181
|
+
</Flex>
|
|
182
|
+
</DataListCell>
|
|
183
|
+
]}
|
|
184
|
+
/>
|
|
185
|
+
</DataListItemRow>
|
|
186
|
+
</DataListItem>
|
|
187
|
+
<DataListItem>
|
|
188
|
+
<DataListItemRow>
|
|
189
|
+
<DataListItemCells
|
|
190
|
+
dataListCells={[
|
|
191
|
+
<DataListCell isFilled={false} key="Demo-item3">
|
|
192
|
+
<Flex direction={{ default: 'column' }}>
|
|
193
|
+
<FlexItem>
|
|
194
|
+
<Text component={TextVariants.small}>patternfly-unified-design-kit</Text>
|
|
195
|
+
</FlexItem>
|
|
196
|
+
</Flex>
|
|
197
|
+
</DataListCell>,
|
|
198
|
+
<DataListCell isFilled={false} alignRight key="buttons3">
|
|
199
|
+
<Flex>
|
|
200
|
+
<FlexItem>
|
|
201
|
+
<Button variant="secondary">Action</Button>
|
|
202
|
+
</FlexItem>
|
|
203
|
+
<FlexItem>
|
|
204
|
+
<a href="#">Link</a>
|
|
205
|
+
</FlexItem>
|
|
206
|
+
</Flex>
|
|
207
|
+
</DataListCell>
|
|
208
|
+
]}
|
|
209
|
+
/>
|
|
210
|
+
</DataListItemRow>
|
|
211
|
+
</DataListItem>
|
|
212
|
+
<DataListItem aria-labelledby="Demo-item4">
|
|
213
|
+
<DataListItemRow>
|
|
214
|
+
<DataListItemCells
|
|
215
|
+
dataListCells={[
|
|
216
|
+
<DataListCell isFilled={false} key="buttons4">
|
|
217
|
+
<Flex direction={{ default: 'column' }}>
|
|
218
|
+
<FlexItem>
|
|
219
|
+
<Text component={TextVariants.small}>patternfly</Text>
|
|
220
|
+
</FlexItem>
|
|
221
|
+
<FlexItem>
|
|
222
|
+
<Text component={TextVariants.small}>
|
|
223
|
+
Working repo for
|
|
224
|
+
<a href="http://www.patternfly.org/">PatternFly</a>
|
|
225
|
+
</Text>
|
|
226
|
+
</FlexItem>
|
|
227
|
+
<FlexItem>
|
|
228
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
229
|
+
<FlexItem>
|
|
230
|
+
<CodeBranchIcon />
|
|
231
|
+
10
|
|
232
|
+
</FlexItem>
|
|
233
|
+
<FlexItem>
|
|
234
|
+
<CodeIcon /> 4
|
|
235
|
+
</FlexItem>
|
|
236
|
+
<FlexItem>
|
|
237
|
+
<CubeIcon /> 5
|
|
238
|
+
</FlexItem>
|
|
239
|
+
<FlexItem> Updated 2 days ago</FlexItem>
|
|
240
|
+
</Flex>
|
|
241
|
+
</FlexItem>
|
|
242
|
+
</Flex>
|
|
243
|
+
</DataListCell>,
|
|
244
|
+
<DataListCell isFilled={false} alignRight key="secondary content align">
|
|
245
|
+
<Flex>
|
|
246
|
+
<FlexItem>
|
|
247
|
+
<Button variant="secondary">Action</Button>
|
|
248
|
+
</FlexItem>
|
|
249
|
+
<FlexItem>
|
|
250
|
+
<a href="#">Link</a>
|
|
251
|
+
</FlexItem>
|
|
252
|
+
</Flex>
|
|
253
|
+
</DataListCell>
|
|
254
|
+
]}
|
|
255
|
+
/>
|
|
256
|
+
</DataListItemRow>
|
|
257
|
+
</DataListItem>
|
|
258
|
+
<DataListItem aria-labelledby="Demo-item5">
|
|
259
|
+
<DataListItemRow>
|
|
260
|
+
<DataListItemCells
|
|
261
|
+
dataListCells={[
|
|
262
|
+
<DataListCell isFilled={false} key="buttons5">
|
|
263
|
+
<Flex direction={{ default: 'column' }}>
|
|
264
|
+
<FlexItem>
|
|
265
|
+
<Text component={TextVariants.small}>patternfly-elements</Text>
|
|
266
|
+
</FlexItem>
|
|
267
|
+
<FlexItem>
|
|
268
|
+
<Text component={TextVariants.small}>PatternFly elements</Text>
|
|
269
|
+
</FlexItem>
|
|
270
|
+
<FlexItem>
|
|
271
|
+
<Flex spaceItems={{ default: 'spaceItemsSm' }}>
|
|
272
|
+
<FlexItem>
|
|
273
|
+
<CodeBranchIcon /> 5
|
|
274
|
+
</FlexItem>
|
|
275
|
+
<FlexItem>
|
|
276
|
+
<CodeIcon /> 9
|
|
277
|
+
</FlexItem>
|
|
278
|
+
<FlexItem>
|
|
279
|
+
<CubeIcon /> 2
|
|
280
|
+
</FlexItem>
|
|
281
|
+
<FlexItem>
|
|
282
|
+
<CheckCircleIcon /> 11
|
|
283
|
+
</FlexItem>
|
|
284
|
+
<FlexItem>
|
|
285
|
+
<ExclamationTriangleIcon /> 4
|
|
286
|
+
</FlexItem>
|
|
287
|
+
<FlexItem>
|
|
288
|
+
<TimesCircleIcon /> 1
|
|
289
|
+
</FlexItem>
|
|
290
|
+
<FlexItem> Updated 2 days ago</FlexItem>
|
|
291
|
+
</Flex>
|
|
292
|
+
</FlexItem>
|
|
293
|
+
</Flex>
|
|
294
|
+
</DataListCell>,
|
|
295
|
+
<DataListCell isFilled={false} alignRight key="secondary content align">
|
|
296
|
+
<Flex>
|
|
297
|
+
<FlexItem>
|
|
298
|
+
<Button variant="secondary">Action</Button>
|
|
299
|
+
</FlexItem>
|
|
300
|
+
<FlexItem>
|
|
301
|
+
<a href="#">Link</a>
|
|
302
|
+
</FlexItem>
|
|
303
|
+
</Flex>
|
|
304
|
+
</DataListCell>
|
|
305
|
+
]}
|
|
306
|
+
/>
|
|
307
|
+
</DataListItemRow>
|
|
308
|
+
</DataListItem>
|
|
309
|
+
</DataList>
|
|
310
|
+
</PageSection>
|
|
311
|
+
</DashboardWrapper>
|
|
312
|
+
</React.Fragment>
|
|
313
|
+
);
|
|
314
|
+
};
|
|
@@ -9,8 +9,20 @@ import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-i
|
|
|
9
9
|
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
10
10
|
import { css } from '@patternfly/react-styles';
|
|
11
11
|
|
|
12
|
+
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
|
|
13
|
+
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
14
|
+
import ExclamationTriangleIcon from '@patternfly/react-icons/dist/esm/icons/exclamation-triangle-icon';
|
|
15
|
+
import CheckCircleIcon from '@patternfly/react-icons/dist/esm/icons/check-circle-icon';
|
|
16
|
+
import TimesCircleIcon from '@patternfly/react-icons/dist/esm/icons/times-circle-icon';
|
|
17
|
+
|
|
12
18
|
## Demos
|
|
13
19
|
|
|
20
|
+
### Basic
|
|
21
|
+
|
|
22
|
+
```js file="./DataList/examples/DataListBasic.tsx" isFullscreen
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
14
26
|
### Expandable control in toolbar
|
|
15
27
|
|
|
16
28
|
```js
|