@patternfly/react-core 4.276.2 → 4.276.4
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 +19 -0
- package/components/Chip/Chip.d.ts.map +1 -1
- package/components/Chip/Chip.js +16 -4
- package/components/Chip/Chip.js.map +1 -1
- package/dist/esm/components/Chip/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip/Chip.js +16 -4
- package/dist/esm/components/Chip/Chip.js.map +1 -1
- package/dist/js/components/Chip/Chip.d.ts.map +1 -1
- package/dist/js/components/Chip/Chip.js +16 -4
- package/dist/js/components/Chip/Chip.js.map +1 -1
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +6 -6
- package/src/components/Chip/Chip.tsx +36 -6
- package/src/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap +0 -8
- package/src/components/ChipGroup/__tests__/__snapshots__/ChipGroup.test.tsx.snap +0 -4
- package/src/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +0 -2
- package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.276.
|
|
3
|
+
"version": "4.276.4",
|
|
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",
|
|
@@ -45,16 +45,16 @@
|
|
|
45
45
|
"subpaths": "node scripts/copySubpaths.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@patternfly/react-icons": "^4.93.
|
|
49
|
-
"@patternfly/react-styles": "^4.92.
|
|
50
|
-
"@patternfly/react-tokens": "^4.94.
|
|
48
|
+
"@patternfly/react-icons": "^4.93.6",
|
|
49
|
+
"@patternfly/react-styles": "^4.92.6",
|
|
50
|
+
"@patternfly/react-tokens": "^4.94.6",
|
|
51
51
|
"focus-trap": "6.9.2",
|
|
52
52
|
"react-dropzone": "9.0.0",
|
|
53
53
|
"tippy.js": "5.1.2",
|
|
54
54
|
"tslib": "^2.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "4.224.
|
|
57
|
+
"@patternfly/patternfly": "4.224.2",
|
|
58
58
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
59
59
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
60
60
|
"@rollup/plugin-replace": "^3.0.0",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"react": "^16.8 || ^17 || ^18",
|
|
72
72
|
"react-dom": "^16.8 || ^17 || ^18"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "b914e4945c21e022ab38a900fce7fa7652e0c03d"
|
|
75
75
|
}
|
|
@@ -83,17 +83,34 @@ export class Chip extends React.Component<ChipProps, ChipState> {
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
renderOverflowChip = () => {
|
|
86
|
-
const {
|
|
87
|
-
|
|
86
|
+
const {
|
|
87
|
+
children,
|
|
88
|
+
className,
|
|
89
|
+
onClick,
|
|
90
|
+
ouiaId,
|
|
91
|
+
textMaxWidth,
|
|
92
|
+
style,
|
|
93
|
+
component,
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
95
|
+
tooltipPosition,
|
|
96
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
97
|
+
isOverflowChip,
|
|
98
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
99
|
+
closeBtnAriaLabel,
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
101
|
+
isReadOnly,
|
|
102
|
+
...props
|
|
103
|
+
} = this.props;
|
|
104
|
+
const Component = component as any;
|
|
88
105
|
return (
|
|
89
106
|
<Component
|
|
90
107
|
onClick={onClick}
|
|
91
|
-
{...(
|
|
108
|
+
{...(textMaxWidth && {
|
|
92
109
|
style: this.setChipStyle(),
|
|
93
|
-
...
|
|
110
|
+
...style
|
|
94
111
|
})}
|
|
95
112
|
className={css(styles.chip, styles.modifiers.overflow, className)}
|
|
96
|
-
{...(
|
|
113
|
+
{...(component === 'button' ? { type: 'button' } : {})}
|
|
97
114
|
{...getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)}
|
|
98
115
|
{...props}
|
|
99
116
|
>
|
|
@@ -103,7 +120,20 @@ export class Chip extends React.Component<ChipProps, ChipState> {
|
|
|
103
120
|
};
|
|
104
121
|
|
|
105
122
|
renderInnerChip(id: string) {
|
|
106
|
-
const {
|
|
123
|
+
const {
|
|
124
|
+
children,
|
|
125
|
+
className,
|
|
126
|
+
onClick,
|
|
127
|
+
closeBtnAriaLabel,
|
|
128
|
+
isReadOnly,
|
|
129
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
130
|
+
isOverflowChip,
|
|
131
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
132
|
+
tooltipPosition,
|
|
133
|
+
component,
|
|
134
|
+
ouiaId,
|
|
135
|
+
...props
|
|
136
|
+
} = this.props;
|
|
107
137
|
const Component = component as any;
|
|
108
138
|
return (
|
|
109
139
|
<Component
|
|
@@ -8,7 +8,6 @@ exports[`Chip closable 1`] = `
|
|
|
8
8
|
data-ouia-component-type="PF4/Chip"
|
|
9
9
|
data-ouia-safe="true"
|
|
10
10
|
id="chip_one"
|
|
11
|
-
tooltipposition="top"
|
|
12
11
|
>
|
|
13
12
|
<span
|
|
14
13
|
class="pf-c-chip__text"
|
|
@@ -53,7 +52,6 @@ exports[`Chip closable with tooltip 1`] = `
|
|
|
53
52
|
data-ouia-component-type="PF4/Chip"
|
|
54
53
|
data-ouia-safe="true"
|
|
55
54
|
id="chip_one"
|
|
56
|
-
tooltipposition="top"
|
|
57
55
|
>
|
|
58
56
|
<span
|
|
59
57
|
class="pf-c-chip__text"
|
|
@@ -99,7 +97,6 @@ exports[`Chip custom max-width text 1`] = `
|
|
|
99
97
|
data-ouia-safe="true"
|
|
100
98
|
style="--pf-c-chip__text--MaxWidth: 100px;"
|
|
101
99
|
textmaxwidth="100px"
|
|
102
|
-
tooltipposition="top"
|
|
103
100
|
>
|
|
104
101
|
<span
|
|
105
102
|
class="pf-c-chip__text"
|
|
@@ -140,12 +137,9 @@ exports[`Chip overflow 1`] = `
|
|
|
140
137
|
<DocumentFragment>
|
|
141
138
|
<div
|
|
142
139
|
class="pf-c-chip pf-m-overflow my-chp-cls"
|
|
143
|
-
closebtnarialabel="close"
|
|
144
|
-
component="div"
|
|
145
140
|
data-ouia-component-id="OUIA-Generated-Chip-1"
|
|
146
141
|
data-ouia-component-type="PF4/OverflowChip"
|
|
147
142
|
data-ouia-safe="true"
|
|
148
|
-
tooltipposition="top"
|
|
149
143
|
>
|
|
150
144
|
<span
|
|
151
145
|
class="pf-c-chip__text"
|
|
@@ -163,7 +157,6 @@ exports[`Chip readonly 1`] = `
|
|
|
163
157
|
data-ouia-component-id="OUIA-Generated-Chip-4"
|
|
164
158
|
data-ouia-component-type="PF4/Chip"
|
|
165
159
|
data-ouia-safe="true"
|
|
166
|
-
tooltipposition="top"
|
|
167
160
|
>
|
|
168
161
|
<span
|
|
169
162
|
class="pf-c-chip__text"
|
|
@@ -183,7 +176,6 @@ exports[`Chip with role='gridcell' 1`] = `
|
|
|
183
176
|
data-ouia-component-type="PF4/Chip"
|
|
184
177
|
data-ouia-safe="true"
|
|
185
178
|
role="gridcell"
|
|
186
|
-
tooltipposition="top"
|
|
187
179
|
>
|
|
188
180
|
<span
|
|
189
181
|
class="pf-c-chip__text"
|
|
@@ -25,7 +25,6 @@ exports[`ChipGroup chip group default 1`] = `
|
|
|
25
25
|
data-ouia-component-id="OUIA-Generated-Chip-1"
|
|
26
26
|
data-ouia-component-type="PF4/Chip"
|
|
27
27
|
data-ouia-safe="true"
|
|
28
|
-
tooltipposition="top"
|
|
29
28
|
>
|
|
30
29
|
<span
|
|
31
30
|
class="pf-c-chip__text"
|
|
@@ -97,7 +96,6 @@ exports[`ChipGroup chip group with category 1`] = `
|
|
|
97
96
|
data-ouia-component-id="OUIA-Generated-Chip-2"
|
|
98
97
|
data-ouia-component-type="PF4/Chip"
|
|
99
98
|
data-ouia-safe="true"
|
|
100
|
-
tooltipposition="top"
|
|
101
99
|
>
|
|
102
100
|
<span
|
|
103
101
|
class="pf-c-chip__text"
|
|
@@ -169,7 +167,6 @@ exports[`ChipGroup chip group with category and tooltip 1`] = `
|
|
|
169
167
|
data-ouia-component-id="OUIA-Generated-Chip-9"
|
|
170
168
|
data-ouia-component-type="PF4/Chip"
|
|
171
169
|
data-ouia-safe="true"
|
|
172
|
-
tooltipposition="top"
|
|
173
170
|
>
|
|
174
171
|
<span
|
|
175
172
|
class="pf-c-chip__text"
|
|
@@ -241,7 +238,6 @@ exports[`ChipGroup chip group with closable category 1`] = `
|
|
|
241
238
|
data-ouia-component-id="OUIA-Generated-Chip-3"
|
|
242
239
|
data-ouia-component-type="PF4/Chip"
|
|
243
240
|
data-ouia-safe="true"
|
|
244
|
-
tooltipposition="top"
|
|
245
241
|
>
|
|
246
242
|
<span
|
|
247
243
|
class="pf-c-chip__text"
|
|
@@ -1859,7 +1859,6 @@ exports[`typeahead multi select renders selected successfully 1`] = `
|
|
|
1859
1859
|
data-ouia-component-id="OUIA-Generated-Chip-1"
|
|
1860
1860
|
data-ouia-component-type="PF4/Chip"
|
|
1861
1861
|
data-ouia-safe="true"
|
|
1862
|
-
tooltipposition="top"
|
|
1863
1862
|
>
|
|
1864
1863
|
<span
|
|
1865
1864
|
class="pf-c-chip__text"
|
|
@@ -1902,7 +1901,6 @@ exports[`typeahead multi select renders selected successfully 1`] = `
|
|
|
1902
1901
|
data-ouia-component-id="OUIA-Generated-Chip-2"
|
|
1903
1902
|
data-ouia-component-type="PF4/Chip"
|
|
1904
1903
|
data-ouia-safe="true"
|
|
1905
|
-
tooltipposition="top"
|
|
1906
1904
|
>
|
|
1907
1905
|
<span
|
|
1908
1906
|
class="pf-c-chip__text"
|
|
@@ -297,7 +297,6 @@ exports[`Toolbar should render with custom chip content 1`] = `
|
|
|
297
297
|
data-ouia-component-id="OUIA-Generated-Chip-1"
|
|
298
298
|
data-ouia-component-type="PF4/Chip"
|
|
299
299
|
data-ouia-safe="true"
|
|
300
|
-
tooltipposition="top"
|
|
301
300
|
>
|
|
302
301
|
<span
|
|
303
302
|
class="pf-c-chip__text"
|
|
@@ -340,7 +339,6 @@ exports[`Toolbar should render with custom chip content 1`] = `
|
|
|
340
339
|
data-ouia-component-id="OUIA-Generated-Chip-2"
|
|
341
340
|
data-ouia-component-type="PF4/Chip"
|
|
342
341
|
data-ouia-safe="true"
|
|
343
|
-
tooltipposition="top"
|
|
344
342
|
>
|
|
345
343
|
<span
|
|
346
344
|
class="pf-c-chip__text"
|