@patternfly/react-core 4.199.2 → 4.199.5
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 +24 -0
- package/dist/umd/react-core.css +2 -2
- package/dist/umd/react-core.min.css +221 -221
- package/package.json +6 -6
- package/src/components/AboutModal/__tests__/AboutModal.test.tsx +41 -60
- package/src/components/Accordion/__tests__/Accordion.test.tsx +23 -17
- package/src/components/Alert/__tests__/Alert.test.tsx +195 -184
- package/src/components/Alert/__tests__/Generated/AlertActionCloseButton.test.tsx +19 -17
- package/src/components/Alert/__tests__/Generated/__snapshots__/AlertActionCloseButton.test.tsx.snap +26 -4
- package/src/components/Alert/__tests__/__snapshots__/Alert.test.tsx.snap +50 -700
- package/src/components/AlertGroup/__tests__/AlertGroup.test.tsx +68 -73
- package/src/components/AlertGroup/__tests__/__snapshots__/AlertGroup.test.tsx.snap +1 -893
- package/src/components/ApplicationLauncher/__tests__/Generated/ApplicationLauncherSeparator.test.tsx +13 -10
- package/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncherSeparator.test.tsx.snap +12 -1
- package/src/components/Button/__tests__/Button.test.tsx +116 -107
- package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +21 -21
- package/src/components/Card/__tests__/Card.test.tsx +119 -100
- package/src/components/Card/__tests__/CardBody.test.tsx +35 -28
- package/src/components/Card/__tests__/CardFooter.test.tsx +28 -24
- package/src/components/Card/__tests__/CardHeadMain.test.tsx +19 -14
- package/src/components/Card/__tests__/CardHeader.test.tsx +6 -22
- package/src/components/Card/__tests__/CardHeaderMain.test.tsx +19 -14
- package/src/components/Card/__tests__/CardTitle.test.tsx +25 -0
- package/src/components/Card/__tests__/__snapshots__/Card.test.tsx.snap +12 -28
- package/src/components/Card/__tests__/__snapshots__/CardBody.test.tsx.snap +2 -4
- package/src/components/Card/__tests__/__snapshots__/CardFooter.test.tsx.snap +1 -3
- package/src/components/Card/__tests__/__snapshots__/CardHeadMain.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardHeader.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardHeaderMain.test.tsx.snap +1 -11
- package/src/components/Card/__tests__/__snapshots__/CardTitle.test.tsx.snap +3 -0
- package/src/components/Checkbox/__tests__/Checkbox.test.tsx +66 -70
- package/src/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +9 -204
- package/src/components/ClipboardCopy/examples/ClipboardCopy.md +11 -123
- package/src/components/ClipboardCopy/examples/ClipboardCopyBasic.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpanded.tsx +9 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyExpandedWithArray.tsx +14 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompact.tsx +7 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactCode.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactInSentence.tsx +36 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx +20 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyJSONObject.tsx +18 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnly.tsx +8 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpanded.tsx +9 -0
- package/src/components/ClipboardCopy/examples/ClipboardCopyReadOnlyExpandedByDefault.tsx +9 -0
package/src/components/ClipboardCopy/examples/ClipboardCopyInlineCompactWithAdditionalAction.tsx
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClipboardCopy, ClipboardCopyAction, Button } from '@patternfly/react-core';
|
|
3
|
+
import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
4
|
+
|
|
5
|
+
export const ClipboardCopyInlineCompactWithAdditionalAction: React.FunctionComponent = () => (
|
|
6
|
+
<ClipboardCopy
|
|
7
|
+
hoverTip="Copy"
|
|
8
|
+
clickTip="Copied"
|
|
9
|
+
variant="inline-compact"
|
|
10
|
+
additionalActions={
|
|
11
|
+
<ClipboardCopyAction>
|
|
12
|
+
<Button variant="plain" aria-label="Run in web terminal">
|
|
13
|
+
<PlayIcon aria-hidden />
|
|
14
|
+
</Button>
|
|
15
|
+
</ClipboardCopyAction>
|
|
16
|
+
}
|
|
17
|
+
>
|
|
18
|
+
2.3.4-2-redhat
|
|
19
|
+
</ClipboardCopy>
|
|
20
|
+
);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ClipboardCopyJSONObject: React.FunctionComponent = () => (
|
|
5
|
+
<ClipboardCopy isCode hoverTip="Copy" clickTip="Copied" variant={ClipboardCopyVariant.expansion}>
|
|
6
|
+
{`{ "menu": {
|
|
7
|
+
"id": "file",
|
|
8
|
+
"value": "File",
|
|
9
|
+
"popup": {
|
|
10
|
+
"menuitem": [
|
|
11
|
+
{"value": "New", "onclick": "CreateNewDoc()"},
|
|
12
|
+
{"value": "Open", "onclick": "OpenDoc()"},
|
|
13
|
+
{"value": "Close", "onclick": "CloseDoc()"}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}} `}
|
|
17
|
+
</ClipboardCopy>
|
|
18
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ClipboardCopyReadOnlyExpanded: React.FunctionComponent = () => (
|
|
5
|
+
<ClipboardCopy isReadOnly hoverTip="Copy" clickTip="Copied" variant={ClipboardCopyVariant.expansion}>
|
|
6
|
+
Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting
|
|
7
|
+
expansion.
|
|
8
|
+
</ClipboardCopy>
|
|
9
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ClipboardCopy, ClipboardCopyVariant } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const ClipboardCopyReadOnlyExpandedByDefault: React.FunctionComponent = () => (
|
|
5
|
+
<ClipboardCopy isReadOnly isExpanded hoverTip="Copy" clickTip="Copied" variant={ClipboardCopyVariant.expansion}>
|
|
6
|
+
Got a lot of text here, need to see all of it? Click that arrow on the left side and check out the resulting
|
|
7
|
+
expansion.
|
|
8
|
+
</ClipboardCopy>
|
|
9
|
+
);
|