@patternfly/react-core 6.5.0-prerelease.66 → 6.5.0-prerelease.68
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 +10 -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/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Compass/package.json +1 -1
- package/dist/dynamic/components/Content/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/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/Hero/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/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/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/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/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/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/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/SSRSafeIds/SSRSafeIds/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/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/useSSRSafeId/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/styles/package.json +1 -1
- package/dist/esm/components/Drawer/Drawer.d.ts +3 -0
- package/dist/esm/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +3 -0
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts +10 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +2 -2
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerSection.d.ts +6 -1
- package/dist/esm/components/Drawer/DrawerSection.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerSection.js +2 -2
- package/dist/esm/components/Drawer/DrawerSection.js.map +1 -1
- package/dist/js/components/Drawer/Drawer.d.ts +3 -0
- package/dist/js/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/js/components/Drawer/Drawer.js +3 -0
- package/dist/js/components/Drawer/Drawer.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts +10 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +2 -2
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Drawer/DrawerSection.d.ts +6 -1
- package/dist/js/components/Drawer/DrawerSection.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerSection.js +2 -2
- package/dist/js/components/Drawer/DrawerSection.js.map +1 -1
- package/dist/umd/assets/{output-BzAdUnEh.css → output-CCwhUsDR.css} +21656 -21656
- package/dist/umd/react-core.min.js +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +3 -3
- package/src/components/Button/examples/Button.md +1 -1
- package/src/components/Button/examples/ButtonAriaDisabled.tsx +2 -2
- package/src/components/Button/examples/ButtonCircle.tsx +22 -7
- package/src/components/Button/examples/ButtonDisabled.tsx +2 -2
- package/src/components/Button/examples/ButtonVariations.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionList.md +1 -1
- package/src/components/DescriptionList/examples/DescriptionListAutoFitBasic.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthModified.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListAutoFitMinWidthResponsive.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListBasic.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListColumnFill.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListCompact.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListCompactHorizontal.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDefaultAutoColumn.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDefaultInlineGrid.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDefaultResponsiveColumns.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDefaultThreeColLg.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDefaultTwoCol.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListFluidHorizontal.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontal.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontalAutoColumn.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontalCustomTermWidth.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontalResponsiveColumns.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontalThreeColLg.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListHorizontalTwoCol.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListIconsOnTerms.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListResponsiveHoriVertGroup.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListWithTermHelpText.tsx +2 -2
- package/src/components/Drawer/Drawer.tsx +3 -0
- package/src/components/Drawer/DrawerPanelContent.tsx +16 -1
- package/src/components/Drawer/DrawerSection.tsx +8 -1
- package/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +31 -1
- package/src/components/Drawer/__tests__/DrawerSection.test.tsx +37 -0
- package/src/components/Drawer/examples/Drawer.md +1 -1
- package/src/components/Icon/examples/BodyIconSizes.tsx +4 -4
- package/src/components/Icon/examples/HeadingIconSizes.tsx +7 -7
- package/src/components/Icon/examples/Icon.md +1 -1
- package/src/components/Icon/examples/IconContentSizes.tsx +5 -5
- package/src/components/Icon/examples/IconInline.tsx +10 -10
- package/src/components/Icon/examples/StandaloneIconSizes.tsx +7 -7
- package/src/demos/CardView/CardView.md +1 -1
- package/src/demos/CardView/examples/CardView.tsx +2 -2
- package/src/demos/DescriptionList/DescriptionList.md +1 -1
- package/src/demos/DescriptionList/examples/DescriptionListInDrawer.tsx +2 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +2 -2
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DescriptionListDescription,
|
|
8
8
|
Checkbox
|
|
9
9
|
} from '@patternfly/react-core';
|
|
10
|
-
import
|
|
10
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
11
11
|
|
|
12
12
|
export const DescriptionListWithLargeDisplaySize: React.FunctionComponent = () => {
|
|
13
13
|
const [isChecked, setIsChecked] = useState<boolean>(false);
|
|
@@ -48,7 +48,7 @@ export const DescriptionListWithLargeDisplaySize: React.FunctionComponent = () =
|
|
|
48
48
|
<DescriptionListGroup>
|
|
49
49
|
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
50
50
|
<DescriptionListDescription>
|
|
51
|
-
<Button variant="link" isInline icon={<
|
|
51
|
+
<Button variant="link" isInline icon={<RhUiAddCircleFillIcon />}>
|
|
52
52
|
app=MyApp
|
|
53
53
|
</Button>
|
|
54
54
|
</DescriptionListDescription>
|
package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
Card,
|
|
8
8
|
Checkbox
|
|
9
9
|
} from '@patternfly/react-core';
|
|
10
|
-
import
|
|
10
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
11
11
|
|
|
12
12
|
export const DescriptionListWithLargeDisplaySizeAndCard: React.FunctionComponent = () => {
|
|
13
13
|
const [isChecked, setIsChecked] = useState<boolean>(false);
|
|
@@ -52,7 +52,7 @@ export const DescriptionListWithLargeDisplaySizeAndCard: React.FunctionComponent
|
|
|
52
52
|
<Card component="div">
|
|
53
53
|
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
54
54
|
<DescriptionListDescription>
|
|
55
|
-
<Button variant="link" isInline icon={<
|
|
55
|
+
<Button variant="link" isInline icon={<RhUiAddCircleFillIcon />}>
|
|
56
56
|
app=MyApp
|
|
57
57
|
</Button>
|
|
58
58
|
</DescriptionListDescription>
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DescriptionListTermHelpTextButton,
|
|
8
8
|
Popover
|
|
9
9
|
} from '@patternfly/react-core';
|
|
10
|
-
import
|
|
10
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
11
11
|
|
|
12
12
|
export const DescriptionListWithTermHelpText: React.FunctionComponent = () => (
|
|
13
13
|
<DescriptionList aria-label="Term help text">
|
|
@@ -44,7 +44,7 @@ export const DescriptionListWithTermHelpText: React.FunctionComponent = () => (
|
|
|
44
44
|
</Popover>
|
|
45
45
|
</DescriptionListTermHelpText>
|
|
46
46
|
<DescriptionListDescription>
|
|
47
|
-
<Button variant="link" isInline icon={<
|
|
47
|
+
<Button variant="link" isInline icon={<RhUiAddCircleFillIcon />}>
|
|
48
48
|
app=MyApp
|
|
49
49
|
</Button>
|
|
50
50
|
</DescriptionListDescription>
|
|
@@ -5,6 +5,9 @@ import { css } from '@patternfly/react-styles';
|
|
|
5
5
|
export enum DrawerColorVariant {
|
|
6
6
|
default = 'default',
|
|
7
7
|
secondary = 'secondary',
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated `DrawerColorVariant.noBackground` is deprecated. Use the `isPlain` prop on `DrawerPanelContent` and the `DrawerSection`instead.
|
|
10
|
+
*/
|
|
8
11
|
noBackground = 'no-background'
|
|
9
12
|
}
|
|
10
13
|
|
|
@@ -37,6 +37,12 @@ export interface DrawerPanelContentProps extends Omit<React.HTMLProps<HTMLDivEle
|
|
|
37
37
|
isResizable?: boolean;
|
|
38
38
|
/** @beta Flag indicating that the drawer panel should disable glass styles. This prop is intended to work with isPill drawers. */
|
|
39
39
|
hasNoGlass?: boolean;
|
|
40
|
+
/** @beta Flag indicating that the drawer panel should use glass styles when in glass theme */
|
|
41
|
+
isGlass?: boolean;
|
|
42
|
+
/** @beta Flag indicating that the drawer panel should use plain styles. This only applies when the drawer is static or inline. */
|
|
43
|
+
isPlain?: boolean;
|
|
44
|
+
/** @beta Flag indicating that plain styles should be disabled when glass styles are used. This only applies when the drawer is static or inline. */
|
|
45
|
+
isNoPlainOnGlass?: boolean;
|
|
40
46
|
/** Callback for resize end. */
|
|
41
47
|
onResize?: (event: MouseEvent | TouchEvent | React.KeyboardEvent, width: number, id: string) => void;
|
|
42
48
|
/** The minimum size of a drawer. */
|
|
@@ -56,7 +62,10 @@ export interface DrawerPanelContentProps extends Omit<React.HTMLProps<HTMLDivEle
|
|
|
56
62
|
xl?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
|
|
57
63
|
'2xl'?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
|
|
58
64
|
};
|
|
59
|
-
/**
|
|
65
|
+
/**
|
|
66
|
+
* Color variant of the background of the drawer panel.
|
|
67
|
+
* The `no-background`is deprecated; use the `isPlain` prop instead.
|
|
68
|
+
*/
|
|
60
69
|
colorVariant?: DrawerColorVariant | 'no-background' | 'default' | 'secondary';
|
|
61
70
|
/** Adds and customizes a focus trap on the drawer panel content. */
|
|
62
71
|
focusTrap?: DrawerPanelFocusTrapObject;
|
|
@@ -71,6 +80,9 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
71
80
|
hasNoBorder = false,
|
|
72
81
|
isResizable = false,
|
|
73
82
|
hasNoGlass = false,
|
|
83
|
+
isGlass = false,
|
|
84
|
+
isPlain = false,
|
|
85
|
+
isNoPlainOnGlass = false,
|
|
74
86
|
onResize,
|
|
75
87
|
minSize,
|
|
76
88
|
defaultSize,
|
|
@@ -368,6 +380,9 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
368
380
|
styles.drawerPanel,
|
|
369
381
|
isResizable && styles.modifiers.resizable,
|
|
370
382
|
hasNoGlass && 'pf-m-no-glass',
|
|
383
|
+
isGlass && styles.modifiers.glass,
|
|
384
|
+
isPlain && styles.modifiers.plain,
|
|
385
|
+
isNoPlainOnGlass && styles.modifiers.noPlainOnGlass,
|
|
371
386
|
hasNoBorder && styles.modifiers.noBorder,
|
|
372
387
|
formatBreakpointMods(widths, styles),
|
|
373
388
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
@@ -7,19 +7,26 @@ export interface DrawerSectionProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
/** Content to be rendered in the drawer section. */
|
|
9
9
|
children?: React.ReactNode;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Color variant of the background of the drawer section.
|
|
12
|
+
* The `no-background` value is deprecated; use the `isPlain` prop instead.
|
|
13
|
+
*/
|
|
11
14
|
colorVariant?: DrawerColorVariant | 'no-background' | 'default' | 'secondary';
|
|
15
|
+
/** @beta Flag indicating that the drawer section should use plain styles. */
|
|
16
|
+
isPlain?: boolean;
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
export const DrawerSection: React.FunctionComponent<DrawerSectionProps> = ({
|
|
15
20
|
className = '',
|
|
16
21
|
children,
|
|
17
22
|
colorVariant = DrawerColorVariant.default,
|
|
23
|
+
isPlain = false,
|
|
18
24
|
...props
|
|
19
25
|
}: DrawerSectionProps) => (
|
|
20
26
|
<div
|
|
21
27
|
className={css(
|
|
22
28
|
styles.drawerSection,
|
|
29
|
+
isPlain && styles.modifiers.plain,
|
|
23
30
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
24
31
|
colorVariant === DrawerColorVariant.secondary && styles.modifiers.secondary,
|
|
25
32
|
className
|
|
@@ -13,7 +13,7 @@ test(`Renders with only class ${styles.drawerPanel} by default`, () => {
|
|
|
13
13
|
expect(screen.getByText('Drawer panel content')).toHaveClass(styles.drawerPanel, { exact: true });
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
test(`Renders with class ${styles.modifiers.noBackground} when colorVariant="no-background"`, () => {
|
|
16
|
+
test(`Renders with class ${styles.modifiers.noBackground} when deprecated colorVariant="no-background" is used`, () => {
|
|
17
17
|
render(
|
|
18
18
|
<Drawer isExpanded>
|
|
19
19
|
<DrawerPanelContent colorVariant="no-background">Drawer panel content</DrawerPanelContent>
|
|
@@ -188,3 +188,33 @@ test(`Renders with class 'pf-m-no-glass' when hasNoGlass is true`, () => {
|
|
|
188
188
|
|
|
189
189
|
expect(screen.getByText('Drawer panel content')).toHaveClass('pf-m-no-glass');
|
|
190
190
|
});
|
|
191
|
+
|
|
192
|
+
test(`Renders with class ${styles.modifiers.glass} when isGlass is true`, () => {
|
|
193
|
+
render(
|
|
194
|
+
<Drawer isExpanded>
|
|
195
|
+
<DrawerPanelContent isGlass>Drawer panel content</DrawerPanelContent>
|
|
196
|
+
</Drawer>
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
expect(screen.getByText('Drawer panel content')).toHaveClass(styles.modifiers.glass);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
test(`Renders with class ${styles.modifiers.plain} when isPlain is true`, () => {
|
|
203
|
+
render(
|
|
204
|
+
<Drawer isExpanded>
|
|
205
|
+
<DrawerPanelContent isPlain>Drawer panel content</DrawerPanelContent>
|
|
206
|
+
</Drawer>
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
expect(screen.getByText('Drawer panel content')).toHaveClass(styles.modifiers.plain);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
test(`Renders with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is true`, () => {
|
|
213
|
+
render(
|
|
214
|
+
<Drawer isExpanded>
|
|
215
|
+
<DrawerPanelContent isNoPlainOnGlass>Drawer panel content</DrawerPanelContent>
|
|
216
|
+
</Drawer>
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
expect(screen.getByText('Drawer panel content')).toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
220
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { DrawerColorVariant } from '../Drawer';
|
|
3
|
+
import { DrawerSection } from '../DrawerSection';
|
|
4
|
+
import styles from '@patternfly/react-styles/css/components/Drawer/drawer';
|
|
5
|
+
|
|
6
|
+
test(`Renders with only class ${styles.drawerSection} by default`, () => {
|
|
7
|
+
render(<DrawerSection>Section content</DrawerSection>);
|
|
8
|
+
|
|
9
|
+
expect(screen.getByText('Section content')).toHaveClass(styles.drawerSection, { exact: true });
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
test(`Applies ${styles.drawerSection} and ${styles.modifiers.plain} when isPlain is true`, () => {
|
|
13
|
+
render(<DrawerSection isPlain>Section content</DrawerSection>);
|
|
14
|
+
|
|
15
|
+
const section = screen.getByText('Section content');
|
|
16
|
+
expect(section).toHaveClass(styles.drawerSection);
|
|
17
|
+
expect(section).toHaveClass(styles.modifiers.plain);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test(`Does not apply ${styles.modifiers.plain} when isPlain is false`, () => {
|
|
21
|
+
render(<DrawerSection isPlain={false}>Section content</DrawerSection>);
|
|
22
|
+
|
|
23
|
+
expect(screen.getByText('Section content')).not.toHaveClass(styles.modifiers.plain);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test(`Applies plain and secondary modifiers together when isPlain and colorVariant are set`, () => {
|
|
27
|
+
render(
|
|
28
|
+
<DrawerSection isPlain colorVariant={DrawerColorVariant.secondary}>
|
|
29
|
+
Section content
|
|
30
|
+
</DrawerSection>
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const section = screen.getByText('Section content');
|
|
34
|
+
expect(section).toHaveClass(styles.drawerSection);
|
|
35
|
+
expect(section).toHaveClass(styles.modifiers.plain);
|
|
36
|
+
expect(section).toHaveClass(styles.modifiers.secondary);
|
|
37
|
+
});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Icon } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const BodyIconSizes: React.FunctionComponent = () => (
|
|
6
6
|
<Fragment>
|
|
7
7
|
<Icon size="bodySm">
|
|
8
|
-
<
|
|
8
|
+
<RhUiAddCircleFillIcon />
|
|
9
9
|
</Icon>{' '}
|
|
10
10
|
<Icon size="bodyDefault">
|
|
11
|
-
<
|
|
11
|
+
<RhUiAddCircleFillIcon />
|
|
12
12
|
</Icon>{' '}
|
|
13
13
|
<Icon size="bodyLg">
|
|
14
|
-
<
|
|
14
|
+
<RhUiAddCircleFillIcon />
|
|
15
15
|
</Icon>
|
|
16
16
|
</Fragment>
|
|
17
17
|
);
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Icon } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const HeadingIconSizes: React.FunctionComponent = () => (
|
|
6
6
|
<Fragment>
|
|
7
7
|
<Icon size="headingSm">
|
|
8
|
-
<
|
|
8
|
+
<RhUiAddCircleFillIcon />
|
|
9
9
|
</Icon>{' '}
|
|
10
10
|
<Icon size="headingMd">
|
|
11
|
-
<
|
|
11
|
+
<RhUiAddCircleFillIcon />
|
|
12
12
|
</Icon>{' '}
|
|
13
13
|
<Icon size="headingLg">
|
|
14
|
-
<
|
|
14
|
+
<RhUiAddCircleFillIcon />
|
|
15
15
|
</Icon>{' '}
|
|
16
16
|
<Icon size="headingXl">
|
|
17
|
-
<
|
|
17
|
+
<RhUiAddCircleFillIcon />
|
|
18
18
|
</Icon>{' '}
|
|
19
19
|
<Icon size="heading_2xl">
|
|
20
|
-
<
|
|
20
|
+
<RhUiAddCircleFillIcon />
|
|
21
21
|
</Icon>{' '}
|
|
22
22
|
<Icon size="heading_3xl">
|
|
23
|
-
<
|
|
23
|
+
<RhUiAddCircleFillIcon />
|
|
24
24
|
</Icon>
|
|
25
25
|
</Fragment>
|
|
26
26
|
);
|
|
@@ -10,7 +10,7 @@ import LongArrowAltDownIcon from '@patternfly/react-icons/dist/esm/icons/long-ar
|
|
|
10
10
|
import RhMicronsCaretRightIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-right-icon';
|
|
11
11
|
import RhMicronsCaretDownIcon from '@patternfly/react-icons/dist/esm/icons/rh-microns-caret-down-icon';
|
|
12
12
|
import RhUiSettingsFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-settings-fill-icon';
|
|
13
|
-
import
|
|
13
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
14
14
|
import RhUiErrorFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-error-fill-icon';
|
|
15
15
|
import RhUiWarningFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-warning-fill-icon';
|
|
16
16
|
import RhUiCheckCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-fill-icon';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Icon } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const IconContentSizes: React.FunctionComponent = () => (
|
|
6
6
|
<Fragment>
|
|
7
7
|
<Icon size="3xl" iconSize="lg">
|
|
8
|
-
<
|
|
8
|
+
<RhUiAddCircleFillIcon />
|
|
9
9
|
</Icon>{' '}
|
|
10
10
|
<Icon size="3xl" iconSize="xl">
|
|
11
|
-
<
|
|
11
|
+
<RhUiAddCircleFillIcon />
|
|
12
12
|
</Icon>{' '}
|
|
13
13
|
<Icon size="3xl" iconSize="2xl">
|
|
14
|
-
<
|
|
14
|
+
<RhUiAddCircleFillIcon />
|
|
15
15
|
</Icon>{' '}
|
|
16
16
|
<Icon size="3xl">
|
|
17
|
-
<
|
|
17
|
+
<RhUiAddCircleFillIcon />
|
|
18
18
|
</Icon>
|
|
19
19
|
</Fragment>
|
|
20
20
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Icon, Content } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const IconInline: React.FunctionComponent = () => (
|
|
6
6
|
<Fragment>
|
|
@@ -8,25 +8,25 @@ export const IconInline: React.FunctionComponent = () => (
|
|
|
8
8
|
<h1>
|
|
9
9
|
Heading
|
|
10
10
|
<Icon isInline>
|
|
11
|
-
<
|
|
11
|
+
<RhUiAddCircleFillIcon />
|
|
12
12
|
</Icon>
|
|
13
13
|
</h1>
|
|
14
14
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit Sed hendrerit nisi in cursus maximus.</p>
|
|
15
15
|
<h2>
|
|
16
16
|
Second level
|
|
17
17
|
<Icon isInline>
|
|
18
|
-
<
|
|
18
|
+
<RhUiAddCircleFillIcon />
|
|
19
19
|
</Icon>
|
|
20
20
|
</h2>
|
|
21
21
|
<p>
|
|
22
22
|
<Icon isInline>
|
|
23
|
-
<
|
|
23
|
+
<RhUiAddCircleFillIcon />
|
|
24
24
|
</Icon>
|
|
25
25
|
Curabitur accumsan turpis pharetra
|
|
26
26
|
<strong>
|
|
27
27
|
augue tincidunt
|
|
28
28
|
<Icon isInline>
|
|
29
|
-
<
|
|
29
|
+
<RhUiAddCircleFillIcon />
|
|
30
30
|
</Icon>
|
|
31
31
|
</strong>
|
|
32
32
|
blandit. Quisque condimentum maximus mi, sit amet commodo arcu rutrum id. Proin pretium urna vel cursus
|
|
@@ -35,24 +35,24 @@ export const IconInline: React.FunctionComponent = () => (
|
|
|
35
35
|
<small>
|
|
36
36
|
Sometimes you need small text
|
|
37
37
|
<Icon isInline>
|
|
38
|
-
<
|
|
38
|
+
<RhUiAddCircleFillIcon />
|
|
39
39
|
</Icon>
|
|
40
40
|
</small>
|
|
41
41
|
Inline with size specified:
|
|
42
42
|
<Icon size="sm" isInline>
|
|
43
|
-
<
|
|
43
|
+
<RhUiAddCircleFillIcon />
|
|
44
44
|
</Icon>
|
|
45
45
|
small,
|
|
46
46
|
<Icon size="md" isInline>
|
|
47
|
-
<
|
|
47
|
+
<RhUiAddCircleFillIcon />
|
|
48
48
|
</Icon>
|
|
49
49
|
medium,
|
|
50
50
|
<Icon size="lg" isInline>
|
|
51
|
-
<
|
|
51
|
+
<RhUiAddCircleFillIcon />
|
|
52
52
|
</Icon>
|
|
53
53
|
large,
|
|
54
54
|
<Icon size="xl" isInline>
|
|
55
|
-
<
|
|
55
|
+
<RhUiAddCircleFillIcon />
|
|
56
56
|
</Icon>
|
|
57
57
|
extra large
|
|
58
58
|
</Content>
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { Icon } from '@patternfly/react-core';
|
|
3
|
-
import
|
|
3
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
4
4
|
|
|
5
5
|
export const StandaloneIconSizes: React.FunctionComponent = () => (
|
|
6
6
|
<Fragment>
|
|
7
7
|
<Icon size="sm">
|
|
8
|
-
<
|
|
8
|
+
<RhUiAddCircleFillIcon />
|
|
9
9
|
</Icon>{' '}
|
|
10
10
|
<Icon size="md">
|
|
11
|
-
<
|
|
11
|
+
<RhUiAddCircleFillIcon />
|
|
12
12
|
</Icon>{' '}
|
|
13
13
|
<Icon size="lg">
|
|
14
|
-
<
|
|
14
|
+
<RhUiAddCircleFillIcon />
|
|
15
15
|
</Icon>{' '}
|
|
16
16
|
<Icon size="xl">
|
|
17
|
-
<
|
|
17
|
+
<RhUiAddCircleFillIcon />
|
|
18
18
|
</Icon>{' '}
|
|
19
19
|
<Icon size="2xl">
|
|
20
|
-
<
|
|
20
|
+
<RhUiAddCircleFillIcon />
|
|
21
21
|
</Icon>{' '}
|
|
22
22
|
<Icon size="3xl">
|
|
23
|
-
<
|
|
23
|
+
<RhUiAddCircleFillIcon />
|
|
24
24
|
</Icon>
|
|
25
25
|
</Fragment>
|
|
26
26
|
);
|
|
@@ -5,7 +5,7 @@ section: patterns
|
|
|
5
5
|
|
|
6
6
|
import { Fragment, useState } from 'react';
|
|
7
7
|
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
|
|
8
|
-
import
|
|
8
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
9
9
|
import pfIcon from '../assets/pf-logo-small.svg';
|
|
10
10
|
import activeMQIcon from '../assets/activemq-core_200x150.png';
|
|
11
11
|
import avroIcon from '../assets/camel-avro_200x150.png';
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
MenuToggleElement
|
|
36
36
|
} from '@patternfly/react-core';
|
|
37
37
|
import TrashIcon from '@patternfly/react-icons/dist/esm/icons/trash-icon';
|
|
38
|
-
import
|
|
38
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
39
39
|
import pfIcon from './assets/pf-logo-small.svg';
|
|
40
40
|
import activeMQIcon from './assets/activemq-core_200x150.png';
|
|
41
41
|
import avroIcon from './assets/camel-avro_200x150.png';
|
|
@@ -481,7 +481,7 @@ export const CardViewBasic: React.FunctionComponent = () => {
|
|
|
481
481
|
<EmptyState
|
|
482
482
|
headingLevel="h2"
|
|
483
483
|
titleText="Add a new card to your page"
|
|
484
|
-
icon={
|
|
484
|
+
icon={RhUiAddCircleFillIcon}
|
|
485
485
|
variant={EmptyStateVariant.xs}
|
|
486
486
|
>
|
|
487
487
|
<EmptyStateFooter>
|
|
@@ -5,7 +5,7 @@ section: components
|
|
|
5
5
|
|
|
6
6
|
import { useRef, useState } from 'react';
|
|
7
7
|
import RhUiCheckCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-check-circle-fill-icon';
|
|
8
|
-
import
|
|
8
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
9
9
|
import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper';
|
|
10
10
|
|
|
11
11
|
## Demos
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
Title
|
|
19
19
|
} from '@patternfly/react-core';
|
|
20
20
|
import { DashboardWrapper } from '@patternfly/react-core/dist/js/demos/DashboardWrapper';
|
|
21
|
-
import
|
|
21
|
+
import RhUiAddCircleFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-add-circle-fill-icon';
|
|
22
22
|
|
|
23
23
|
export const DescriptionListInDrawer: React.FunctionComponent = () => {
|
|
24
24
|
const drawerRef = useRef<HTMLDivElement>(null);
|
|
@@ -89,7 +89,7 @@ export const DescriptionListInDrawer: React.FunctionComponent = () => {
|
|
|
89
89
|
<DescriptionListGroup>
|
|
90
90
|
<DescriptionListTerm>Pod selector</DescriptionListTerm>
|
|
91
91
|
<DescriptionListDescription>
|
|
92
|
-
<Button variant="link" isInline icon={<
|
|
92
|
+
<Button variant="link" isInline icon={<RhUiAddCircleFillIcon />}>
|
|
93
93
|
app=MyApp
|
|
94
94
|
</Button>
|
|
95
95
|
</DescriptionListDescription>
|
|
@@ -178,7 +178,7 @@ export const PrimaryDetailContentPadding: React.FunctionComponent = () => {
|
|
|
178
178
|
);
|
|
179
179
|
|
|
180
180
|
const panelContent = (
|
|
181
|
-
<DrawerPanelContent>
|
|
181
|
+
<DrawerPanelContent isPlain>
|
|
182
182
|
<DrawerHead>
|
|
183
183
|
<Title headingLevel="h2" size="xl">
|
|
184
184
|
node-{drawerPanelBodyContent}
|
|
@@ -429,7 +429,7 @@ export const PrimaryDetailContentPadding: React.FunctionComponent = () => {
|
|
|
429
429
|
<Divider component="div" />
|
|
430
430
|
<PageSection padding={{ default: 'noPadding' }} aria-label="Drawer content section">
|
|
431
431
|
<Drawer isExpanded={isDrawerExpanded}>
|
|
432
|
-
<DrawerContent panelContent={panelContent}
|
|
432
|
+
<DrawerContent panelContent={panelContent}>
|
|
433
433
|
<DrawerContentBody hasPadding>{drawerContent}</DrawerContentBody>
|
|
434
434
|
</DrawerContent>
|
|
435
435
|
</Drawer>
|