@chumsinc/sortable-tables 2.0.13 → 2.0.14
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 -1
- package/dist/Table.js +4 -4
- package/dist/Table.js.map +1 -1
- package/package.json +1 -1
- package/src/Table.tsx +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
9
9
|
|
|
10
|
-
#### [v2.0.
|
|
10
|
+
#### [v2.0.14](https://github.com/ChumsInc/sortable-tables/compare/v2.0.13...v2.0.14)
|
|
11
|
+
|
|
12
|
+
> 2025-08-06
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Commits
|
|
18
|
+
|
|
19
|
+
- [`48f4b1f`](https://github.com/ChumsInc/sortable-tables/commit/48f4b1f0df1e94a4eede5e1333a25262b28f4cdd) chore: npm updates, apply className attribute to rendered table.
|
|
20
|
+
|
|
21
|
+
#### [v2.0.13](https://github.com/ChumsInc/sortable-tables/compare/v2.0.12...v2.0.13) - 2025-07-08
|
|
11
22
|
|
|
12
23
|
> 2025-07-08
|
|
13
24
|
|
package/dist/Table.js
CHANGED
|
@@ -15,14 +15,14 @@ const StyledTable = styled.table `
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
|
-
export default React.forwardRef(function Table({ sticky, responsive, children, ...rest }, ref) {
|
|
18
|
+
export default React.forwardRef(function Table({ sticky, responsive, children, className, ...rest }, ref) {
|
|
19
19
|
if (responsive) {
|
|
20
|
-
const
|
|
20
|
+
const _className = classNames(className, {
|
|
21
21
|
'table-responsive': responsive === true,
|
|
22
22
|
[`table-responsive-${responsive}`]: responsive !== true,
|
|
23
23
|
});
|
|
24
|
-
return (_jsx("div", { className:
|
|
24
|
+
return (_jsx("div", { className: _className, children: _jsx(StyledTable, { ref: ref, ...rest, children: children }) }));
|
|
25
25
|
}
|
|
26
|
-
return (_jsx(StyledTable, { sticky: sticky, ref: ref, ...rest, children: children }));
|
|
26
|
+
return (_jsx(StyledTable, { className: className, sticky: sticky, ref: ref, ...rest, children: children }));
|
|
27
27
|
});
|
|
28
28
|
//# sourceMappingURL=Table.js.map
|
package/dist/Table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAkB;0BACxB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;;;;;;wBAMzC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO;uBAC3C,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO;0BACjC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,gFAAgF,CAAC,CAAC,CAAC,OAAO;;;CAG3I,CAAA;AAED,eAAe,KAAK,CAAC,UAAU,CAC3B,SAAS,KAAK,CAAC,EACI,MAAM,EACN,UAAU,EACV,QAAQ,EACR,GAAG,IAAI,EACV,EAAE,GAAG;IACjB,IAAI,UAAU,EAAE,CAAC;QACb,MAAM,
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["../src/Table.tsx"],"names":[],"mappings":";AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,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from "@emotion/styled";
|
|
|
3
3
|
import {DataTableProps} from "./types";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
|
|
6
|
-
export type StyledTableProps = TableHTMLAttributes<HTMLTableElement> & Pick<DataTableProps, 'sticky'|'responsive'>
|
|
6
|
+
export type StyledTableProps = TableHTMLAttributes<HTMLTableElement> & Pick<DataTableProps, 'sticky' | 'responsive'>
|
|
7
7
|
|
|
8
8
|
const StyledTable = styled.table<StyledTableProps>`
|
|
9
9
|
--table-sticky-top: ${props => props.sticky ? '0' : undefined};
|
|
@@ -24,20 +24,21 @@ export default React.forwardRef<HTMLTableElement, StyledTableProps>(
|
|
|
24
24
|
sticky,
|
|
25
25
|
responsive,
|
|
26
26
|
children,
|
|
27
|
+
className,
|
|
27
28
|
...rest
|
|
28
29
|
}, ref) {
|
|
29
30
|
if (responsive) {
|
|
30
|
-
const
|
|
31
|
+
const _className = classNames(className, {
|
|
31
32
|
'table-responsive': responsive === true,
|
|
32
33
|
[`table-responsive-${responsive}`]: responsive !== true,
|
|
33
34
|
})
|
|
34
35
|
return (
|
|
35
|
-
<div className={
|
|
36
|
+
<div className={_className}>
|
|
36
37
|
<StyledTable ref={ref} {...rest}>{children}</StyledTable>
|
|
37
38
|
</div>
|
|
38
39
|
)
|
|
39
40
|
}
|
|
40
41
|
return (
|
|
41
|
-
<StyledTable sticky={sticky} ref={ref} {...rest}>{children}</StyledTable>
|
|
42
|
+
<StyledTable className={className} sticky={sticky} ref={ref} {...rest}>{children}</StyledTable>
|
|
42
43
|
)
|
|
43
44
|
})
|