playbook_ui 13.19.0.pre.alpha.PBNTR211tablekitsubcomponentsreact2318 → 13.19.0.pre.alpha.play1141iconkitusinglibrary2264
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/index.js +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +4 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +67 -99
- data/app/pb_kits/playbook/pb_table/_table_row.tsx +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.jsx +25 -24
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_table/styles/_content.scss +3 -3
- data/app/pb_kits/playbook/pb_table/styles/_desktop_collapse.scss +15 -15
- data/app/pb_kits/playbook/pb_table/styles/_headers.scss +3 -3
- data/app/pb_kits/playbook/pb_table/styles/_hover.scss +11 -11
- data/app/pb_kits/playbook/pb_table/styles/_mobile.scss +15 -15
- data/app/pb_kits/playbook/pb_table/styles/_mobile_collapse.scss +15 -15
- data/app/pb_kits/playbook/pb_table/styles/_reset.scss +3 -3
- data/app/pb_kits/playbook/pb_table/styles/_side_highlight.scss +2 -2
- data/app/pb_kits/playbook/pb_table/styles/_single-line.scss +4 -4
- data/app/pb_kits/playbook/pb_table/styles/_sticky_header.scss +2 -2
- data/app/pb_kits/playbook/pb_table/styles/_striped.scss +4 -4
- data/app/pb_kits/playbook/pb_table/styles/_structure.scss +8 -22
- data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +7 -7
- data/app/pb_kits/playbook/pb_table/styles/_table-dark.scss +14 -14
- data/app/pb_kits/playbook/pb_table/styles/_table_header.scss +2 -2
- data/app/pb_kits/playbook/pb_table/styles/_tablet_collapse.scss +15 -15
- data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +4 -3
- data/app/pb_kits/playbook/pb_table/table.html.erb +2 -12
- data/app/pb_kits/playbook/pb_table/table.rb +0 -3
- data/app/pb_kits/playbook/pb_table/table.test.js +1 -142
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +39 -49
- data/app/pb_kits/playbook/pb_table/table_header.rb +1 -8
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +7 -17
- data/app/pb_kits/playbook/pb_table/table_row.rb +1 -8
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/version.rb +1 -1
- metadata +3 -20
- data/app/pb_kits/playbook/pb_table/SubKits/_table_body.tsx +0 -64
- data/app/pb_kits/playbook/pb_table/SubKits/_table_cell.tsx +0 -66
- data/app/pb_kits/playbook/pb_table/SubKits/_table_head.tsx +0 -64
- data/app/pb_kits/playbook/pb_table/SubKits/_table_header.tsx +0 -66
- data/app/pb_kits/playbook/pb_table/SubKits/_table_row.tsx +0 -74
- data/app/pb_kits/playbook/pb_table/SubKits/index.tsx +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_div.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_div.jsx +0 -47
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.jsx +0 -47
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.jsx +0 -48
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_body.rb +0 -15
- data/app/pb_kits/playbook/pb_table/table_cell.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_cell.rb +0 -17
- data/app/pb_kits/playbook/pb_table/table_head.html.erb +0 -17
- data/app/pb_kits/playbook/pb_table/table_head.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc85d46bc740674b47dbae257e9c81833befa30e371132c6b8c666e5b9085d10
|
4
|
+
data.tar.gz: e5f9fddaf77380e589222c5a5a5b7d4f6113a3b972daf02d8b5a5a2428056111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 873f1d7fd3362e9e8825e9565864de562f7df6a3867f872f34e937ad494595ff9741534192c545f28673e0ce2f6790483eb4a059fc733393dfe1342663f95a59
|
7
|
+
data.tar.gz: 0b5450fc7b8d3311f2d1ae1d6f1923d3aaee4c4c5267daab6080e535fa88dec66695131ea87e28f95f8ee20cfd7bd6e8891e4c902b96421dfbd4a6de30d6f113
|
@@ -93,7 +93,7 @@ export { default as StarRating } from './pb_star_rating/_star_rating'
|
|
93
93
|
export { default as StatChange } from './pb_stat_change/_stat_change'
|
94
94
|
export { default as StatValue } from './pb_stat_value/_stat_value'
|
95
95
|
export { default as Table } from './pb_table/_table'
|
96
|
-
export { default as TableRow } from './pb_table/
|
96
|
+
export { default as TableRow } from './pb_table/_table_row'
|
97
97
|
export { default as TextInput } from './pb_text_input/_text_input'
|
98
98
|
export { default as Textarea } from './pb_textarea/_textarea'
|
99
99
|
export { default as Time } from './pb_time/_time'
|
@@ -20,7 +20,7 @@ import AdvancedTableContext from "./Context/AdvancedTableContext";
|
|
20
20
|
import { TableHeader } from "./SubKits/TableHeader";
|
21
21
|
import { TableBody } from "./SubKits/TableBody";
|
22
22
|
|
23
|
-
import { DataType } from "./Utilities/types";
|
23
|
+
import { DataType, ExpandedStateObject } from "./Utilities/types";
|
24
24
|
|
25
25
|
type AdvancedTableProps = {
|
26
26
|
aria?: { [key: string]: string };
|
@@ -80,7 +80,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
80
80
|
? expandedControl.onChange
|
81
81
|
: setLocalExpanded;
|
82
82
|
|
83
|
-
const columnHelper = createColumnHelper();
|
83
|
+
const columnHelper = createColumnHelper<DataType>();
|
84
84
|
|
85
85
|
//Create cells for first columns
|
86
86
|
const createCellFunction = (cellAccessors: string[]) => {
|
@@ -163,7 +163,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
163
163
|
data: loading ? Array(loadingStateRowCount).fill({}) : tableData,
|
164
164
|
columns,
|
165
165
|
onExpandedChange: setExpanded,
|
166
|
-
getSubRows: (row
|
166
|
+
getSubRows: (row) => row.children,
|
167
167
|
getCoreRowModel: getCoreRowModel(),
|
168
168
|
getExpandedRowModel: getExpandedRowModel(),
|
169
169
|
getSortedRowModel: getSortedRowModel(),
|
@@ -192,7 +192,7 @@ const AdvancedTable = (props: AdvancedTableProps) => {
|
|
192
192
|
const handleExpandOrCollapse = (row: Row<DataType>) => {
|
193
193
|
onToggleExpansionClick && onToggleExpansionClick(row);
|
194
194
|
|
195
|
-
const expandedState = expanded;
|
195
|
+
const expandedState = expanded as ExpandedStateObject;
|
196
196
|
const targetParent = row?.parentId;
|
197
197
|
return setExpanded(
|
198
198
|
updateExpandAndCollapseState(tableRows, expandedState, targetParent)
|
@@ -3,69 +3,69 @@ import classnames from 'classnames'
|
|
3
3
|
import { buildAriaProps, buildDataProps, buildHtmlProps } from '../utilities/props'
|
4
4
|
import { globalProps, GlobalProps } from '../utilities/globalProps'
|
5
5
|
import PbTable from '.'
|
6
|
-
import {
|
7
|
-
TableHead,
|
8
|
-
TableHeader,
|
9
|
-
TableBody,
|
10
|
-
TableRow,
|
11
|
-
TableCell,
|
12
|
-
} from "./SubKits";
|
13
6
|
|
14
7
|
type TableProps = {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
verticalBorder?: boolean,
|
8
|
+
aria?: { [key: string]: string },
|
9
|
+
children: React.ReactNode[] | React.ReactNode,
|
10
|
+
className: string,
|
11
|
+
collapse?: "sm" | "md" | "lg",
|
12
|
+
container?: boolean,
|
13
|
+
dark?: boolean,
|
14
|
+
data?: { [key: string]: string },
|
15
|
+
dataTable: boolean,
|
16
|
+
disableHover?: boolean,
|
17
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
18
|
+
id?: string,
|
19
|
+
responsive?: "collapse" | "scroll" | "none",
|
20
|
+
singleLine?: boolean,
|
21
|
+
size?: "sm" | "md" | "lg",
|
22
|
+
sticky?: boolean,
|
23
|
+
striped?: boolean,
|
24
|
+
verticalBorder?: boolean,
|
33
25
|
} & GlobalProps
|
34
26
|
|
35
27
|
const Table = (props: TableProps) => {
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
} = props
|
28
|
+
const {
|
29
|
+
aria = {},
|
30
|
+
children,
|
31
|
+
className,
|
32
|
+
collapse = 'sm',
|
33
|
+
container = true,
|
34
|
+
dark,
|
35
|
+
data = {},
|
36
|
+
dataTable = false,
|
37
|
+
disableHover = false,
|
38
|
+
htmlOptions = {},
|
39
|
+
id,
|
40
|
+
responsive = 'collapse',
|
41
|
+
singleLine = false,
|
42
|
+
size = 'sm',
|
43
|
+
sticky = false,
|
44
|
+
striped = false,
|
45
|
+
verticalBorder = false,
|
46
|
+
} = props
|
56
47
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
const isTableTag = tag === 'table'
|
48
|
+
const ariaProps = buildAriaProps(aria)
|
49
|
+
const dataProps = buildDataProps(data)
|
50
|
+
const htmlProps = buildHtmlProps(htmlOptions)
|
51
|
+
const tableCollapseCss = responsive !== 'none' ? `table-collapse-${collapse}` : ''
|
52
|
+
const verticalBorderCss = verticalBorder ? 'vertical-border' : ''
|
63
53
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
54
|
+
useEffect(() => {
|
55
|
+
const instance = new PbTable()
|
56
|
+
instance.connect()
|
57
|
+
}, [])
|
58
|
+
|
59
|
+
return (
|
60
|
+
<table
|
61
|
+
{...ariaProps}
|
62
|
+
{...dataProps}
|
63
|
+
{...htmlProps}
|
64
|
+
className={classnames(
|
65
|
+
'pb_table',
|
66
|
+
`table-${size}`,
|
67
|
+
`table-responsive-${responsive}`,
|
68
|
+
{
|
69
69
|
'table-card': container,
|
70
70
|
'table-dark': dark,
|
71
71
|
'data_table': dataTable,
|
@@ -73,49 +73,17 @@ const Table = (props: TableProps) => {
|
|
73
73
|
'no-hover': disableHover,
|
74
74
|
'sticky-header': sticky,
|
75
75
|
'striped': striped,
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
return (
|
89
|
-
<>
|
90
|
-
{isTableTag ? (
|
91
|
-
<table
|
92
|
-
{...ariaProps}
|
93
|
-
{...dataProps}
|
94
|
-
{...htmlProps}
|
95
|
-
className={classNames}
|
96
|
-
id={id}
|
97
|
-
>
|
98
|
-
{children}
|
99
|
-
</table>
|
100
|
-
) : (
|
101
|
-
<div
|
102
|
-
{...ariaProps}
|
103
|
-
{...dataProps}
|
104
|
-
{...htmlProps}
|
105
|
-
className={classNames}
|
106
|
-
id={id}
|
107
|
-
>
|
108
|
-
{children}
|
109
|
-
</div>
|
110
|
-
)}
|
111
|
-
</>
|
112
|
-
)
|
76
|
+
},
|
77
|
+
globalProps(props),
|
78
|
+
tableCollapseCss,
|
79
|
+
verticalBorderCss,
|
80
|
+
className
|
81
|
+
)}
|
82
|
+
id={id}
|
83
|
+
>
|
84
|
+
{children}
|
85
|
+
</table>
|
86
|
+
)
|
113
87
|
}
|
114
88
|
|
115
|
-
Table.Head = TableHead
|
116
|
-
Table.Header = TableHeader
|
117
|
-
Table.Body = TableBody
|
118
|
-
Table.Row = TableRow
|
119
|
-
Table.Cell = TableCell
|
120
|
-
|
121
89
|
export default Table
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import classnames from 'classnames'
|
3
|
+
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
4
|
+
import { globalProps } from '../utilities/globalProps'
|
5
|
+
|
6
|
+
type TableRowPropTypes = {
|
7
|
+
aria?: { [key: string]: string },
|
8
|
+
children: React.ReactNode[] | React.ReactNode,
|
9
|
+
className: string,
|
10
|
+
data?: { [key: string]: string },
|
11
|
+
htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
|
12
|
+
id?: string,
|
13
|
+
sideHighlightColor: string,
|
14
|
+
}
|
15
|
+
|
16
|
+
const TableRow = (props: TableRowPropTypes) => {
|
17
|
+
const {
|
18
|
+
aria = {},
|
19
|
+
children,
|
20
|
+
className,
|
21
|
+
data = {},
|
22
|
+
htmlOptions = {},
|
23
|
+
id,
|
24
|
+
sideHighlightColor = 'windows',
|
25
|
+
} = props
|
26
|
+
|
27
|
+
const ariaProps = buildAriaProps(aria)
|
28
|
+
const dataProps = buildDataProps(data)
|
29
|
+
const htmlProps = buildHtmlProps(htmlOptions)
|
30
|
+
const sideHighlightClass =
|
31
|
+
sideHighlightColor != '' ? `side_highlight_${sideHighlightColor}` : null
|
32
|
+
const classes = classnames(buildCss('pb_table_row_kit', sideHighlightClass), globalProps(props), className)
|
33
|
+
|
34
|
+
return (
|
35
|
+
<tr
|
36
|
+
{...ariaProps}
|
37
|
+
{...dataProps}
|
38
|
+
{...htmlProps}
|
39
|
+
className={classes}
|
40
|
+
id={id}
|
41
|
+
>
|
42
|
+
{children}
|
43
|
+
</tr>
|
44
|
+
)
|
45
|
+
}
|
46
|
+
|
47
|
+
export default TableRow
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
|
3
3
|
import Table from '../_table'
|
4
|
+
import TableRow from '../_table_row'
|
4
5
|
|
5
6
|
const TableSideHighlight = (props) => {
|
6
7
|
return (
|
@@ -19,7 +20,7 @@ const TableSideHighlight = (props) => {
|
|
19
20
|
</tr>
|
20
21
|
</thead>
|
21
22
|
<tbody>
|
22
|
-
<
|
23
|
+
<TableRow
|
23
24
|
sideHighlightColor="product_1_highlight"
|
24
25
|
{...props}
|
25
26
|
>
|
@@ -28,8 +29,8 @@ const TableSideHighlight = (props) => {
|
|
28
29
|
<td>{'Value 3'}</td>
|
29
30
|
<td>{'Value 4'}</td>
|
30
31
|
<td>{'Value 5'}</td>
|
31
|
-
</
|
32
|
-
<
|
32
|
+
</TableRow>
|
33
|
+
<TableRow
|
33
34
|
sideHighlightColor="product_2_highlight"
|
34
35
|
{...props}
|
35
36
|
>
|
@@ -38,8 +39,8 @@ const TableSideHighlight = (props) => {
|
|
38
39
|
<td>{'Value 3'}</td>
|
39
40
|
<td>{'Value 4'}</td>
|
40
41
|
<td>{'Value 5'}</td>
|
41
|
-
</
|
42
|
-
<
|
42
|
+
</TableRow>
|
43
|
+
<TableRow
|
43
44
|
sideHighlightColor="product_3_highlight"
|
44
45
|
{...props}
|
45
46
|
>
|
@@ -48,8 +49,8 @@ const TableSideHighlight = (props) => {
|
|
48
49
|
<td>{'Value 3'}</td>
|
49
50
|
<td>{'Value 4'}</td>
|
50
51
|
<td>{'Value 5'}</td>
|
51
|
-
</
|
52
|
-
<
|
52
|
+
</TableRow>
|
53
|
+
<TableRow
|
53
54
|
sideHighlightColor="none"
|
54
55
|
{...props}
|
55
56
|
>
|
@@ -58,7 +59,7 @@ const TableSideHighlight = (props) => {
|
|
58
59
|
<td>{'Value 3'}</td>
|
59
60
|
<td>{'Value 4'}</td>
|
60
61
|
<td>{'Value 5'}</td>
|
61
|
-
</
|
62
|
+
</TableRow>
|
62
63
|
</tbody>
|
63
64
|
</Table>
|
64
65
|
|
@@ -78,7 +79,7 @@ const TableSideHighlight = (props) => {
|
|
78
79
|
</tr>
|
79
80
|
</thead>
|
80
81
|
<tbody>
|
81
|
-
<
|
82
|
+
<TableRow
|
82
83
|
sideHighlightColor="success"
|
83
84
|
{...props}
|
84
85
|
>
|
@@ -87,8 +88,8 @@ const TableSideHighlight = (props) => {
|
|
87
88
|
<td>{'Value 3'}</td>
|
88
89
|
<td>{'Value 4'}</td>
|
89
90
|
<td>{'Value 5'}</td>
|
90
|
-
</
|
91
|
-
<
|
91
|
+
</TableRow>
|
92
|
+
<TableRow
|
92
93
|
sideHighlightColor="warning"
|
93
94
|
{...props}
|
94
95
|
>
|
@@ -97,8 +98,8 @@ const TableSideHighlight = (props) => {
|
|
97
98
|
<td>{'Value 3'}</td>
|
98
99
|
<td>{'Value 4'}</td>
|
99
100
|
<td>{'Value 5'}</td>
|
100
|
-
</
|
101
|
-
<
|
101
|
+
</TableRow>
|
102
|
+
<TableRow
|
102
103
|
sideHighlightColor="error"
|
103
104
|
{...props}
|
104
105
|
>
|
@@ -107,8 +108,8 @@ const TableSideHighlight = (props) => {
|
|
107
108
|
<td>{'Value 3'}</td>
|
108
109
|
<td>{'Value 4'}</td>
|
109
110
|
<td>{'Value 5'}</td>
|
110
|
-
</
|
111
|
-
<
|
111
|
+
</TableRow>
|
112
|
+
<TableRow
|
112
113
|
sideHighlightColor="none"
|
113
114
|
{...props}
|
114
115
|
>
|
@@ -117,7 +118,7 @@ const TableSideHighlight = (props) => {
|
|
117
118
|
<td>{'Value 3'}</td>
|
118
119
|
<td>{'Value 4'}</td>
|
119
120
|
<td>{'Value 5'}</td>
|
120
|
-
</
|
121
|
+
</TableRow>
|
121
122
|
</tbody>
|
122
123
|
</Table>
|
123
124
|
|
@@ -137,7 +138,7 @@ const TableSideHighlight = (props) => {
|
|
137
138
|
</tr>
|
138
139
|
</thead>
|
139
140
|
<tbody>
|
140
|
-
<
|
141
|
+
<TableRow
|
141
142
|
sideHighlightColor="category_1"
|
142
143
|
{...props}
|
143
144
|
>
|
@@ -146,8 +147,8 @@ const TableSideHighlight = (props) => {
|
|
146
147
|
<td>{'Value 3'}</td>
|
147
148
|
<td>{'Value 4'}</td>
|
148
149
|
<td>{'Value 5'}</td>
|
149
|
-
</
|
150
|
-
<
|
150
|
+
</TableRow>
|
151
|
+
<TableRow
|
151
152
|
sideHighlightColor="category_2"
|
152
153
|
{...props}
|
153
154
|
>
|
@@ -156,8 +157,8 @@ const TableSideHighlight = (props) => {
|
|
156
157
|
<td>{'Value 3'}</td>
|
157
158
|
<td>{'Value 4'}</td>
|
158
159
|
<td>{'Value 5'}</td>
|
159
|
-
</
|
160
|
-
<
|
160
|
+
</TableRow>
|
161
|
+
<TableRow
|
161
162
|
sideHighlightColor="category_3"
|
162
163
|
{...props}
|
163
164
|
>
|
@@ -166,8 +167,8 @@ const TableSideHighlight = (props) => {
|
|
166
167
|
<td>{'Value 3'}</td>
|
167
168
|
<td>{'Value 4'}</td>
|
168
169
|
<td>{'Value 5'}</td>
|
169
|
-
</
|
170
|
-
<
|
170
|
+
</TableRow>
|
171
|
+
<TableRow
|
171
172
|
sideHighlightColor="none"
|
172
173
|
{...props}
|
173
174
|
>
|
@@ -176,7 +177,7 @@ const TableSideHighlight = (props) => {
|
|
176
177
|
<td>{'Value 3'}</td>
|
177
178
|
<td>{'Value 4'}</td>
|
178
179
|
<td>{'Value 5'}</td>
|
179
|
-
</
|
180
|
+
</TableRow>
|
180
181
|
</tbody>
|
181
182
|
</Table>
|
182
183
|
</div>
|
@@ -1,8 +1,5 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
|
-
- table_with_subcomponents: Table with Sub Components (Table Elements)
|
4
|
-
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
5
|
-
# - table_div: Div
|
6
3
|
- table_sm: Small
|
7
4
|
- table_md: Medium
|
8
5
|
- table_lg: Large
|
@@ -29,7 +26,6 @@ examples:
|
|
29
26
|
- table_striped: Striped Table
|
30
27
|
|
31
28
|
react:
|
32
|
-
# - table_div: Div
|
33
29
|
- table_sm: Small
|
34
30
|
- table_md: Medium
|
35
31
|
- table_lg: Large
|
@@ -53,6 +49,3 @@ examples:
|
|
53
49
|
- table_with_background_kit: Table With Background Kit
|
54
50
|
- table_vertical_border: Vertical Borders
|
55
51
|
- table_striped: Striped Table
|
56
|
-
- table_with_subcomponents: Table with Sub Components (Table Elements)
|
57
|
-
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
58
|
-
|
@@ -21,6 +21,3 @@ export { default as TableAlignmentShiftData } from './_table_alignment_shift_dat
|
|
21
21
|
export { default as TableWithBackgroundKit } from './_table_with_background_kit.jsx'
|
22
22
|
export { default as TableVerticalBorder } from './_table_vertical_border.jsx'
|
23
23
|
export { default as TableStriped } from './_table_striped.jsx'
|
24
|
-
export { default as TableDiv } from './_table_div.jsx'
|
25
|
-
export { default as TableWithSubcomponents } from './_table_with_subcomponents.jsx'
|
26
|
-
export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
|
@@ -10,21 +10,21 @@
|
|
10
10
|
width: 100%;
|
11
11
|
background: none !important;
|
12
12
|
|
13
|
-
thead
|
14
|
-
tr
|
13
|
+
thead {
|
14
|
+
tr {
|
15
15
|
left: $offscreen;
|
16
16
|
position: absolute;
|
17
17
|
top: $offscreen;
|
18
18
|
|
19
|
-
th
|
19
|
+
th {
|
20
20
|
display: block;
|
21
21
|
visibility: visible;
|
22
22
|
}
|
23
23
|
}
|
24
24
|
}
|
25
|
-
tbody
|
26
|
-
tr
|
27
|
-
td
|
25
|
+
tbody {
|
26
|
+
tr {
|
27
|
+
td {
|
28
28
|
display: block;
|
29
29
|
visibility: visible;
|
30
30
|
border-left-width: 1px !important;
|
@@ -63,7 +63,7 @@
|
|
63
63
|
}
|
64
64
|
|
65
65
|
&:first-child {
|
66
|
-
td
|
66
|
+
td {
|
67
67
|
&:first-child {
|
68
68
|
margin-top: $space-xs !important;
|
69
69
|
}
|
@@ -74,9 +74,9 @@
|
|
74
74
|
&.table-card {
|
75
75
|
background: none !important;
|
76
76
|
|
77
|
-
tbody
|
78
|
-
tr
|
79
|
-
td
|
77
|
+
tbody {
|
78
|
+
tr {
|
79
|
+
td {
|
80
80
|
background: $white !important;
|
81
81
|
border-left-width: 1px !important;
|
82
82
|
border-right-width: 1px !important;
|
@@ -98,8 +98,8 @@
|
|
98
98
|
}
|
99
99
|
@media (hover:hover) {
|
100
100
|
&:hover {
|
101
|
-
tbody
|
102
|
-
tr
|
101
|
+
tbody {
|
102
|
+
tr {
|
103
103
|
box-shadow: 0 0 0 $white !important;
|
104
104
|
}
|
105
105
|
}
|
@@ -108,9 +108,9 @@
|
|
108
108
|
// reset the first and last to normalize
|
109
109
|
@each $name, $value in $cell-pad-list {
|
110
110
|
&.#{$name} {
|
111
|
-
tbody
|
112
|
-
tr
|
113
|
-
td
|
111
|
+
tbody {
|
112
|
+
tr {
|
113
|
+
td {
|
114
114
|
&:first-child,
|
115
115
|
&:last-child {
|
116
116
|
padding: $value $cell-gutter !important;
|
@@ -9,17 +9,17 @@ $border_hover_color_dark: lighten($border_dark, 5%);
|
|
9
9
|
&.table-lg {
|
10
10
|
&:not(.no-hover) {
|
11
11
|
border-collapse: collapse;
|
12
|
-
tbody
|
13
|
-
tr
|
12
|
+
tbody {
|
13
|
+
tr {
|
14
14
|
box-shadow: 0 0 0 $white;
|
15
15
|
transition: box-shadow $transition-speed ease;
|
16
|
-
td
|
16
|
+
td {
|
17
17
|
border-top-color: transparent;
|
18
18
|
border-top-width: 0;
|
19
19
|
transition: all $transition-speed ease;
|
20
20
|
}
|
21
21
|
@media (hover:hover) {
|
22
|
-
td
|
22
|
+
td {
|
23
23
|
position: relative;
|
24
24
|
&:after {
|
25
25
|
transition: background-color $transition-speed ease, height $transition-speed ease;
|
@@ -41,7 +41,7 @@ $border_hover_color_dark: lighten($border_dark, 5%);
|
|
41
41
|
}
|
42
42
|
&:hover {
|
43
43
|
box-shadow: 0 2px 10px 0 rgba($slate, $opacity-6);
|
44
|
-
td
|
44
|
+
td {
|
45
45
|
border-color: darken($border_light, 10%);
|
46
46
|
border-top-width: 0;
|
47
47
|
border-top-color: transparent;
|
@@ -57,9 +57,9 @@ $border_hover_color_dark: lighten($border_dark, 5%);
|
|
57
57
|
}
|
58
58
|
&.table-card {
|
59
59
|
border-collapse: separate;
|
60
|
-
tbody
|
61
|
-
tr
|
62
|
-
td
|
60
|
+
tbody {
|
61
|
+
tr {
|
62
|
+
td {
|
63
63
|
&:first-child {
|
64
64
|
border-left-width: 1px;
|
65
65
|
}
|
@@ -72,12 +72,12 @@ $border_hover_color_dark: lighten($border_dark, 5%);
|
|
72
72
|
}
|
73
73
|
|
74
74
|
&.dark {
|
75
|
-
tbody
|
76
|
-
tr
|
75
|
+
tbody {
|
76
|
+
tr {
|
77
77
|
@media (hover:hover) {
|
78
78
|
&:hover {
|
79
79
|
box-shadow: 0 2px 10px 0 $shadow_dark;
|
80
|
-
td
|
80
|
+
td {
|
81
81
|
border-top-width: 0;
|
82
82
|
border-top-color: transparent;
|
83
83
|
border-color: $border_hover_color_dark !important;
|