@umituz/web-design-system 4.29.3 → 4.29.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/web-design-system",
|
|
3
|
-
"version": "4.29.
|
|
3
|
+
"version": "4.29.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Web Design System - Tailwind v4 authored, precompiled CSS shipped. Atomic Design components (Atoms, Molecules, Organisms, Templates) for React applications.",
|
|
@@ -1811,3 +1811,45 @@ describe('FormField auto id (4.29.1)', () => {
|
|
|
1811
1811
|
expect((control.getAttribute('aria-describedby') ?? '').length).toBeGreaterThan(0);
|
|
1812
1812
|
});
|
|
1813
1813
|
});
|
|
1814
|
+
|
|
1815
|
+
import {
|
|
1816
|
+
Table,
|
|
1817
|
+
TableBody,
|
|
1818
|
+
TableCell,
|
|
1819
|
+
TableHead,
|
|
1820
|
+
TableHeader,
|
|
1821
|
+
TableRow,
|
|
1822
|
+
} from '../presentation/organisms/Table';
|
|
1823
|
+
|
|
1824
|
+
describe('Table compound colSpan (4.29.4)', () => {
|
|
1825
|
+
it('renders a grouped header row with colSpan and scope on th', () => {
|
|
1826
|
+
render(
|
|
1827
|
+
<Table>
|
|
1828
|
+
<TableHeader>
|
|
1829
|
+
<TableRow>
|
|
1830
|
+
<TableHead />
|
|
1831
|
+
<TableHead colSpan={2} scope="colgroup">
|
|
1832
|
+
Orders
|
|
1833
|
+
</TableHead>
|
|
1834
|
+
</TableRow>
|
|
1835
|
+
<TableRow>
|
|
1836
|
+
<TableHead />
|
|
1837
|
+
<TableHead>View</TableHead>
|
|
1838
|
+
<TableHead>Edit</TableHead>
|
|
1839
|
+
</TableRow>
|
|
1840
|
+
</TableHeader>
|
|
1841
|
+
<TableBody>
|
|
1842
|
+
<TableRow>
|
|
1843
|
+
<TableCell>Editor</TableCell>
|
|
1844
|
+
<TableCell>yes</TableCell>
|
|
1845
|
+
<TableCell>no</TableCell>
|
|
1846
|
+
</TableRow>
|
|
1847
|
+
</TableBody>
|
|
1848
|
+
</Table>,
|
|
1849
|
+
);
|
|
1850
|
+
const group = screen.getByText('Orders');
|
|
1851
|
+
expect(group.getAttribute('colspan')).toBe('2');
|
|
1852
|
+
expect(group.getAttribute('scope')).toBe('colgroup');
|
|
1853
|
+
expect(screen.getByText('Editor')).toBeTruthy();
|
|
1854
|
+
});
|
|
1855
|
+
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description Data table component
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { forwardRef, type HTMLAttributes, type TdHTMLAttributes } from 'react';
|
|
6
|
+
import { forwardRef, type HTMLAttributes, type TdHTMLAttributes, type ThHTMLAttributes } from 'react';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { cn } from '../../infrastructure/utils';
|
|
9
9
|
import type { BaseProps } from '../../domain/types';
|
|
@@ -78,7 +78,7 @@ export const TableRow = React.memo(forwardRef<HTMLTableRowElement, HTMLAttribute
|
|
|
78
78
|
|
|
79
79
|
TableRow.displayName = 'TableRow';
|
|
80
80
|
|
|
81
|
-
export const TableHead = React.memo(forwardRef<HTMLTableCellElement,
|
|
81
|
+
export const TableHead = React.memo(forwardRef<HTMLTableCellElement, ThHTMLAttributes<HTMLTableCellElement>>(
|
|
82
82
|
({ className, ...props }, ref) => (
|
|
83
83
|
<th
|
|
84
84
|
ref={ref}
|