playbook_ui_docs 13.19.0.pre.alpha.PBNTR207tabledivsupport2245 → 13.19.0.pre.alpha.PBNTR211tablekitsubcomponentsreact2318
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.md +1 -1
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +5 -11
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.jsx +44 -18
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.md +4 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_div.html.erb +26 -26
- data/app/pb_kits/playbook/pb_table/docs/_table_div.jsx +27 -26
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.jsx +24 -25
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents.jsx +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_subcomponents_as_divs.jsx +48 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +7 -2
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/dist/playbook-doc.js +10 -10
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 639d8add731fcd49d52b2b886e59010f149d8885556a6929335d13987ff2b22d
|
4
|
+
data.tar.gz: 4e76cf73da05763edf436140d195fabd9a1a2650c845ee0b759b369edf87ba4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a77069196e4316d1b468665a3a533a7854fb1bcfa4a31208af840055939d40ba393522a01d7ef0d4f4a18b9abd016b76b782bfcacb1c65b585a3b8946846464b
|
7
|
+
data.tar.gz: fbbd0b7de851e91b4cbce7c8c5752db0737945f53dc669d791972ae8ab17838e685fc784fcf98b9a2769b531d5f7aea04da2fc0925327313045fdce5d6ae8d3e
|
@@ -1 +1 @@
|
|
1
|
-
`collapsibleTrail` is an optional prop that is set to 'true' by default. If set to 'false', it will remove the trail on the left of rows when subRows are toggled open.
|
1
|
+
`collapsibleTrail` is an optional prop that is set to 'true' by default. If set to 'false', it will remove the trail on the left of the rows when subRows are toggled open.
|
@@ -8,7 +8,7 @@ For a visual of the data structure needed for `tableData`, see [here](https://gi
|
|
8
8
|
|
9
9
|
### columnDefinitions
|
10
10
|
|
11
|
-
`columnDefinitions` maps to the columns prop on the Tanstack table. Column definitions are the single most important part of building a table as they are responsible for building the underlying data model that is used for all sorting, expansion, etc. `ColumnDefinitions` in the AdvancedTable kit is
|
11
|
+
`columnDefinitions` maps to the columns prop on the Tanstack table. Column definitions are the single most important part of building a table as they are responsible for building the underlying data model that is used for all sorting, expansion, etc. `ColumnDefinitions` in the AdvancedTable kit is an array of objects as seen in the code snippet below. Each object within the array has two REQUIRED items:
|
12
12
|
|
13
13
|
- `accessor`: this is the key from your data for the value you want rendered in that column
|
14
14
|
- `label`: this is what will be rendered as the column header label
|
@@ -1,3 +1,3 @@
|
|
1
1
|
the optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
|
2
2
|
|
3
|
-
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to
|
3
|
+
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
|
@@ -1,3 +1,3 @@
|
|
1
1
|
`subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
|
2
2
|
|
3
|
-
`enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all'
|
3
|
+
`enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all', 'header" or "none". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'header' by default.
|
@@ -1,3 +1,3 @@
|
|
1
1
|
The Tanstack table consumes the useReactTable hook to create the table. This hook takes an object that can contain any of the functions that the Tanstack table provides. The advancedTable's optional `tableOptions` can be used to pass tanstack options to the kit.
|
2
2
|
|
3
|
-
In the above example, we are using the initialState option provided by tanstack that takes sort as one of it's values. Setting it to true for the first column is reversing the sort order on first render of the table. For a complete list of possible options and
|
3
|
+
In the above example, we are using the initialState option provided by tanstack that takes sort as one of it's values. Setting it to true for the first column is reversing the sort order on first render of the table. For a complete list of possible options and how to use them, see [here](https://tanstack.com/table/v8/docs/api/core/table#usereacttable--createsolidtable--usevuetable--createsveltetable)
|
@@ -2,15 +2,9 @@
|
|
2
2
|
<div class="icon-wrapper">
|
3
3
|
|
4
4
|
<% svg_url = "https://upload.wikimedia.org/wikipedia/commons/3/3b/Wrench_font_awesome.svg" %>
|
5
|
-
<p><%= pb_rails("icon", props: {
|
6
|
-
<p><%= pb_rails("icon", props: { rotation: 90,
|
7
|
-
<p><%= pb_rails("icon", props: { spin: true,
|
8
|
-
<p><%= pb_rails("icon", props: { size: "5x",
|
9
|
-
<p><%= pb_rails("icon", props: { flip: "horizontal", size: "5x",
|
10
|
-
|
11
|
-
<%= pb_rails("body", props: {
|
12
|
-
text: "Custom icons are compatible with other icon props (size, rotation,
|
13
|
-
spin, flip, etc). Their SVG fill colors will be inherited from
|
14
|
-
parent element's css color properties."
|
15
|
-
} ) %>
|
5
|
+
<p><%= pb_rails("icon", props: { icon: svg_url } ) %></p>
|
6
|
+
<p><%= pb_rails("icon", props: { rotation: 90, icon: svg_url, size: "2x" } ) %></p>
|
7
|
+
<p><%= pb_rails("icon", props: { spin: true, icon: svg_url, size: "3x" } ) %></p>
|
8
|
+
<p><%= pb_rails("icon", props: { size: "5x", icon: svg_url } ) %></p>
|
9
|
+
<p><%= pb_rails("icon", props: { flip: "horizontal", size: "5x", icon: svg_url } ) %></p>
|
16
10
|
</div>
|
@@ -1,33 +1,59 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { Icon } from '../../'
|
3
3
|
|
4
|
-
// import Icons as config from 'power-icons'
|
5
4
|
const config = {
|
6
|
-
|
7
|
-
<svg
|
8
|
-
ariaHidden="true"
|
9
|
-
focusable="false"
|
10
|
-
role="img"
|
11
|
-
viewBox="0 0 512 512"
|
5
|
+
icon: (
|
6
|
+
<svg viewBox="0 -256 1792 1792"
|
12
7
|
xmlns="http://www.w3.org/2000/svg"
|
13
8
|
>
|
14
|
-
<
|
15
|
-
d="
|
16
|
-
|
17
|
-
/>
|
9
|
+
<g transform="matrix(1,0,0,-1,53.152542,1217.0847)">
|
10
|
+
<path d="m 384,64 q 0,26 -19,45 -19,19 -45,19 -26,0 -45,-19 -19,-19 -19,-45 0,-26 19,-45 19,-19 45,-19 26,0 45,19 19,19 19,45 z m 644,420 -682,-682 q -37,-37 -90,-37 -52,0 -91,37 L 59,-90 Q 21,-54 21,0 21,53 59,91 L 740,772 Q 779,674 854.5,598.5 930,523 1028,484 z m 634,435 q 0,-39 -23,-106 Q 1592,679 1474.5,595.5 1357,512 1216,512 1031,512 899.5,643.5 768,775 768,960 q 0,185 131.5,316.5 131.5,131.5 316.5,131.5 58,0 121.5,-16.5 63.5,-16.5 107.5,-46.5 16,-11 16,-28 0,-17 -16,-28 L 1152,1120 V 896 l 193,-107 q 5,3 79,48.5 74,45.5 135.5,81 61.5,35.5 70.5,35.5 15,0 23.5,-10 8.5,-10 8.5,-25 z" />
|
11
|
+
</g>
|
18
12
|
</svg>
|
19
13
|
),
|
20
14
|
}
|
21
15
|
|
22
16
|
const IconCustom = (props) => {
|
23
17
|
return (
|
24
|
-
<
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
18
|
+
<React.Fragment>
|
19
|
+
<p>
|
20
|
+
<Icon
|
21
|
+
icon={config.icon}
|
22
|
+
{...props}
|
23
|
+
/>
|
24
|
+
</p>
|
25
|
+
<p>
|
26
|
+
<Icon
|
27
|
+
icon={config.icon}
|
28
|
+
rotation={90}
|
29
|
+
size="2x"
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
</p>
|
33
|
+
<p>
|
34
|
+
<Icon
|
35
|
+
icon={config.icon}
|
36
|
+
size="3x"
|
37
|
+
spin
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
</p>
|
41
|
+
<p>
|
42
|
+
<Icon
|
43
|
+
icon={config.icon}
|
44
|
+
size="5x"
|
45
|
+
{...props}
|
46
|
+
/>
|
47
|
+
</p>
|
48
|
+
<p>
|
49
|
+
<Icon
|
50
|
+
flip="horizontal"
|
51
|
+
icon={config.icon}
|
52
|
+
size="5x"
|
53
|
+
{...props}
|
54
|
+
/>
|
55
|
+
</p>
|
56
|
+
</React.Fragment>
|
31
57
|
)
|
32
58
|
}
|
33
59
|
|
@@ -4,16 +4,12 @@ When using custom icons it is important to introduce a "clean" SVG. In order to
|
|
4
4
|
|
5
5
|
Attributes must be React compatible e.g. <code>xmlns:xlink</code> should be <code>xmlnsXlink</code> and so on. <strong>There should be no hyphenated attributes and no semi-colons!.</strong>
|
6
6
|
|
7
|
-
Fill colors with regards to <code>g</code> or <code>path</code> nodes, e.g. <code>fill="black"</code>, should be replaced with
|
7
|
+
Fill colors with regards to <code>g</code> or <code>path</code> nodes, e.g. <code>fill="black"</code>, should be replaced with <code>currentColor</code> ala <code>fill="currentColor"</code>. Your mileage may vary depending on the complexity of your SVG.
|
8
8
|
|
9
|
-
Pay attention to your custom icon's dimensions and `viewBox` attribute. It is best to use a `viewBox="0 0 512 512"` starting point
|
9
|
+
Pay attention to your custom icon's dimensions and `viewBox` attribute. It is best to use a `viewBox="0 0 512 512"` starting point **when designing instead of trying to retrofit the viewbox afterwards**!
|
10
10
|
|
11
|
-
You must source
|
12
|
-
|
13
|
-
### React
|
14
|
-
|
15
|
-
So long as you have a valid React `<SVG>` node, you can send it as the `customIcon` prop and the kit will take care of the rest.
|
11
|
+
You must source _your own SVG into component/view_ you are working on. This can easily be done in programmatic and maintainable ways.
|
16
12
|
|
17
13
|
### Rails
|
18
14
|
|
19
|
-
|
15
|
+
Sending the absolute path to the `icon` prop results in an `<SVG>` tag within the working view.
|
@@ -1,34 +1,34 @@
|
|
1
1
|
<%= pb_rails("table", props: { size: "sm", tag: "div" }) do %>
|
2
|
-
<div class="
|
3
|
-
<div class="
|
4
|
-
<div class="
|
5
|
-
<div class="
|
6
|
-
<div class="
|
7
|
-
<div class="
|
8
|
-
<div class="
|
2
|
+
<div class="pb_table_thead">
|
3
|
+
<div class="pb_table_tr">
|
4
|
+
<div class="pb_table_th">Column 1</div>
|
5
|
+
<div class="pb_table_th">Column 2</div>
|
6
|
+
<div class="pb_table_th">Column 3</div>
|
7
|
+
<div class="pb_table_th">Column 4</div>
|
8
|
+
<div class="pb_table_th">Column 5</div>
|
9
9
|
</div>
|
10
10
|
</div>
|
11
|
-
<div class="
|
12
|
-
<div class="
|
13
|
-
<div class="
|
14
|
-
<div class="
|
15
|
-
<div class="
|
16
|
-
<div class="
|
17
|
-
<div class="
|
11
|
+
<div class="pb_table_tbody">
|
12
|
+
<div class="pb_table_tr">
|
13
|
+
<div class="pb_table_td">Value 1</div>
|
14
|
+
<div class="pb_table_td">Value 2</div>
|
15
|
+
<div class="pb_table_td">Value 3</div>
|
16
|
+
<div class="pb_table_td">Value 4</div>
|
17
|
+
<div class="pb_table_td">Value 5</div>
|
18
18
|
</div>
|
19
|
-
<div class="
|
20
|
-
<div class="
|
21
|
-
<div class="
|
22
|
-
<div class="
|
23
|
-
<div class="
|
24
|
-
<div class="
|
19
|
+
<div class="pb_table_tr">
|
20
|
+
<div class="pb_table_td">Value 1</div>
|
21
|
+
<div class="pb_table_td">Value 2</div>
|
22
|
+
<div class="pb_table_td">Value 3</div>
|
23
|
+
<div class="pb_table_td">Value 4</div>
|
24
|
+
<div class="pb_table_td">Value 5</div>
|
25
25
|
</div>
|
26
|
-
<div class="
|
27
|
-
<div class="
|
28
|
-
<div class="
|
29
|
-
<div class="
|
30
|
-
<div class="
|
31
|
-
<div class="
|
26
|
+
<div class="pb_table_tr">
|
27
|
+
<div class="pb_table_td">Value 1</div>
|
28
|
+
<div class="pb_table_td">Value 2</div>
|
29
|
+
<div class="pb_table_td">Value 3</div>
|
30
|
+
<div class="pb_table_td">Value 4</div>
|
31
|
+
<div class="pb_table_td">Value 5</div>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
<% end %>
|
@@ -5,38 +5,39 @@ const TableDiv = (props) => {
|
|
5
5
|
return (
|
6
6
|
<Table
|
7
7
|
size="sm"
|
8
|
+
tag="div"
|
8
9
|
{...props}
|
9
10
|
>
|
10
|
-
<div className="
|
11
|
-
<div className="
|
12
|
-
<div className="
|
13
|
-
<div className="
|
14
|
-
<div className="
|
15
|
-
<div className="
|
16
|
-
<div className="
|
11
|
+
<div className="pb_table_thead">
|
12
|
+
<div className="pb_table_tr">
|
13
|
+
<div className="pb_table_th">{'Column 1'}</div>
|
14
|
+
<div className="pb_table_th">{'Column 2'}</div>
|
15
|
+
<div className="pb_table_th">{'Column 3'}</div>
|
16
|
+
<div className="pb_table_th">{'Column 4'}</div>
|
17
|
+
<div className="pb_table_th">{'Column 5'}</div>
|
17
18
|
</div>
|
18
19
|
</div>
|
19
|
-
<div className="
|
20
|
-
<div className="
|
21
|
-
<div className="
|
22
|
-
<div className="
|
23
|
-
<div className="
|
24
|
-
<div className="
|
25
|
-
<div className="
|
20
|
+
<div className="pb_table_tbody">
|
21
|
+
<div className="pb_table_tr">
|
22
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
23
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
24
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
25
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
26
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
26
27
|
</div>
|
27
|
-
<div className="
|
28
|
-
<div className="
|
29
|
-
<div className="
|
30
|
-
<div className="
|
31
|
-
<div className="
|
32
|
-
<div className="
|
28
|
+
<div className="pb_table_tr">
|
29
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
30
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
31
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
32
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
33
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
33
34
|
</div>
|
34
|
-
<div className="
|
35
|
-
<div className="
|
36
|
-
<div className="
|
37
|
-
<div className="
|
38
|
-
<div className="
|
39
|
-
<div className="
|
35
|
+
<div className="pb_table_tr">
|
36
|
+
<div className="pb_table_td">{'Value 1'}</div>
|
37
|
+
<div className="pb_table_td">{'Value 2'}</div>
|
38
|
+
<div className="pb_table_td">{'Value 3'}</div>
|
39
|
+
<div className="pb_table_td">{'Value 4'}</div>
|
40
|
+
<div className="pb_table_td">{'Value 5'}</div>
|
40
41
|
</div>
|
41
42
|
</div>
|
42
43
|
</Table>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
|
3
3
|
import Table from '../_table'
|
4
|
-
import TableRow from '../_table_row'
|
5
4
|
|
6
5
|
const TableSideHighlight = (props) => {
|
7
6
|
return (
|
@@ -20,7 +19,7 @@ const TableSideHighlight = (props) => {
|
|
20
19
|
</tr>
|
21
20
|
</thead>
|
22
21
|
<tbody>
|
23
|
-
<
|
22
|
+
<Table.Row
|
24
23
|
sideHighlightColor="product_1_highlight"
|
25
24
|
{...props}
|
26
25
|
>
|
@@ -29,8 +28,8 @@ const TableSideHighlight = (props) => {
|
|
29
28
|
<td>{'Value 3'}</td>
|
30
29
|
<td>{'Value 4'}</td>
|
31
30
|
<td>{'Value 5'}</td>
|
32
|
-
</
|
33
|
-
<
|
31
|
+
</Table.Row>
|
32
|
+
<Table.Row
|
34
33
|
sideHighlightColor="product_2_highlight"
|
35
34
|
{...props}
|
36
35
|
>
|
@@ -39,8 +38,8 @@ const TableSideHighlight = (props) => {
|
|
39
38
|
<td>{'Value 3'}</td>
|
40
39
|
<td>{'Value 4'}</td>
|
41
40
|
<td>{'Value 5'}</td>
|
42
|
-
</
|
43
|
-
<
|
41
|
+
</Table.Row>
|
42
|
+
<Table.Row
|
44
43
|
sideHighlightColor="product_3_highlight"
|
45
44
|
{...props}
|
46
45
|
>
|
@@ -49,8 +48,8 @@ const TableSideHighlight = (props) => {
|
|
49
48
|
<td>{'Value 3'}</td>
|
50
49
|
<td>{'Value 4'}</td>
|
51
50
|
<td>{'Value 5'}</td>
|
52
|
-
</
|
53
|
-
<
|
51
|
+
</Table.Row>
|
52
|
+
<Table.Row
|
54
53
|
sideHighlightColor="none"
|
55
54
|
{...props}
|
56
55
|
>
|
@@ -59,7 +58,7 @@ const TableSideHighlight = (props) => {
|
|
59
58
|
<td>{'Value 3'}</td>
|
60
59
|
<td>{'Value 4'}</td>
|
61
60
|
<td>{'Value 5'}</td>
|
62
|
-
</
|
61
|
+
</Table.Row>
|
63
62
|
</tbody>
|
64
63
|
</Table>
|
65
64
|
|
@@ -79,7 +78,7 @@ const TableSideHighlight = (props) => {
|
|
79
78
|
</tr>
|
80
79
|
</thead>
|
81
80
|
<tbody>
|
82
|
-
<
|
81
|
+
<Table.Row
|
83
82
|
sideHighlightColor="success"
|
84
83
|
{...props}
|
85
84
|
>
|
@@ -88,8 +87,8 @@ const TableSideHighlight = (props) => {
|
|
88
87
|
<td>{'Value 3'}</td>
|
89
88
|
<td>{'Value 4'}</td>
|
90
89
|
<td>{'Value 5'}</td>
|
91
|
-
</
|
92
|
-
<
|
90
|
+
</Table.Row>
|
91
|
+
<Table.Row
|
93
92
|
sideHighlightColor="warning"
|
94
93
|
{...props}
|
95
94
|
>
|
@@ -98,8 +97,8 @@ const TableSideHighlight = (props) => {
|
|
98
97
|
<td>{'Value 3'}</td>
|
99
98
|
<td>{'Value 4'}</td>
|
100
99
|
<td>{'Value 5'}</td>
|
101
|
-
</
|
102
|
-
<
|
100
|
+
</Table.Row>
|
101
|
+
<Table.Row
|
103
102
|
sideHighlightColor="error"
|
104
103
|
{...props}
|
105
104
|
>
|
@@ -108,8 +107,8 @@ const TableSideHighlight = (props) => {
|
|
108
107
|
<td>{'Value 3'}</td>
|
109
108
|
<td>{'Value 4'}</td>
|
110
109
|
<td>{'Value 5'}</td>
|
111
|
-
</
|
112
|
-
<
|
110
|
+
</Table.Row>
|
111
|
+
<Table.Row
|
113
112
|
sideHighlightColor="none"
|
114
113
|
{...props}
|
115
114
|
>
|
@@ -118,7 +117,7 @@ const TableSideHighlight = (props) => {
|
|
118
117
|
<td>{'Value 3'}</td>
|
119
118
|
<td>{'Value 4'}</td>
|
120
119
|
<td>{'Value 5'}</td>
|
121
|
-
</
|
120
|
+
</Table.Row>
|
122
121
|
</tbody>
|
123
122
|
</Table>
|
124
123
|
|
@@ -138,7 +137,7 @@ const TableSideHighlight = (props) => {
|
|
138
137
|
</tr>
|
139
138
|
</thead>
|
140
139
|
<tbody>
|
141
|
-
<
|
140
|
+
<Table.Row
|
142
141
|
sideHighlightColor="category_1"
|
143
142
|
{...props}
|
144
143
|
>
|
@@ -147,8 +146,8 @@ const TableSideHighlight = (props) => {
|
|
147
146
|
<td>{'Value 3'}</td>
|
148
147
|
<td>{'Value 4'}</td>
|
149
148
|
<td>{'Value 5'}</td>
|
150
|
-
</
|
151
|
-
<
|
149
|
+
</Table.Row>
|
150
|
+
<Table.Row
|
152
151
|
sideHighlightColor="category_2"
|
153
152
|
{...props}
|
154
153
|
>
|
@@ -157,8 +156,8 @@ const TableSideHighlight = (props) => {
|
|
157
156
|
<td>{'Value 3'}</td>
|
158
157
|
<td>{'Value 4'}</td>
|
159
158
|
<td>{'Value 5'}</td>
|
160
|
-
</
|
161
|
-
<
|
159
|
+
</Table.Row>
|
160
|
+
<Table.Row
|
162
161
|
sideHighlightColor="category_3"
|
163
162
|
{...props}
|
164
163
|
>
|
@@ -167,8 +166,8 @@ const TableSideHighlight = (props) => {
|
|
167
166
|
<td>{'Value 3'}</td>
|
168
167
|
<td>{'Value 4'}</td>
|
169
168
|
<td>{'Value 5'}</td>
|
170
|
-
</
|
171
|
-
<
|
169
|
+
</Table.Row>
|
170
|
+
<Table.Row
|
172
171
|
sideHighlightColor="none"
|
173
172
|
{...props}
|
174
173
|
>
|
@@ -177,7 +176,7 @@ const TableSideHighlight = (props) => {
|
|
177
176
|
<td>{'Value 3'}</td>
|
178
177
|
<td>{'Value 4'}</td>
|
179
178
|
<td>{'Value 5'}</td>
|
180
|
-
</
|
179
|
+
</Table.Row>
|
181
180
|
</tbody>
|
182
181
|
</Table>
|
183
182
|
</div>
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
2
|
+
<%= pb_rails("table/table_head") do %>
|
3
|
+
<%= pb_rails("table/table_row") do %>
|
4
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
5
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
6
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
7
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
8
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<%= pb_rails("table/table_body") do %>
|
12
|
+
<%= pb_rails("table/table_row") do %>
|
13
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
14
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
15
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
16
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
17
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
18
|
+
<% end %>
|
19
|
+
<%= pb_rails("table/table_row") do %>
|
20
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
21
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
22
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
23
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
24
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
25
|
+
<% end %>
|
26
|
+
<%= pb_rails("table/table_row") do %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Table from '../_table'
|
4
|
+
|
5
|
+
const TableWithSubcomponents = (props) => {
|
6
|
+
return (
|
7
|
+
<Table
|
8
|
+
size="sm"
|
9
|
+
{...props}
|
10
|
+
>
|
11
|
+
<Table.Head>
|
12
|
+
<Table.Row>
|
13
|
+
<Table.Header>{'Column 1'}</Table.Header>
|
14
|
+
<Table.Header>{'Column 2'}</Table.Header>
|
15
|
+
<Table.Header>{'Column 3'}</Table.Header>
|
16
|
+
<Table.Header>{'Column 4'}</Table.Header>
|
17
|
+
<Table.Header>{'Column 5'}</Table.Header>
|
18
|
+
</Table.Row>
|
19
|
+
</Table.Head>
|
20
|
+
<Table.Body>
|
21
|
+
<Table.Row>
|
22
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
23
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
24
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
25
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
26
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
27
|
+
</Table.Row>
|
28
|
+
<Table.Row>
|
29
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
30
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
31
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
32
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
33
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
34
|
+
</Table.Row>
|
35
|
+
<Table.Row>
|
36
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
37
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
38
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
39
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
40
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
41
|
+
</Table.Row>
|
42
|
+
</Table.Body>
|
43
|
+
</Table>
|
44
|
+
)
|
45
|
+
}
|
46
|
+
|
47
|
+
export default TableWithSubcomponents
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= pb_rails("table", props: { size: "sm", tag:"div" }) do %>
|
2
|
+
<%= pb_rails("table/table_head", props: {tag:"div"}) do %>
|
3
|
+
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
4
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1", tag:"div"}) %>
|
5
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2", tag:"div"}) %>
|
6
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3", tag:"div"}) %>
|
7
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4", tag:"div"}) %>
|
8
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5", tag:"div"}) %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<%= pb_rails("table/table_body", props: {tag:"div"}) do %>
|
12
|
+
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
13
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1", tag:"div"}) %>
|
14
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2", tag:"div"}) %>
|
15
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3", tag:"div"}) %>
|
16
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4", tag:"div"}) %>
|
17
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5", tag:"div"}) %>
|
18
|
+
<% end %>
|
19
|
+
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
20
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1", tag:"div"}) %>
|
21
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2", tag:"div"}) %>
|
22
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3", tag:"div"}) %>
|
23
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4", tag:"div"}) %>
|
24
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5", tag:"div"}) %>
|
25
|
+
<% end %>
|
26
|
+
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1", tag:"div"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2", tag:"div"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3", tag:"div"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4", tag:"div"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5", tag:"div"}) %>
|
32
|
+
<% end %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Table from '../_table'
|
4
|
+
|
5
|
+
const TableWithSubcomponentsAsDivs = (props) => {
|
6
|
+
return (
|
7
|
+
<Table
|
8
|
+
size="sm"
|
9
|
+
tag="div"
|
10
|
+
{...props}
|
11
|
+
>
|
12
|
+
<Table.Head tag="div">
|
13
|
+
<Table.Row tag="div">
|
14
|
+
<Table.Header tag="div">{'Column 1'}</Table.Header>
|
15
|
+
<Table.Header tag="div">{'Column 2'}</Table.Header>
|
16
|
+
<Table.Header tag="div">{'Column 3'}</Table.Header>
|
17
|
+
<Table.Header tag="div">{'Column 4'}</Table.Header>
|
18
|
+
<Table.Header tag="div">{'Column 5'}</Table.Header>
|
19
|
+
</Table.Row>
|
20
|
+
</Table.Head>
|
21
|
+
<Table.Body tag="div">
|
22
|
+
<Table.Row tag="div">
|
23
|
+
<Table.Cell tag="div">{'Value 1'}</Table.Cell>
|
24
|
+
<Table.Cell tag="div">{'Value 2'}</Table.Cell>
|
25
|
+
<Table.Cell tag="div">{'Value 3'}</Table.Cell>
|
26
|
+
<Table.Cell tag="div">{'Value 4'}</Table.Cell>
|
27
|
+
<Table.Cell tag="div">{'Value 5'}</Table.Cell>
|
28
|
+
</Table.Row>
|
29
|
+
<Table.Row tag="div">
|
30
|
+
<Table.Cell tag="div">{'Value 1'}</Table.Cell>
|
31
|
+
<Table.Cell tag="div">{'Value 2'}</Table.Cell>
|
32
|
+
<Table.Cell tag="div">{'Value 3'}</Table.Cell>
|
33
|
+
<Table.Cell tag="div">{'Value 4'}</Table.Cell>
|
34
|
+
<Table.Cell tag="div">{'Value 5'}</Table.Cell>
|
35
|
+
</Table.Row>
|
36
|
+
<Table.Row>
|
37
|
+
<Table.Cell tag="div">{'Value 1'}</Table.Cell>
|
38
|
+
<Table.Cell tag="div">{'Value 2'}</Table.Cell>
|
39
|
+
<Table.Cell tag="div">{'Value 3'}</Table.Cell>
|
40
|
+
<Table.Cell tag="div">{'Value 4'}</Table.Cell>
|
41
|
+
<Table.Cell tag="div">{'Value 5'}</Table.Cell>
|
42
|
+
</Table.Row>
|
43
|
+
</Table.Body>
|
44
|
+
</Table>
|
45
|
+
)
|
46
|
+
}
|
47
|
+
|
48
|
+
export default TableWithSubcomponentsAsDivs
|