@patternfly/react-core 4.250.8 → 4.251.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.250.8",
3
+ "version": "4.251.0",
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": "0afb2a934643bd11219312fc058b354a629dbc76"
73
+ "gitHead": "84a0a3112aec6734d5749a143a2a5265f1f3d576"
74
74
  }
@@ -31,7 +31,7 @@ export const LabelEditable: React.FunctionComponent = () => {
31
31
  onEditComplete={onEditComplete}
32
32
  isEditable
33
33
  editableProps={{
34
- 'aria-label': 'Editable text',
34
+ 'aria-label': `Editable label with text ${labelText}`,
35
35
  id: 'editable-label'
36
36
  }}
37
37
  >
@@ -46,7 +46,7 @@ export const LabelEditable: React.FunctionComponent = () => {
46
46
  onEditComplete={onCompactEditComplete}
47
47
  isEditable
48
48
  editableProps={{
49
- 'aria-label': 'Compact editable text',
49
+ 'aria-label': `Editable compact label with text ${compactLabelText}`,
50
50
  id: 'compact-editable-label'
51
51
  }}
52
52
  >
@@ -11,7 +11,7 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
11
11
  props: {
12
12
  isEditable: true,
13
13
  editableProps: {
14
- 'aria-label': 'label editable text'
14
+ 'aria-label': 'Editable label with text Label 3'
15
15
  }
16
16
  },
17
17
  id: 2
@@ -24,7 +24,12 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
24
24
 
25
25
  const onEdit = (nextText: string, index: number) => {
26
26
  const copy = [...labels];
27
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
27
+ const updatedProps = {
28
+ ...labels[index].props,
29
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
30
+ };
31
+
32
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
28
33
  setLabels(copy);
29
34
  };
30
35
 
@@ -35,7 +40,7 @@ export const LabelGroupEditableAdd: React.FunctionComponent = () => {
35
40
  props: {
36
41
  isEditable: true,
37
42
  editableProps: {
38
- 'aria-label': 'label editable text'
43
+ 'aria-label': `Editable label with text New Label`
39
44
  }
40
45
  },
41
46
  id: idIndex
@@ -16,7 +16,7 @@ export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
16
16
  props: {
17
17
  isEditable: true,
18
18
  editableProps: {
19
- 'aria-label': 'label editable text'
19
+ 'aria-label': 'Editable label with text Label 3'
20
20
  }
21
21
  },
22
22
  id: 2
@@ -29,7 +29,12 @@ export const LabelGroupEditableAddDropdown: React.FunctionComponent = () => {
29
29
 
30
30
  const onEdit = (nextText: string, index: number) => {
31
31
  const copy = [...labels];
32
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
32
+ const updatedProps = {
33
+ ...labels[index].props,
34
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
35
+ };
36
+
37
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
33
38
  setLabels(copy);
34
39
  };
35
40
 
@@ -47,7 +47,7 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
47
47
  props: {
48
48
  isEditable: true,
49
49
  editableProps: {
50
- 'aria-label': 'label editable text'
50
+ 'aria-label': 'Editable label with text Label 3'
51
51
  }
52
52
  },
53
53
  id: 6
@@ -60,7 +60,12 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
60
60
 
61
61
  const onEdit = (nextText: string, index: number) => {
62
62
  const copy = [...labels];
63
- copy[index] = { name: nextText, props: labels[index].props, id: labels[index].id };
63
+ const updatedProps = {
64
+ ...labels[index].props,
65
+ editableProps: { 'aria-label': `Editable label with text ${nextText}` }
66
+ };
67
+
68
+ copy[index] = { name: nextText, props: updatedProps, id: labels[index].id };
64
69
  setLabels(copy);
65
70
  };
66
71
 
@@ -81,7 +86,7 @@ export const LabelGroupEditableAddModal: React.FunctionComponent = () => {
81
86
  isEditable: isEditable !== undefined ? isEditable : true,
82
87
  ...(isEditable && {
83
88
  editableProps: {
84
- 'aria-label': 'label editable text'
89
+ 'aria-label': `Editable label with text ${labelText || 'New Label'}`
85
90
  }
86
91
  })
87
92
  },
@@ -15,7 +15,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
15
15
  onEditComplete={newText => setLabel1(newText)}
16
16
  isEditable
17
17
  editableProps={{
18
- 'aria-label': 'Editable text',
18
+ 'aria-label': `Editable label with text ${label1}`,
19
19
  id: 'editable-label-1'
20
20
  }}
21
21
  >
@@ -29,7 +29,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
29
29
  onEditComplete={newText => setLabel2(newText)}
30
30
  isEditable
31
31
  editableProps={{
32
- 'aria-label': 'Editable text 2',
32
+ 'aria-label': `Editable label with text ${label2}`,
33
33
  id: 'editable-label-2'
34
34
  }}
35
35
  >
@@ -42,7 +42,7 @@ export const LabelGroupEditableLabels: React.FunctionComponent = () => {
42
42
  onEditComplete={newText => setLabel3(newText)}
43
43
  isEditable
44
44
  editableProps={{
45
- 'aria-label': 'Editable text 3',
45
+ 'aria-label': `Editable label with text ${label3}`,
46
46
  id: 'editable-label-3'
47
47
  }}
48
48
  >