@thecb/components 7.7.3-beta.1 → 7.7.3-beta.3
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/dist/index.cjs.js +61 -14
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +77 -27
- package/dist/index.esm.js +60 -14
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/index.d.ts +2 -1
- package/src/components/atoms/table/Table.styled.js +1 -0
- package/src/components/atoms/table/TableCell.styled.js +3 -3
- package/src/components/atoms/table/TableHead.styled.js +1 -1
- package/src/components/atoms/table/TableHeading.styled.js +2 -2
- package/src/components/atoms/table/TableRow.js +1 -0
- package/src/components/atoms/table/TableRow.styled.js +2 -2
- package/src/components/atoms/table/index.d.ts +50 -0
- package/src/components/atoms/table/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./card";
|
|
2
1
|
export * from "./button-with-action";
|
|
3
2
|
export * from "./button-with-link";
|
|
3
|
+
export * from "./card";
|
|
4
4
|
export * from "./icons";
|
|
5
5
|
export * from "./layouts";
|
|
6
6
|
export * from "./link";
|
|
@@ -8,5 +8,6 @@ export * from "./nav-footer";
|
|
|
8
8
|
export * from "./nav-header";
|
|
9
9
|
export * from "./nav-tabs";
|
|
10
10
|
export * from "./paragraph";
|
|
11
|
+
export * from "./table";
|
|
11
12
|
export * from "./text";
|
|
12
13
|
export * from "./title";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
export default styled.td`
|
|
4
|
-
padding: ${({ padding }) =>
|
|
5
|
-
font-size: 0.875rem
|
|
4
|
+
padding: ${({ padding = "24px" }) => padding};
|
|
5
|
+
font-size: ${({ fontSize = "0.875rem" }) => fontSize}
|
|
6
6
|
white-space: nowrap;
|
|
7
|
-
max-width: 250px;
|
|
7
|
+
max-width: ${({ maxWidth = "250px" }) => maxWidth};
|
|
8
8
|
overflow: hidden;
|
|
9
9
|
text-overflow: ellipsis;
|
|
10
10
|
&:last-child {
|
|
@@ -3,5 +3,5 @@ import styled from "styled-components";
|
|
|
3
3
|
export default styled.thead`
|
|
4
4
|
background-color: ${({ backgroundColor }) => backgroundColor};
|
|
5
5
|
border-bottom: ${({ borderColor }) => `1px solid ${borderColor}`};
|
|
6
|
-
font-size: 0.875rem;
|
|
6
|
+
font-size: ${({ fontSize = "0.875rem" }) => fontSize};
|
|
7
7
|
`;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
|
|
3
3
|
export default styled.th`
|
|
4
|
-
padding: 24px;
|
|
5
|
-
min-width: ${({ minWidth }) =>
|
|
4
|
+
padding: ${({ padding = "24px" }) => padding};
|
|
5
|
+
min-width: ${({ minWidth = "initial" }) => minWidth};
|
|
6
6
|
text-align: left;
|
|
7
7
|
&:last-child {
|
|
8
8
|
text-align: right;
|
|
@@ -5,10 +5,10 @@ export default styled.tr`
|
|
|
5
5
|
border-bottom: ${({ borderColor }) => `1px solid ${borderColor}`};
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
${({ hoverEffect, hoverBackgroundColor }) =>
|
|
8
|
+
${({ hoverCursor, hoverEffect, hoverBackgroundColor }) =>
|
|
9
9
|
hoverEffect &&
|
|
10
10
|
`&:hover {
|
|
11
|
-
cursor: pointer;
|
|
11
|
+
${hoverCursor && "cursor: pointer"};
|
|
12
12
|
background-color: ${hoverBackgroundColor};
|
|
13
13
|
}`}
|
|
14
14
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Expand from "../../../util/expand";
|
|
3
|
+
|
|
4
|
+
export interface TableProps {
|
|
5
|
+
extraStyles?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface TableBodyProps {
|
|
9
|
+
extraStyles?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TableCellProps {
|
|
13
|
+
extraStyles?: string;
|
|
14
|
+
fontSize?: string;
|
|
15
|
+
maxWidth?: string;
|
|
16
|
+
padding?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TableHeadProps {
|
|
20
|
+
extraStyles?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface TableHeadingProps {
|
|
23
|
+
extraStyles?: string;
|
|
24
|
+
minWidth?: string;
|
|
25
|
+
padding?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface TableRowProps {
|
|
29
|
+
extraStyles?: string;
|
|
30
|
+
hoverCursor?: boolean;
|
|
31
|
+
hoverEffect?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const Table: React.FC<Expand<TableProps> &
|
|
35
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
36
|
+
|
|
37
|
+
export const TableBody: React.FC<Expand<TableBodyProps> &
|
|
38
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
39
|
+
|
|
40
|
+
export const TableCell: React.FC<Expand<TableCellProps> &
|
|
41
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
42
|
+
|
|
43
|
+
export const TableHead: React.FC<Expand<TableHeadProps> &
|
|
44
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
45
|
+
|
|
46
|
+
export const TableHeading: React.FC<Expand<TableHeadingProps> &
|
|
47
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
48
|
+
|
|
49
|
+
export const TableRow: React.FC<Expand<TableRowProps> &
|
|
50
|
+
React.HTMLAttributes<HTMLElement>>;
|
|
@@ -3,6 +3,6 @@ import TableBody from "./TableBody.styled";
|
|
|
3
3
|
import TableCell from "./TableCell.styled";
|
|
4
4
|
import TableHead from "./TableHead";
|
|
5
5
|
import TableHeading from "./TableHeading.styled";
|
|
6
|
-
import TableRow from "./TableRow
|
|
6
|
+
import TableRow from "./TableRow";
|
|
7
7
|
|
|
8
8
|
export { Table, TableBody, TableCell, TableHead, TableHeading, TableRow };
|