@patternfly/react-core 5.0.0-alpha.21 → 5.0.0-alpha.23
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 +12 -0
- package/components/Card/Card.d.ts +1 -1
- package/components/Card/Card.d.ts.map +1 -1
- package/components/Card/Card.js +1 -1
- package/components/Card/Card.js.map +1 -1
- package/components/DataList/DataListCheck.d.ts +1 -1
- package/components/DataList/DataListCheck.d.ts.map +1 -1
- package/components/DataList/DataListCheck.js +2 -2
- package/components/DataList/DataListCheck.js.map +1 -1
- package/dist/esm/components/Card/Card.d.ts +1 -1
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/Card/Card.js +1 -1
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/DataList/DataListCheck.d.ts +1 -1
- package/dist/esm/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataListCheck.js +2 -2
- package/dist/esm/components/DataList/DataListCheck.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts +1 -1
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/Card/Card.js +1 -1
- package/dist/js/components/Card/Card.js.map +1 -1
- package/dist/js/components/DataList/DataListCheck.d.ts +1 -1
- package/dist/js/components/DataList/DataListCheck.d.ts.map +1 -1
- package/dist/js/components/DataList/DataListCheck.js +2 -2
- package/dist/js/components/DataList/DataListCheck.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +2 -2
- package/src/components/Card/Card.tsx +2 -2
- package/src/components/Card/examples/CardLegacySelectable.tsx +1 -1
- package/src/components/Card/examples/CardSelectable.tsx +1 -1
- package/src/components/Card/examples/CardSelectableA11yHighlight.tsx +1 -1
- package/src/components/DataList/DataListCheck.tsx +3 -3
- package/src/components/DataList/__tests__/Generated/DataListCheck.test.tsx +1 -1
- package/src/demos/PrimaryDetail.md +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.23",
|
|
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": "47ec39c169e68ca9dee8ba1b550f4328d6fb705e"
|
|
74
74
|
}
|
|
@@ -39,7 +39,7 @@ export interface CardProps extends React.HTMLProps<HTMLElement>, OUIAProps {
|
|
|
39
39
|
/** Aria label to apply to the selectable input if one is rendered */
|
|
40
40
|
selectableInputAriaLabel?: string;
|
|
41
41
|
/** Callback that executes when the selectable input is changed */
|
|
42
|
-
onSelectableInputChange?: (
|
|
42
|
+
onSelectableInputChange?: (event: React.FormEvent<HTMLInputElement>, labelledBy: string) => void;
|
|
43
43
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
44
44
|
ouiaId?: number | string;
|
|
45
45
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
@@ -146,7 +146,7 @@ export const Card: React.FunctionComponent<CardProps> = ({
|
|
|
146
146
|
{...ariaProps}
|
|
147
147
|
type="checkbox"
|
|
148
148
|
checked={isSelected}
|
|
149
|
-
onChange={event => onSelectableInputChange(
|
|
149
|
+
onChange={event => onSelectableInputChange(event, id)}
|
|
150
150
|
disabled={isDisabledRaised}
|
|
151
151
|
tabIndex={-1}
|
|
152
152
|
/>
|
|
@@ -31,7 +31,7 @@ export const CardLegacySelectable: React.FunctionComponent = () => {
|
|
|
31
31
|
setSelected(newSelected);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const onChange = (
|
|
34
|
+
const onChange = (_event: React.FormEvent<HTMLInputElement>, labelledById: string) => {
|
|
35
35
|
const newSelected = labelledById === selected ? null : labelledById;
|
|
36
36
|
setSelected(newSelected);
|
|
37
37
|
};
|
|
@@ -31,7 +31,7 @@ export const CardSelectable: React.FunctionComponent = () => {
|
|
|
31
31
|
setSelected(newSelected);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
const onChange = (
|
|
34
|
+
const onChange = (_event: React.FormEvent<HTMLInputElement>, labelledById: string) => {
|
|
35
35
|
const newSelected = labelledById === selected ? null : labelledById;
|
|
36
36
|
setSelected(newSelected);
|
|
37
37
|
};
|
|
@@ -20,7 +20,7 @@ export const CardSelectableA11yHighlight: React.FunctionComponent = () => {
|
|
|
20
20
|
setSelected(newSelected);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const onChange = (
|
|
23
|
+
const onChange = (_event: React.FormEvent<HTMLInputElement>, labelledById: string) => {
|
|
24
24
|
const newSelected = labelledById === selected ? null : labelledById;
|
|
25
25
|
setSelected(newSelected);
|
|
26
26
|
};
|
|
@@ -24,7 +24,7 @@ export interface DataListCheckProps extends Omit<React.HTMLProps<HTMLInputElemen
|
|
|
24
24
|
*/
|
|
25
25
|
defaultChecked?: boolean;
|
|
26
26
|
/** A callback for when the DataList checkbox selection changes */
|
|
27
|
-
onChange?: (
|
|
27
|
+
onChange?: (event: React.FormEvent<HTMLInputElement>, checked: boolean) => void;
|
|
28
28
|
/** Aria-labelledby of the DataList checkbox */
|
|
29
29
|
'aria-labelledby': string;
|
|
30
30
|
/** Flag to indicate if other controls are used in the DataListItem */
|
|
@@ -34,7 +34,7 @@ export interface DataListCheckProps extends Omit<React.HTMLProps<HTMLInputElemen
|
|
|
34
34
|
export const DataListCheck: React.FunctionComponent<DataListCheckProps> = ({
|
|
35
35
|
className = '',
|
|
36
36
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
-
onChange = (
|
|
37
|
+
onChange = (event: React.FormEvent<HTMLInputElement>, checked: boolean) => {},
|
|
38
38
|
isValid = true,
|
|
39
39
|
isDisabled = false,
|
|
40
40
|
isChecked = false,
|
|
@@ -48,7 +48,7 @@ export const DataListCheck: React.FunctionComponent<DataListCheckProps> = ({
|
|
|
48
48
|
<input
|
|
49
49
|
{...props}
|
|
50
50
|
type="checkbox"
|
|
51
|
-
onChange={event => onChange(event.currentTarget.checked
|
|
51
|
+
onChange={(event) => onChange(event, event.currentTarget.checked)}
|
|
52
52
|
aria-invalid={!isValid}
|
|
53
53
|
disabled={isDisabled}
|
|
54
54
|
{...([true, false].includes(defaultChecked) && { defaultChecked })}
|
|
@@ -15,7 +15,7 @@ it('DataListCheck should match snapshot (auto-generated)', () => {
|
|
|
15
15
|
isDisabled={false}
|
|
16
16
|
isChecked={null}
|
|
17
17
|
checked={null}
|
|
18
|
-
onChange={(
|
|
18
|
+
onChange={(event: React.FormEvent<HTMLInputElement>, checked: boolean) => {}}
|
|
19
19
|
aria-labelledby={'string'}
|
|
20
20
|
/>
|
|
21
21
|
);
|
|
@@ -1133,7 +1133,7 @@ class PrimaryDetailCardView extends React.Component {
|
|
|
1133
1133
|
});
|
|
1134
1134
|
};
|
|
1135
1135
|
|
|
1136
|
-
this.onChange = (
|
|
1136
|
+
this.onChange = (_event, labelledById) => {
|
|
1137
1137
|
if (labelledById === this.state.activeCard) {
|
|
1138
1138
|
return;
|
|
1139
1139
|
}
|