@patternfly/react-core 5.0.0-alpha.17 → 5.0.0-alpha.18
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 +8 -0
- package/components/ApplicationLauncher/ApplicationLauncher.d.ts +2 -2
- package/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/components/ApplicationLauncher/ApplicationLauncher.js +1 -1
- package/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/components/ApplicationLauncher/ApplicationLauncherContext.d.ts +1 -1
- package/components/ApplicationLauncher/ApplicationLauncherContext.d.ts.map +1 -1
- package/components/ApplicationLauncher/ApplicationLauncherContext.js +1 -1
- package/components/ApplicationLauncher/ApplicationLauncherContext.js.map +1 -1
- package/components/ApplicationLauncher/ApplicationLauncherItem.js +2 -2
- package/components/ApplicationLauncher/ApplicationLauncherItem.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/components/Checkbox/Checkbox.js +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/ClipboardCopy/ClipboardCopy.d.ts +2 -2
- package/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/components/ClipboardCopy/ClipboardCopy.js +4 -4
- package/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/components/ClipboardCopy/ClipboardCopyExpanded.d.ts +1 -1
- package/components/ClipboardCopy/ClipboardCopyExpanded.d.ts.map +1 -1
- package/components/ClipboardCopy/ClipboardCopyExpanded.js +1 -1
- package/components/ClipboardCopy/ClipboardCopyExpanded.js.map +1 -1
- package/components/LoginPage/LoginForm.js +1 -1
- package/components/LoginPage/LoginForm.js.map +1 -1
- package/components/Menu/MenuItem.js +1 -1
- package/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.d.ts +2 -2
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.js +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherContext.d.ts +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherContext.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherContext.js +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherContext.js.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.js +2 -2
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncherItem.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/esm/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +4 -4
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.d.ts +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.js +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.js.map +1 -1
- package/dist/esm/components/LoginPage/LoginForm.js +1 -1
- package/dist/esm/components/LoginPage/LoginForm.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +1 -1
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts +2 -2
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.js +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherContext.d.ts +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherContext.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherContext.js +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherContext.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.js +2 -2
- package/dist/js/components/ApplicationLauncher/ApplicationLauncherItem.js.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/js/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/js/components/Checkbox/Checkbox.js +1 -1
- package/dist/js/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +4 -4
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.d.ts +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.js +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.js.map +1 -1
- package/dist/js/components/LoginPage/LoginForm.js +1 -1
- package/dist/js/components/LoginPage/LoginForm.js.map +1 -1
- package/dist/js/components/Menu/MenuItem.js +1 -1
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/Accordion/examples/AccordionBordered.tsx +1 -1
- package/src/components/ApplicationLauncher/ApplicationLauncher.tsx +3 -3
- package/src/components/ApplicationLauncher/ApplicationLauncherContext.ts +1 -1
- package/src/components/ApplicationLauncher/ApplicationLauncherItem.tsx +2 -2
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherFavoritesAndSearch.tsx +2 -2
- package/src/components/Card/examples/CardExpandable.tsx +1 -1
- package/src/components/Card/examples/CardExpandableWithIcon.tsx +1 -1
- package/src/components/Card/examples/CardHeaderInCardHead.tsx +1 -1
- package/src/components/Card/examples/CardOnlyActionsInCardHead.tsx +1 -1
- package/src/components/Card/examples/CardWithImageAndActions.tsx +2 -2
- package/src/components/Card/examples/CardWithModifiers.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +2 -2
- package/src/components/Checkbox/examples/CheckboxControlled.tsx +1 -1
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +5 -5
- package/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx +2 -2
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySize.tsx +1 -1
- package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx +1 -1
- package/src/components/Drawer/examples/DrawerLightGray.tsx +3 -3
- package/src/components/FileUpload/examples/FileUploadCustomUpload.tsx +1 -1
- package/src/components/Icon/examples/IconCustomProgress.tsx +1 -1
- package/src/components/Icon/examples/IconProgress.tsx +1 -1
- package/src/components/LoginPage/LoginForm.tsx +1 -1
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/Menu/examples/MenuBasic.tsx +1 -1
- package/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx +1 -1
- package/src/components/Popover/examples/PopoverAdvanced.tsx +2 -2
- package/src/components/ProgressStepper/examples/ProgressStepperBasicWithAlignment.tsx +2 -2
- package/src/components/ProgressStepper/examples/ProgressStepperCompact.tsx +2 -2
- package/src/components/SearchInput/examples/SearchInputAdvanced.tsx +2 -2
- package/src/components/Select/examples/Select.md +18 -18
- package/src/components/Slider/examples/SliderContinuous.tsx +1 -1
- package/src/components/Tabs/examples/TabsBoxLight.tsx +1 -1
- package/src/components/Tabs/examples/TabsDefault.tsx +1 -1
- package/src/components/Tabs/examples/TabsDefaultOverflow.tsx +1 -1
- package/src/components/Tabs/examples/TabsFilled.tsx +1 -1
- package/src/components/Tabs/examples/TabsFilledWithIcons.tsx +1 -1
- package/src/components/Tabs/examples/TabsInset.tsx +1 -1
- package/src/components/Tabs/examples/TabsPageInsets.tsx +1 -1
- package/src/components/Tabs/examples/TabsSubtabs.tsx +1 -1
- package/src/components/Tabs/examples/TabsTooltipReactRef.tsx +1 -1
- package/src/components/Tabs/examples/TabsVertical.tsx +1 -1
- package/src/components/TextArea/examples/TextAreaReadOnly.tsx +1 -1
- package/src/components/TextInput/examples/TextInputReadOnly.tsx +1 -1
- package/src/components/Toolbar/examples/ToolbarSticky.tsx +2 -2
- package/src/components/Tooltip/examples/TooltipOptions.tsx +7 -7
- package/src/demos/CardDemos.md +1 -1
- package/src/demos/Toolbar.md +2 -2
- package/src/next/components/Wizard/examples/WizardStepErrorStatus.tsx +1 -1
- package/src/next/components/Wizard/examples/WizardToggleStepVisibility.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.18",
|
|
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",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"react": "^16.8 || ^17 || ^18",
|
|
71
71
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "9235609a8831e00cbe785e6a88ae42f587837f49"
|
|
74
74
|
}
|
|
@@ -123,7 +123,7 @@ export const AccordionBordered: React.FunctionComponent = () => {
|
|
|
123
123
|
<Checkbox
|
|
124
124
|
label="Display size large"
|
|
125
125
|
isChecked={isDisplayLarge}
|
|
126
|
-
onChange={setIsDisplayLarge}
|
|
126
|
+
onChange={(_event, checked) => setIsDisplayLarge(checked)}
|
|
127
127
|
aria-label="show display large variation checkbox"
|
|
128
128
|
id="toggle-display-lg"
|
|
129
129
|
name="toggle-display-lg"
|
|
@@ -48,9 +48,9 @@ export interface ApplicationLauncherProps extends React.HTMLProps<HTMLDivElement
|
|
|
48
48
|
/** ID list of favorited ApplicationLauncherItems */
|
|
49
49
|
favorites?: string[];
|
|
50
50
|
/** Enables favorites. Callback called when an ApplicationLauncherItem's favorite button is clicked */
|
|
51
|
-
onFavorite?: (itemId: string, isFavorite: boolean) => void;
|
|
51
|
+
onFavorite?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, itemId: string, isFavorite: boolean) => void;
|
|
52
52
|
/** Enables search. Callback called when text input is entered into search box */
|
|
53
|
-
onSearch?: (textInput: string) => void;
|
|
53
|
+
onSearch?: (event: React.FormEvent<HTMLInputElement>, textInput: string) => void;
|
|
54
54
|
/** Placeholder text for search input */
|
|
55
55
|
searchPlaceholderText?: string;
|
|
56
56
|
/** Text for search input when no results are found */
|
|
@@ -97,7 +97,7 @@ export class ApplicationLauncher extends React.Component<ApplicationLauncherProp
|
|
|
97
97
|
customChild={
|
|
98
98
|
<SearchInput
|
|
99
99
|
placeholder={searchPlaceholderText}
|
|
100
|
-
onChange={
|
|
100
|
+
onChange={onSearch}
|
|
101
101
|
{...searchProps}
|
|
102
102
|
/>
|
|
103
103
|
}
|
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
export const ApplicationLauncherContext = React.createContext({
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5
|
-
onFavorite: (itemId: string, isFavorite: boolean) => {}
|
|
5
|
+
onFavorite: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>, itemId: string, isFavorite: boolean) => {}
|
|
6
6
|
});
|
|
@@ -75,8 +75,8 @@ export const ApplicationLauncherItem: React.FunctionComponent<ApplicationLaunche
|
|
|
75
75
|
<button
|
|
76
76
|
className={css(styles.appLauncherMenuItem, styles.modifiers.action)}
|
|
77
77
|
aria-label={isFavorite ? ariaIsFavoriteLabel : ariaIsNotFavoriteLabel}
|
|
78
|
-
onClick={() => {
|
|
79
|
-
onFavorite((id || getUniqueId('app-launcher-option')).replace('favorite-', ''), isFavorite);
|
|
78
|
+
onClick={(event) => {
|
|
79
|
+
onFavorite(event, (id || getUniqueId('app-launcher-option')).replace('favorite-', ''), isFavorite);
|
|
80
80
|
}}
|
|
81
81
|
>
|
|
82
82
|
<StarIcon />
|
package/src/components/ApplicationLauncher/examples/ApplicationLauncherFavoritesAndSearch.tsx
CHANGED
|
@@ -45,7 +45,7 @@ export const ApplicationLauncherFavoritesAndSearch: React.FunctionComponent = ()
|
|
|
45
45
|
setFilteredItems(null);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const onFavorite = (itemId: string, isFavorite: boolean) => {
|
|
48
|
+
const onFavorite = (_event: React.MouseEvent<HTMLButtonElement, MouseEvent>, itemId: string, isFavorite: boolean) => {
|
|
49
49
|
let updatedFavorites: string[] = [...favorites, itemId];
|
|
50
50
|
|
|
51
51
|
if (isFavorite) {
|
|
@@ -55,7 +55,7 @@ export const ApplicationLauncherFavoritesAndSearch: React.FunctionComponent = ()
|
|
|
55
55
|
setFavorites(updatedFavorites);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const onSearch = (textInput: string) => {
|
|
58
|
+
const onSearch = (_event: React.FormEvent<HTMLInputElement>, textInput: string) => {
|
|
59
59
|
if (textInput === '') {
|
|
60
60
|
setFilteredItems(null);
|
|
61
61
|
} else {
|
|
@@ -54,7 +54,7 @@ export const CardOnlyActionsInCardHead: React.FunctionComponent = () => {
|
|
|
54
54
|
/>
|
|
55
55
|
<Checkbox
|
|
56
56
|
isChecked={isChecked}
|
|
57
|
-
onChange={onClick}
|
|
57
|
+
onChange={(_event, checked) => onClick(checked)}
|
|
58
58
|
aria-label="card checkbox example"
|
|
59
59
|
id="check-3"
|
|
60
60
|
name="check3"
|
|
@@ -67,7 +67,7 @@ export const CardWithImageAndActions: React.FunctionComponent = () => {
|
|
|
67
67
|
/>
|
|
68
68
|
<Checkbox
|
|
69
69
|
isChecked={isChecked}
|
|
70
|
-
onChange={onClick}
|
|
70
|
+
onChange={(_event, checked) => onClick(checked)}
|
|
71
71
|
aria-label="card checkbox example"
|
|
72
72
|
id="check-1"
|
|
73
73
|
name="check1"
|
|
@@ -82,7 +82,7 @@ export const CardWithImageAndActions: React.FunctionComponent = () => {
|
|
|
82
82
|
<Checkbox
|
|
83
83
|
label="actions hasNoOffset"
|
|
84
84
|
isChecked={hasNoOffset}
|
|
85
|
-
onChange={toggleOffset}
|
|
85
|
+
onChange={(_event, checked) => toggleOffset(checked)}
|
|
86
86
|
aria-label="remove actions offset"
|
|
87
87
|
id="toggle-actions-offset"
|
|
88
88
|
name="toggle-actions-offset"
|
|
@@ -20,7 +20,7 @@ export interface CheckboxProps
|
|
|
20
20
|
isChecked?: boolean | null;
|
|
21
21
|
checked?: boolean;
|
|
22
22
|
/** A callback for when the checkbox selection changes. */
|
|
23
|
-
onChange?: (
|
|
23
|
+
onChange?: (event: React.FormEvent<HTMLInputElement>, checked: boolean) => void;
|
|
24
24
|
/** Label text of the checkbox. */
|
|
25
25
|
label?: React.ReactNode;
|
|
26
26
|
/** Id of the checkbox. */
|
|
@@ -67,7 +67,7 @@ export class Checkbox extends React.Component<CheckboxProps, CheckboxState> {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
private handleChange = (event: React.FormEvent<HTMLInputElement>): void => {
|
|
70
|
-
this.props.onChange(event.currentTarget.checked
|
|
70
|
+
this.props.onChange(event, event.currentTarget.checked);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
render() {
|
|
@@ -7,7 +7,7 @@ export const CheckboxControlled: React.FunctionComponent = () => {
|
|
|
7
7
|
const [isChecked3, setIsChecked3] = React.useState<boolean>(false);
|
|
8
8
|
const [isChecked4, setIsChecked4] = React.useState<boolean>(false);
|
|
9
9
|
|
|
10
|
-
const handleChange = (
|
|
10
|
+
const handleChange = (event: React.FormEvent<HTMLInputElement>, checked: boolean) => {
|
|
11
11
|
const target = event.currentTarget;
|
|
12
12
|
const name = target.name;
|
|
13
13
|
|
|
@@ -72,7 +72,7 @@ export interface ClipboardCopyProps extends Omit<React.HTMLProps<HTMLDivElement>
|
|
|
72
72
|
/** A function that is triggered on clicking the copy button. */
|
|
73
73
|
onCopy?: (event: React.ClipboardEvent<HTMLDivElement>, text?: React.ReactNode) => void;
|
|
74
74
|
/** A function that is triggered on changing the text. */
|
|
75
|
-
onChange?: (text?: string | number) => void;
|
|
75
|
+
onChange?: (event: React.FormEvent, text?: string | number) => void;
|
|
76
76
|
/** The text which is copied. */
|
|
77
77
|
children: React.ReactNode;
|
|
78
78
|
/** Additional actions for inline clipboard copy. Should be wrapped with ClipboardCopyAction. */
|
|
@@ -119,7 +119,7 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
|
|
|
119
119
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
120
120
|
componentDidUpdate = (prevProps: ClipboardCopyProps, prevState: ClipboardCopyState) => {
|
|
121
121
|
if (prevProps.children !== this.props.children) {
|
|
122
|
-
this.
|
|
122
|
+
this.setState({ text: this.props.children as string | number });
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
125
|
|
|
@@ -136,9 +136,9 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
|
|
|
136
136
|
}));
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
updateText = (text: string | number) => {
|
|
139
|
+
updateText = (text: string | number, event: React.FormEvent) => {
|
|
140
140
|
this.setState({ text });
|
|
141
|
-
this.props.onChange(text);
|
|
141
|
+
this.props.onChange(event, text);
|
|
142
142
|
};
|
|
143
143
|
|
|
144
144
|
render = () => {
|
|
@@ -265,7 +265,7 @@ export class ClipboardCopy extends React.Component<ClipboardCopyProps, Clipboard
|
|
|
265
265
|
isReadOnly={isReadOnly}
|
|
266
266
|
isCode={isCode}
|
|
267
267
|
id={`content-${id}`}
|
|
268
|
-
onChange={this.updateText}
|
|
268
|
+
onChange={(event, text) => this.updateText(text, event)}
|
|
269
269
|
>
|
|
270
270
|
{this.state.text}
|
|
271
271
|
</ClipboardCopyExpanded>
|
|
@@ -7,7 +7,7 @@ import { PickOptional } from '../../helpers/typeUtils';
|
|
|
7
7
|
export interface ClipboardCopyExpandedProps extends Omit<ClipboardCopyProps, 'onChange'> {
|
|
8
8
|
className?: string;
|
|
9
9
|
children: React.ReactNode;
|
|
10
|
-
onChange?: (
|
|
10
|
+
onChange?: (e: React.FormEvent<HTMLDivElement>, text: string) => void;
|
|
11
11
|
isReadOnly?: boolean;
|
|
12
12
|
isCode?: boolean;
|
|
13
13
|
}
|
|
@@ -32,7 +32,7 @@ export class ClipboardCopyExpanded extends React.Component<ClipboardCopyExpanded
|
|
|
32
32
|
<div
|
|
33
33
|
suppressContentEditableWarning
|
|
34
34
|
className={css(styles.clipboardCopyExpandableContent, className)}
|
|
35
|
-
onInput={(e: any) => onChange(e.target.innerText
|
|
35
|
+
onInput={(e: any) => onChange(e, e.target.innerText)}
|
|
36
36
|
contentEditable={!isReadOnly}
|
|
37
37
|
{...props}
|
|
38
38
|
>
|
|
@@ -23,7 +23,7 @@ export const DescriptionListWithCard: React.FunctionComponent = () => {
|
|
|
23
23
|
<Checkbox
|
|
24
24
|
label="isSelectable"
|
|
25
25
|
isChecked={isChecked}
|
|
26
|
-
onChange={toggleSelectable}
|
|
26
|
+
onChange={(_event, checked) => toggleSelectable(checked)}
|
|
27
27
|
aria-label="set isSelectable"
|
|
28
28
|
id="toggle-isSelectable"
|
|
29
29
|
name="toggle-isSelectable"
|
|
@@ -24,7 +24,7 @@ export const DescriptionListWithLargeDisplaySize: React.FunctionComponent = () =
|
|
|
24
24
|
<Checkbox
|
|
25
25
|
label="displaySize 2xl"
|
|
26
26
|
isChecked={isChecked}
|
|
27
|
-
onChange={toggleDisplaySize}
|
|
27
|
+
onChange={(_event, checked) => toggleDisplaySize(checked)}
|
|
28
28
|
aria-label="set display size 2xl"
|
|
29
29
|
id="toggle-display-size"
|
|
30
30
|
name="toggle-display-size"
|
package/src/components/DescriptionList/examples/DescriptionListWithLargeDisplaySizeAndCard.tsx
CHANGED
|
@@ -24,7 +24,7 @@ export const DescriptionListWithLargeDisplaySizeAndCard: React.FunctionComponent
|
|
|
24
24
|
<Checkbox
|
|
25
25
|
label="displaySize 2xl"
|
|
26
26
|
isChecked={isChecked}
|
|
27
|
-
onChange={toggleDisplaySize}
|
|
27
|
+
onChange={(_event, checked) => toggleDisplaySize(checked)}
|
|
28
28
|
aria-label="set display size 2xl"
|
|
29
29
|
id="toggle-display-size-with-card"
|
|
30
30
|
name="toggle-display-size-with-card"
|
|
@@ -66,7 +66,7 @@ export const DrawerLightGray: React.FunctionComponent = () => {
|
|
|
66
66
|
<Checkbox
|
|
67
67
|
label="Gray panel"
|
|
68
68
|
isChecked={panelGray}
|
|
69
|
-
onChange={togglePanelGray}
|
|
69
|
+
onChange={(_event, checked) => togglePanelGray(checked)}
|
|
70
70
|
aria-label="Gray panel checkbox"
|
|
71
71
|
id="toggle-gray-panel"
|
|
72
72
|
name="toggle-gray-panel"
|
|
@@ -74,7 +74,7 @@ export const DrawerLightGray: React.FunctionComponent = () => {
|
|
|
74
74
|
<Checkbox
|
|
75
75
|
label="Gray content"
|
|
76
76
|
isChecked={contentGray}
|
|
77
|
-
onChange={toggleContentGray}
|
|
77
|
+
onChange={(_event, checked) => toggleContentGray(checked)}
|
|
78
78
|
aria-label="Gray content checkbox"
|
|
79
79
|
id="toggle-gray-content"
|
|
80
80
|
name="toggle-gray-content"
|
|
@@ -82,7 +82,7 @@ export const DrawerLightGray: React.FunctionComponent = () => {
|
|
|
82
82
|
<Checkbox
|
|
83
83
|
label="Gray section"
|
|
84
84
|
isChecked={sectionGray}
|
|
85
|
-
onChange={toggleSectionGray}
|
|
85
|
+
onChange={(_event, checked) => toggleSectionGray(checked)}
|
|
86
86
|
aria-label="Gray section checkbox"
|
|
87
87
|
id="toggle-gray-section"
|
|
88
88
|
name="toggle-gray-section"
|
|
@@ -89,7 +89,7 @@ export const CustomPreviewFileUpload: React.FunctionComponent = () => {
|
|
|
89
89
|
label={stateKey}
|
|
90
90
|
aria-label={stateKey}
|
|
91
91
|
isChecked={checkedState[index]}
|
|
92
|
-
onChange={checked => handleOnChange(checked, stateKey, index)}
|
|
92
|
+
onChange={(_event, checked) => handleOnChange(checked, stateKey, index)}
|
|
93
93
|
/>
|
|
94
94
|
))}
|
|
95
95
|
<br />
|
|
@@ -10,7 +10,7 @@ export const IconProgress: React.FunctionComponent = () => {
|
|
|
10
10
|
<Checkbox
|
|
11
11
|
label="Toggle in progress state"
|
|
12
12
|
isChecked={isInProgress}
|
|
13
|
-
onChange={checked => setIsInProgress(checked)}
|
|
13
|
+
onChange={(_event, checked) => setIsInProgress(checked)}
|
|
14
14
|
aria-label="Set icon progress state"
|
|
15
15
|
id="toggle-icon-progress-custom"
|
|
16
16
|
name="toggle-icon-progress-custom"
|
|
@@ -10,7 +10,7 @@ export const IconProgress: React.FunctionComponent = () => {
|
|
|
10
10
|
<Checkbox
|
|
11
11
|
label="Toggle in progress state"
|
|
12
12
|
isChecked={isInProgress}
|
|
13
|
-
onChange={checked => setIsInProgress(checked)}
|
|
13
|
+
onChange={(_event, checked) => setIsInProgress(checked)}
|
|
14
14
|
aria-label="Set icon progress state"
|
|
15
15
|
id="toggle-icon-progress"
|
|
16
16
|
name="toggle-icon-progress"
|
|
@@ -142,7 +142,7 @@ export const LoginForm: React.FunctionComponent<LoginFormProps> = ({
|
|
|
142
142
|
id="pf-login-remember-me-id"
|
|
143
143
|
label={rememberMeLabel}
|
|
144
144
|
isChecked={isRememberMeChecked}
|
|
145
|
-
onChange={onChangeRememberMe}
|
|
145
|
+
onChange={(event, checked) => onChangeRememberMe(checked, event)}
|
|
146
146
|
/>
|
|
147
147
|
</FormGroup>
|
|
148
148
|
)}
|
|
@@ -350,7 +350,7 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
|
|
|
350
350
|
id={randomId}
|
|
351
351
|
component="span"
|
|
352
352
|
isChecked={isSelected || false}
|
|
353
|
-
onChange={event => onItemSelect(event, onSelect)}
|
|
353
|
+
onChange={(event) => onItemSelect(event, onSelect)}
|
|
354
354
|
isDisabled={isDisabled}
|
|
355
355
|
/>
|
|
356
356
|
</span>
|
|
@@ -40,7 +40,7 @@ export const MenuBasic: React.FunctionComponent = () => {
|
|
|
40
40
|
<Checkbox
|
|
41
41
|
label="Plain menu"
|
|
42
42
|
isChecked={isPlain}
|
|
43
|
-
onChange={togglePlain}
|
|
43
|
+
onChange={(_event, checked) => togglePlain(checked)}
|
|
44
44
|
aria-label="plain menu checkbox"
|
|
45
45
|
id="toggle-plain"
|
|
46
46
|
name="toggle-plain"
|
|
@@ -264,7 +264,7 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
|
|
|
264
264
|
<Checkbox
|
|
265
265
|
label="Set max menu height"
|
|
266
266
|
isChecked={withMaxMenuHeight}
|
|
267
|
-
onChange={onToggleMaxMenuHeight}
|
|
267
|
+
onChange={(_event, checked) => onToggleMaxMenuHeight(checked)}
|
|
268
268
|
aria-label="Set max menu height checkbox"
|
|
269
269
|
id="toggle-max-menu-height"
|
|
270
270
|
name="toggle-max-menu-height"
|
|
@@ -41,14 +41,14 @@ export const PopoverAdvanced: React.FunctionComponent = () => {
|
|
|
41
41
|
<Checkbox
|
|
42
42
|
label="Flip popover if the position falls outside the view"
|
|
43
43
|
isChecked={keepInViewChecked}
|
|
44
|
-
onChange={handleKeepInViewChange}
|
|
44
|
+
onChange={(_event, checked) => handleKeepInViewChange(checked)}
|
|
45
45
|
aria-label="Keep in view"
|
|
46
46
|
id="popover-advanced-check-1"
|
|
47
47
|
/>
|
|
48
48
|
<Checkbox
|
|
49
49
|
label="Toggle popover from outside"
|
|
50
50
|
isChecked={show}
|
|
51
|
-
onChange={handleProgrammaticChange}
|
|
51
|
+
onChange={(_event, checked) => handleProgrammaticChange(checked)}
|
|
52
52
|
aria-label="Toggle popover from outside"
|
|
53
53
|
id="popover-advanced-check-2"
|
|
54
54
|
/>
|
|
@@ -10,7 +10,7 @@ export const ProgressStepperBasicWithAlignment: React.FunctionComponent = () =>
|
|
|
10
10
|
<Checkbox
|
|
11
11
|
label="Vertical alignment"
|
|
12
12
|
isChecked={isVertical}
|
|
13
|
-
onChange={setIsVertical}
|
|
13
|
+
onChange={(_event, checked) => setIsVertical(checked)}
|
|
14
14
|
aria-label="Toggle vertical alignment"
|
|
15
15
|
id="toggle-vertical"
|
|
16
16
|
name="toggle-vertical"
|
|
@@ -18,7 +18,7 @@ export const ProgressStepperBasicWithAlignment: React.FunctionComponent = () =>
|
|
|
18
18
|
<Checkbox
|
|
19
19
|
label="Center alignment"
|
|
20
20
|
isChecked={isCenterAligned}
|
|
21
|
-
onChange={setIsCenterAligned}
|
|
21
|
+
onChange={(_event, checked) => setIsCenterAligned(checked)}
|
|
22
22
|
aria-label="Toggle center alignment"
|
|
23
23
|
id="toggle-center"
|
|
24
24
|
name="toggle-center"
|
|
@@ -10,7 +10,7 @@ export const ProgressStepperCompact: React.FunctionComponent = () => {
|
|
|
10
10
|
<Checkbox
|
|
11
11
|
label="Vertical alignment"
|
|
12
12
|
isChecked={isVertical}
|
|
13
|
-
onChange={setIsVertical}
|
|
13
|
+
onChange={(_event, checked) => setIsVertical(checked)}
|
|
14
14
|
aria-label="Toggle compact vertical alignment"
|
|
15
15
|
id="toggle-compact-vertical"
|
|
16
16
|
name="toggle-compact-vertical"
|
|
@@ -18,7 +18,7 @@ export const ProgressStepperCompact: React.FunctionComponent = () => {
|
|
|
18
18
|
<Checkbox
|
|
19
19
|
label="Center alignment"
|
|
20
20
|
isChecked={isCenterAligned}
|
|
21
|
-
onChange={setIsCenterAligned}
|
|
21
|
+
onChange={(_event, checked) => setIsCenterAligned(checked)}
|
|
22
22
|
aria-label="Toggle compact center alignment"
|
|
23
23
|
id="toggle-compact-center"
|
|
24
24
|
name="toggle-compact-center"
|
|
@@ -17,7 +17,7 @@ export const SearchInputAdvanced: React.FunctionComponent = () => {
|
|
|
17
17
|
<Checkbox
|
|
18
18
|
label="Use equal sign as search attribute delimiter"
|
|
19
19
|
isChecked={useEqualsAsDelimiter}
|
|
20
|
-
onChange={toggleDelimiter}
|
|
20
|
+
onChange={(_event, checked) => toggleDelimiter(checked)}
|
|
21
21
|
aria-label="change delimiter checkbox"
|
|
22
22
|
id="toggle-delimiter"
|
|
23
23
|
name="toggle-delimiter"
|
|
@@ -25,7 +25,7 @@ export const SearchInputAdvanced: React.FunctionComponent = () => {
|
|
|
25
25
|
<Checkbox
|
|
26
26
|
label="Add custom footer element after the attributes in the menu"
|
|
27
27
|
isChecked={useCustomFooter}
|
|
28
|
-
onChange={
|
|
28
|
+
onChange={(_event, checked) => setUseCustomFooter(checked)}
|
|
29
29
|
aria-label="change use custom footer checkbox"
|
|
30
30
|
id="toggle-custom-footer"
|
|
31
31
|
name="toggle-custom-footer"
|
|
@@ -117,7 +117,7 @@ class SingleSelectInput extends React.Component {
|
|
|
117
117
|
<Checkbox
|
|
118
118
|
label="isDisabled"
|
|
119
119
|
isChecked={this.state.isDisabled}
|
|
120
|
-
onChange={this.toggleDisabled}
|
|
120
|
+
onChange={(_event, checked) => this.toggleDisabled(checked)}
|
|
121
121
|
aria-label="disabled checkbox"
|
|
122
122
|
id="toggle-disabled"
|
|
123
123
|
name="toggle-disabled"
|
|
@@ -133,7 +133,7 @@ class SingleSelectInput extends React.Component {
|
|
|
133
133
|
<Checkbox
|
|
134
134
|
label="Show icon"
|
|
135
135
|
isChecked={isToggleIcon}
|
|
136
|
-
onChange={this.setIcon}
|
|
136
|
+
onChange={(_event, checked) => this.setIcon(checked)}
|
|
137
137
|
aria-label="show icon checkbox"
|
|
138
138
|
id="toggle-icon"
|
|
139
139
|
name="toggle-icon"
|
|
@@ -843,7 +843,7 @@ class FilteringSingleSelectInput extends React.Component {
|
|
|
843
843
|
<Checkbox
|
|
844
844
|
label="isInputValuePersisted"
|
|
845
845
|
isChecked={isInputValuePersisted}
|
|
846
|
-
onChange={this.toggleInputValuePersisted}
|
|
846
|
+
onChange={(_event, checked) => this.toggleInputValuePersisted(checked)}
|
|
847
847
|
aria-label="toggle input value persisted"
|
|
848
848
|
id="toggle-inline-filter-input-value-persisted"
|
|
849
849
|
name="toggle-inline-filter-input-value-persisted"
|
|
@@ -851,7 +851,7 @@ class FilteringSingleSelectInput extends React.Component {
|
|
|
851
851
|
<Checkbox
|
|
852
852
|
label="isInputFilterPersisted"
|
|
853
853
|
isChecked={isInputFilterPersisted}
|
|
854
|
-
onChange={this.toggleInputFilterPersisted}
|
|
854
|
+
onChange={(_event, checked) => this.toggleInputFilterPersisted(checked)}
|
|
855
855
|
aria-label="toggle input filter persisted"
|
|
856
856
|
id="toggle-inline-filter-input-filter-persisted"
|
|
857
857
|
name="toggle-inline-filter-input-filter-persisted"
|
|
@@ -859,7 +859,7 @@ class FilteringSingleSelectInput extends React.Component {
|
|
|
859
859
|
<Checkbox
|
|
860
860
|
label="isCreatable"
|
|
861
861
|
isChecked={this.state.isCreatable}
|
|
862
|
-
onChange={this.toggleCreatable}
|
|
862
|
+
onChange={(_event, checked) => this.toggleCreatable(checked)}
|
|
863
863
|
aria-label="toggle creatable checkbox"
|
|
864
864
|
id="toggle-inline-filter-creatable-typeahead"
|
|
865
865
|
name="toggle-inline-filter-creatable-typeahead"
|
|
@@ -1359,7 +1359,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1359
1359
|
<Checkbox
|
|
1360
1360
|
label="isDisabled"
|
|
1361
1361
|
isChecked={this.state.isDisabled}
|
|
1362
|
-
onChange={this.toggleDisabled}
|
|
1362
|
+
onChange={(_event, checked) => this.toggleDisabled(checked)}
|
|
1363
1363
|
aria-label="toggle disabled checkbox"
|
|
1364
1364
|
id="toggle-disabled-typeahead"
|
|
1365
1365
|
name="toggle-disabled-typeahead"
|
|
@@ -1367,7 +1367,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1367
1367
|
<Checkbox
|
|
1368
1368
|
label="isCreatable"
|
|
1369
1369
|
isChecked={this.state.isCreatable}
|
|
1370
|
-
onChange={this.toggleCreatable}
|
|
1370
|
+
onChange={(_event, checked) => this.toggleCreatable(checked)}
|
|
1371
1371
|
aria-label="toggle creatable checkbox"
|
|
1372
1372
|
id="toggle-creatable-typeahead"
|
|
1373
1373
|
name="toggle-creatable-typeahead"
|
|
@@ -1375,7 +1375,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1375
1375
|
<Checkbox
|
|
1376
1376
|
label="isCreateOptionOnTop"
|
|
1377
1377
|
isChecked={this.state.isCreateOptionOnTop}
|
|
1378
|
-
onChange={this.toggleCreateOptionOnTop}
|
|
1378
|
+
onChange={(_event, checked) => this.toggleCreateOptionOnTop(checked)}
|
|
1379
1379
|
aria-label="toggle createOptionOnTop checkbox"
|
|
1380
1380
|
id="toggle-create-option-on-top-typeahead"
|
|
1381
1381
|
name="toggle-create-option-on-top-typeahead"
|
|
@@ -1383,7 +1383,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1383
1383
|
<Checkbox
|
|
1384
1384
|
label="onCreateOption"
|
|
1385
1385
|
isChecked={this.state.hasOnCreateOption}
|
|
1386
|
-
onChange={this.toggleCreateNew}
|
|
1386
|
+
onChange={(_event, checked) => this.toggleCreateNew(checked)}
|
|
1387
1387
|
aria-label="toggle new checkbox"
|
|
1388
1388
|
id="toggle-new-typeahead"
|
|
1389
1389
|
name="toggle-new-typeahead"
|
|
@@ -1391,7 +1391,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1391
1391
|
<Checkbox
|
|
1392
1392
|
label="isInputValuePersisted"
|
|
1393
1393
|
isChecked={isInputValuePersisted}
|
|
1394
|
-
onChange={this.toggleInputValuePersisted}
|
|
1394
|
+
onChange={(_event, checked) => this.toggleInputValuePersisted(checked)}
|
|
1395
1395
|
aria-label="toggle input value persisted"
|
|
1396
1396
|
id="toggle-input-value-persisted"
|
|
1397
1397
|
name="toggle-input-value-persisted"
|
|
@@ -1399,7 +1399,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1399
1399
|
<Checkbox
|
|
1400
1400
|
label="isInputFilterPersisted"
|
|
1401
1401
|
isChecked={isInputFilterPersisted}
|
|
1402
|
-
onChange={this.toggleInputFilterPersisted}
|
|
1402
|
+
onChange={(_event, checked) => this.toggleInputFilterPersisted(checked)}
|
|
1403
1403
|
aria-label="toggle input filter persisted"
|
|
1404
1404
|
id="toggle-input-filter-persisted"
|
|
1405
1405
|
name="toggle-input-filter-persisted"
|
|
@@ -1407,7 +1407,7 @@ class TypeaheadSelectInput extends React.Component {
|
|
|
1407
1407
|
<Checkbox
|
|
1408
1408
|
label="shouldResetOnSelect"
|
|
1409
1409
|
isChecked={this.state.resetOnSelect}
|
|
1410
|
-
onChange={this.toggleResetOnSelect}
|
|
1410
|
+
onChange={(_event, checked) => this.toggleResetOnSelect(checked)}
|
|
1411
1411
|
aria-label="toggle reset checkbox"
|
|
1412
1412
|
id="toggle-reset-typeahead"
|
|
1413
1413
|
name="toggle-reset-typeahead"
|
|
@@ -1529,7 +1529,7 @@ class GroupedTypeaheadSelectInput extends React.Component {
|
|
|
1529
1529
|
<Checkbox
|
|
1530
1530
|
label="isCreatable"
|
|
1531
1531
|
isChecked={this.state.isCreatable}
|
|
1532
|
-
onChange={this.toggleCreatable}
|
|
1532
|
+
onChange={(_event, checked) => this.toggleCreatable(checked)}
|
|
1533
1533
|
aria-label="toggle creatable checkbox"
|
|
1534
1534
|
id="toggle-creatable-grouped-typeahead"
|
|
1535
1535
|
name="toggle-creatable-grouped-typeahead"
|
|
@@ -1537,7 +1537,7 @@ class GroupedTypeaheadSelectInput extends React.Component {
|
|
|
1537
1537
|
<Checkbox
|
|
1538
1538
|
label="onCreateOption"
|
|
1539
1539
|
isChecked={this.state.hasOnCreateOption}
|
|
1540
|
-
onChange={this.toggleCreateNew}
|
|
1540
|
+
onChange={(_event, checked) => this.toggleCreateNew(checked)}
|
|
1541
1541
|
aria-label="toggle new checkbox"
|
|
1542
1542
|
id="toggle-new-grouped-typeahead"
|
|
1543
1543
|
name="toggle-new-grouped-typeahead"
|
|
@@ -1756,7 +1756,7 @@ class MultiTypeaheadSelectInput extends React.Component {
|
|
|
1756
1756
|
<Checkbox
|
|
1757
1757
|
label="isCreatable"
|
|
1758
1758
|
isChecked={this.state.isCreatable}
|
|
1759
|
-
onChange={this.toggleCreatable}
|
|
1759
|
+
onChange={(_event, checked) => this.toggleCreatable(checked)}
|
|
1760
1760
|
aria-label="toggle creatable checkbox"
|
|
1761
1761
|
id="toggle-creatable-typeahead-multi"
|
|
1762
1762
|
name="toggle-creatable-typeahead-multi"
|
|
@@ -1764,7 +1764,7 @@ class MultiTypeaheadSelectInput extends React.Component {
|
|
|
1764
1764
|
<Checkbox
|
|
1765
1765
|
label="onCreateOption"
|
|
1766
1766
|
isChecked={this.state.hasOnCreateOption}
|
|
1767
|
-
onChange={this.toggleCreateNew}
|
|
1767
|
+
onChange={(_event, checked) => this.toggleCreateNew(checked)}
|
|
1768
1768
|
aria-label="toggle new checkbox"
|
|
1769
1769
|
id="toggle-new-typeahead-multi"
|
|
1770
1770
|
name="toggle-new-typeahead-multi"
|
|
@@ -1780,7 +1780,7 @@ class MultiTypeaheadSelectInput extends React.Component {
|
|
|
1780
1780
|
<Checkbox
|
|
1781
1781
|
label="shouldResetOnSelect"
|
|
1782
1782
|
isChecked={this.state.resetOnSelect}
|
|
1783
|
-
onChange={this.toggleResetOnSelect}
|
|
1783
|
+
onChange={(_event, checked) => this.toggleResetOnSelect(checked)}
|
|
1784
1784
|
aria-label="toggle multi reset checkbox"
|
|
1785
1785
|
id="toggle-reset-multi-typeahead"
|
|
1786
1786
|
name="toggle-reset-multi-typeahead"
|
|
@@ -2228,7 +2228,7 @@ class SingleSelectInput extends React.Component {
|
|
|
2228
2228
|
<Checkbox
|
|
2229
2229
|
label="isDisabled"
|
|
2230
2230
|
isChecked={this.state.isDisabled}
|
|
2231
|
-
onChange={this.toggleDisabled}
|
|
2231
|
+
onChange={(_event, checked) => this.toggleDisabled(checked)}
|
|
2232
2232
|
aria-label="disabled checkbox panel"
|
|
2233
2233
|
id="toggle-disabled-panel"
|
|
2234
2234
|
name="toggle-disabled-panel"
|
|
@@ -12,7 +12,7 @@ export const SliderContinuous: React.FunctionComponent = () => {
|
|
|
12
12
|
id="thumb-has-tooltip"
|
|
13
13
|
label="hasTooltipOverThumb"
|
|
14
14
|
isChecked={hasTooltipOverThumb}
|
|
15
|
-
onChange={setHasTooltipOverThumb}
|
|
15
|
+
onChange={(_event, checked) => setHasTooltipOverThumb(checked)}
|
|
16
16
|
style={{ marginBottom: 20 }}
|
|
17
17
|
/>
|
|
18
18
|
<Text component={TextVariants.h3}>Slider Value is: {value}</Text>
|
|
@@ -52,7 +52,7 @@ export const TabsBoxLight: React.FunctionComponent = () => {
|
|
|
52
52
|
<Checkbox
|
|
53
53
|
label="Tabs light variation"
|
|
54
54
|
isChecked={isTabsLightScheme}
|
|
55
|
-
onChange={toggleScheme}
|
|
55
|
+
onChange={(_event, checked) => toggleScheme(checked)}
|
|
56
56
|
aria-label="show light scheme variation checkbox"
|
|
57
57
|
id="toggle-scheme"
|
|
58
58
|
name="toggle-scheme"
|
|
@@ -51,7 +51,7 @@ export const TabsDefault: React.FunctionComponent = () => {
|
|
|
51
51
|
<Checkbox
|
|
52
52
|
label="isBox"
|
|
53
53
|
isChecked={isBox}
|
|
54
|
-
onChange={toggleBox}
|
|
54
|
+
onChange={(_event, checked) => toggleBox(checked)}
|
|
55
55
|
aria-label="show box variation checkbox"
|
|
56
56
|
id="toggle-box-default"
|
|
57
57
|
name="toggle-box-default"
|