@patternfly/react-table 6.5.0-prerelease.49 → 6.5.0-prerelease.50
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 +6 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/Table/package.json +1 -1
- package/dist/dynamic/components/Table/utils/decorators/package.json +1 -1
- package/dist/dynamic/components/Table/utils/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/base/package.json +1 -1
- package/dist/dynamic/deprecated/components/Table/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/esm/components/Table/Table.d.ts +2 -0
- package/dist/esm/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/components/Table/Table.js +3 -3
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/js/components/Table/Table.d.ts +2 -0
- package/dist/js/components/Table/Table.d.ts.map +1 -1
- package/dist/js/components/Table/Table.js +3 -3
- package/dist/js/components/Table/Table.js.map +1 -1
- package/dist/umd/assets/{output-A-U8Bxei.css → output-DyMfTqZv.css} +7002 -7001
- package/dist/umd/react-table.min.js +2 -2
- package/package.json +4 -4
- package/src/components/Table/Table.tsx +4 -0
- package/src/components/Table/__tests__/Table.test.tsx +30 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-table",
|
|
3
|
-
"version": "6.5.0-prerelease.
|
|
3
|
+
"version": "6.5.0-prerelease.50",
|
|
4
4
|
"description": "This library provides a set of React table components for use with the PatternFly 4",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@patternfly/react-core": "^6.5.0-prerelease.
|
|
44
|
-
"@patternfly/react-icons": "^6.5.0-prerelease.
|
|
43
|
+
"@patternfly/react-core": "^6.5.0-prerelease.49",
|
|
44
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.20",
|
|
45
45
|
"@patternfly/react-styles": "^6.5.0-prerelease.15",
|
|
46
46
|
"@patternfly/react-tokens": "^6.5.0-prerelease.14",
|
|
47
47
|
"lodash": "^4.17.23",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"react": "^17 || ^18 || ^19",
|
|
52
52
|
"react-dom": "^17 || ^18 || ^19"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a7a847c33ba834994e3a1db186ee071e7fbdd7ad"
|
|
55
55
|
}
|
|
@@ -50,6 +50,8 @@ export interface TableProps extends React.HTMLProps<HTMLTableElement>, OUIAProps
|
|
|
50
50
|
role?: string;
|
|
51
51
|
/** @beta Flag indicating if the table should have plain styling with a transparent background */
|
|
52
52
|
isPlain?: boolean;
|
|
53
|
+
/** @beta Flag indicating if the table should not have plain styling when in the glass theme */
|
|
54
|
+
isNoPlainOnGlass?: boolean;
|
|
53
55
|
/** If set to true, the table header sticks to the top of its container */
|
|
54
56
|
isStickyHeader?: boolean;
|
|
55
57
|
/** @hide Forwarded ref */
|
|
@@ -97,6 +99,7 @@ const TableBase: React.FunctionComponent<TableProps> = ({
|
|
|
97
99
|
borders = true,
|
|
98
100
|
isStickyHeader = false,
|
|
99
101
|
isPlain = false,
|
|
102
|
+
isNoPlainOnGlass = false,
|
|
100
103
|
gridBreakPoint = TableGridBreakpoint.gridMd,
|
|
101
104
|
'aria-label': ariaLabel,
|
|
102
105
|
role = 'grid',
|
|
@@ -226,6 +229,7 @@ const TableBase: React.FunctionComponent<TableProps> = ({
|
|
|
226
229
|
isStriped && styles.modifiers.striped,
|
|
227
230
|
isExpandable && styles.modifiers.expandable,
|
|
228
231
|
isPlain && styles.modifiers.plain,
|
|
232
|
+
isNoPlainOnGlass && styles.modifiers.noPlainOnGlass,
|
|
229
233
|
hasNoInset && stylesTreeView.modifiers.noInset,
|
|
230
234
|
isNested && 'pf-m-nested',
|
|
231
235
|
hasAnimations && styles.modifiers.animateExpand
|
|
@@ -156,3 +156,33 @@ test(`Renders with class ${styles.modifiers.plain} when isPlain is true`, () =>
|
|
|
156
156
|
|
|
157
157
|
expect(screen.getByRole('grid', { name: 'Test table' })).toHaveClass(styles.modifiers.plain);
|
|
158
158
|
});
|
|
159
|
+
|
|
160
|
+
test(`Does not render with class ${styles.modifiers.plain} when isPlain is not defined`, () => {
|
|
161
|
+
render(<Table aria-label="Test table" />);
|
|
162
|
+
|
|
163
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.plain);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
test(`Does not render with class ${styles.modifiers.plain} when isPlain is false`, () => {
|
|
167
|
+
render(<Table isPlain={false} aria-label="Test table" />);
|
|
168
|
+
|
|
169
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.plain);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test(`Renders with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is true`, () => {
|
|
173
|
+
render(<Table isNoPlainOnGlass aria-label="Test table" />);
|
|
174
|
+
|
|
175
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test(`Does not render with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is undefined`, () => {
|
|
179
|
+
render(<Table aria-label="Test table" />);
|
|
180
|
+
|
|
181
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test(`Does not render with class ${styles.modifiers.noPlainOnGlass} when isNoPlainOnGlass is false`, () => {
|
|
185
|
+
render(<Table isNoPlainOnGlass={false} aria-label="Test table" />);
|
|
186
|
+
|
|
187
|
+
expect(screen.getByRole('grid', { name: 'Test table' })).not.toHaveClass(styles.modifiers.noPlainOnGlass);
|
|
188
|
+
});
|