playbook_ui 13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 → 13.28.0.pre.alpha.play829selectablecardalignment2978
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/_playbook.scss +3 -2
- data/app/pb_kits/playbook/index.js +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +1 -4
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -16
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -1
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +2 -5
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -16
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +8 -14
- data/app/pb_kits/playbook/pb_collapsible/collapsible.test.js +0 -24
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -7
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -9
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -2
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -4
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -16
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +1 -0
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +30 -32
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +0 -2
- data/app/pb_kits/playbook/pb_table/_table.tsx +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +32 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/{_table_outer_padding.html.erb → _table_alignment_row.html.erb} +7 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +63 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +50 -51
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +38 -37
- data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -1
- data/app/pb_kits/playbook/pb_table/table.rb +1 -14
- data/app/pb_kits/playbook/pb_table/table.test.js +1 -5
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +2 -0
- data/app/pb_kits/playbook/playbook-doc.js +0 -2
- data/app/pb_kits/playbook/utilities/globalProps.ts +1 -12
- data/dist/menu.yml +2 -5
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/classnames.rb +0 -1
- data/lib/playbook/kit_base.rb +0 -2
- data/lib/playbook/version.rb +1 -1
- metadata +6 -35
- data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +0 -53
- data/app/pb_kits/playbook/pb_draggable/_draggable.scss +0 -10
- data/app/pb_kits/playbook/pb_draggable/_draggable.tsx +0 -53
- data/app/pb_kits/playbook/pb_draggable/context/index.tsx +0 -92
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +0 -159
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +0 -121
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +0 -65
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +0 -54
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +0 -57
- data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
- data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.html.erb +0 -33
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +0 -34
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +0 -54
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +0 -53
- data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +0 -76
- data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_outer_padding.scss +0 -21
- data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +0 -61
- data/app/pb_kits/playbook/tokens/_vertical_align.scss +0 -18
- data/app/pb_kits/playbook/utilities/_vertical_align.scss +0 -16
- data/lib/playbook/vertical_align.rb +0 -37
@@ -7,39 +7,39 @@ const TableAlignmentRow = (props) => {
|
|
7
7
|
<Table
|
8
8
|
{...props}
|
9
9
|
>
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>{'Column 1'}</th>
|
13
|
+
<th>{'Column 2'}</th>
|
14
|
+
<th>{'Column 3'}</th>
|
15
|
+
<th>{'Column 4'}</th>
|
16
|
+
<th>{'Column 5'}</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<tr>
|
21
|
+
<td>{'Value 1'}</td>
|
22
|
+
<td>{'Value 2'}</td>
|
23
|
+
<td>{'Value 3'}</td>
|
24
|
+
<td>{'Value 4'}</td>
|
25
|
+
<td>{'Value 5'}</td>
|
26
|
+
</tr>
|
27
|
+
<tr align="center">
|
28
|
+
<td>{'Value 1'}</td>
|
29
|
+
<td>{'Value 2'}</td>
|
30
|
+
<td>{'Value 3'}</td>
|
31
|
+
<td>{'Value 4'}</td>
|
32
|
+
<td>{'Value 5'}</td>
|
33
|
+
</tr>
|
34
|
+
<tr align="right">
|
35
|
+
<td>{'Value 1'}</td>
|
36
|
+
<td>{'Value 2'}</td>
|
37
|
+
<td>{'Value 3'}</td>
|
38
|
+
<td>{'Value 4'}</td>
|
39
|
+
<td>{'Value 5'}</td>
|
40
|
+
</tr>
|
41
|
+
</tbody>
|
42
|
+
</Table>
|
43
43
|
)
|
44
44
|
}
|
45
45
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
This is to be used to shift the whole row.
|
2
2
|
The header/ first row is the default, followed by the second row being centered, and then the last row shifted to the right.
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<%= pb_rails("table") do %>
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th> </th>
|
5
|
+
<th>Price</th>
|
6
|
+
</tr>
|
7
|
+
</thead>
|
8
|
+
<tbody>
|
9
|
+
<tr>
|
10
|
+
<td shift="down">Total</td>
|
11
|
+
<td>
|
12
|
+
$12
|
13
|
+
<br/>
|
14
|
+
$46
|
15
|
+
<br/>
|
16
|
+
$25
|
17
|
+
<br/>
|
18
|
+
-------
|
19
|
+
<br/>
|
20
|
+
$83
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
</tbody>
|
24
|
+
<% end %>
|
25
|
+
<br/>
|
26
|
+
<%= pb_rails("table") do %>
|
27
|
+
<thead>
|
28
|
+
<tr>
|
29
|
+
<th>Espresso Drinks</th>
|
30
|
+
<th>Ingredients</th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<tr>
|
35
|
+
<td shift="up">Cappuccino</td>
|
36
|
+
<td>
|
37
|
+
Espresso
|
38
|
+
<br/>
|
39
|
+
Steamed Milk
|
40
|
+
<br/>
|
41
|
+
Milk Foam
|
42
|
+
</td>
|
43
|
+
</tr>
|
44
|
+
<tr>
|
45
|
+
<td shift="up">Macchiato</td>
|
46
|
+
<td>
|
47
|
+
Espresso
|
48
|
+
<br/>
|
49
|
+
Steamed Milk
|
50
|
+
</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td shift="up">Mocha</td>
|
54
|
+
<td>
|
55
|
+
Espresso
|
56
|
+
<br/>
|
57
|
+
Hot Chocolate
|
58
|
+
<br/>
|
59
|
+
Steamed Milk
|
60
|
+
</td>
|
61
|
+
</tr>
|
62
|
+
</tbody>
|
63
|
+
<% end %>
|
@@ -9,16 +9,16 @@ const TableAlignmentShiftData = (props) => {
|
|
9
9
|
marginBottom="md"
|
10
10
|
{...props}
|
11
11
|
>
|
12
|
-
<
|
13
|
-
<
|
14
|
-
<
|
15
|
-
<
|
16
|
-
</
|
17
|
-
</
|
18
|
-
<
|
19
|
-
<
|
20
|
-
<
|
21
|
-
<
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<th> </th>
|
15
|
+
<th>{'Price'}</th>
|
16
|
+
</tr>
|
17
|
+
</thead>
|
18
|
+
<tbody>
|
19
|
+
<tr>
|
20
|
+
<td shift="down">{'Total'}</td>
|
21
|
+
<td>
|
22
22
|
{'$12'}
|
23
23
|
<br />
|
24
24
|
{'$46'}
|
@@ -28,51 +28,50 @@ const TableAlignmentShiftData = (props) => {
|
|
28
28
|
{'-------'}
|
29
29
|
<br />
|
30
30
|
{'$83'}
|
31
|
-
</
|
32
|
-
</
|
33
|
-
</
|
31
|
+
</td>
|
32
|
+
</tr>
|
33
|
+
</tbody>
|
34
34
|
</Table>
|
35
|
-
|
36
35
|
<Table
|
37
36
|
{...props}
|
38
37
|
>
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
</
|
58
|
-
<
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
38
|
+
<thead>
|
39
|
+
<tr>
|
40
|
+
<th>{'Espresso Drinks'}</th>
|
41
|
+
<th>{'Ingredients'}</th>
|
42
|
+
</tr>
|
43
|
+
</thead>
|
44
|
+
<tbody>
|
45
|
+
<tr>
|
46
|
+
<td shift="up">{'Cappuccino'}</td>
|
47
|
+
<td>
|
48
|
+
{'Espresso'}
|
49
|
+
<br />
|
50
|
+
{'Steamed Milk'}
|
51
|
+
<br />
|
52
|
+
{'Milk Foam'}
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td shift="up">{'Macchiato'}</td>
|
57
|
+
<td>
|
58
|
+
{'Espresso'}
|
59
|
+
<br />
|
60
|
+
{'Steamed Milk'}
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td shift="up">{'Mocha'}</td>
|
65
|
+
<td>
|
66
|
+
{'Espresso'}
|
67
|
+
<br />
|
68
|
+
{'Hot Chocolate'}
|
69
|
+
<br />
|
70
|
+
{'Steamed Milk'}
|
71
|
+
</td>
|
72
|
+
</tr>
|
73
|
+
</tbody>
|
74
|
+
</Table>
|
76
75
|
</div>
|
77
76
|
)
|
78
77
|
}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
You can individually shift a piece of table data, or shift an entire column.
|
2
2
|
The first table shifts "Total" down, whereas the second table shifts the "Espresso Drinks" column contents up.
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<%= pb_rails("table") do %>
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th>Column 1</th>
|
5
|
+
<th>Column 2</th>
|
6
|
+
<th>Column 3</th>
|
7
|
+
<th>Column 4</th>
|
8
|
+
<th>Column 5</th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<tr>
|
13
|
+
<td>
|
14
|
+
Value 1a
|
15
|
+
<br/>
|
16
|
+
Value 1a
|
17
|
+
<br/>
|
18
|
+
Value 1a
|
19
|
+
</td>
|
20
|
+
<td>Value 2a</td>
|
21
|
+
<td>Value 3a</td>
|
22
|
+
<td>Value 4a</td>
|
23
|
+
<td>Value 5a</td>
|
24
|
+
</tr>
|
25
|
+
<tr shift="middle">
|
26
|
+
<td>
|
27
|
+
Value 1b
|
28
|
+
<br/>
|
29
|
+
Value 1b
|
30
|
+
<br/>
|
31
|
+
Value 1b
|
32
|
+
</td>
|
33
|
+
<td>Value 2b</td>
|
34
|
+
<td>Value 3b</td>
|
35
|
+
<td>Value 4b</td>
|
36
|
+
<td>Value 5b</td>
|
37
|
+
</tr>
|
38
|
+
<tr shift="down">
|
39
|
+
<td>
|
40
|
+
Value 1c
|
41
|
+
<br/>
|
42
|
+
Value 1c
|
43
|
+
<br/>
|
44
|
+
Value 1c
|
45
|
+
</td>
|
46
|
+
<td>Value 2c</td>
|
47
|
+
<td>Value 3c</td>
|
48
|
+
<td>Value 4c</td>
|
49
|
+
<td>Value 5c</td>
|
50
|
+
</tr>
|
51
|
+
</tbody>
|
52
|
+
<% end %>
|
@@ -4,59 +4,60 @@ import Table from '../_table'
|
|
4
4
|
|
5
5
|
const TableAlignmentShiftRow = (props) => {
|
6
6
|
return (
|
7
|
-
<Table
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
<
|
14
|
-
<
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
7
|
+
<Table
|
8
|
+
{...props}
|
9
|
+
>
|
10
|
+
<thead>
|
11
|
+
<tr>
|
12
|
+
<th>{'Column 1'}</th>
|
13
|
+
<th>{'Column 2'}</th>
|
14
|
+
<th>{'Column 3'}</th>
|
15
|
+
<th>{'Column 4'}</th>
|
16
|
+
<th>{'Column 5'}</th>
|
17
|
+
</tr>
|
18
|
+
</thead>
|
19
|
+
<tbody>
|
20
|
+
<tr>
|
21
|
+
<td>
|
20
22
|
{'Value 1a'}
|
21
23
|
<br />
|
22
24
|
{'Value 1a'}
|
23
25
|
<br />
|
24
26
|
{'Value 1a'}
|
25
|
-
</
|
26
|
-
<
|
27
|
-
<
|
28
|
-
<
|
29
|
-
<
|
30
|
-
</
|
31
|
-
<
|
32
|
-
<
|
27
|
+
</td>
|
28
|
+
<td>{'Value 2a'}</td>
|
29
|
+
<td>{'Value 3a'}</td>
|
30
|
+
<td>{'Value 4a'}</td>
|
31
|
+
<td>{'Value 5a'}</td>
|
32
|
+
</tr>
|
33
|
+
<tr shift="middle">
|
34
|
+
<td>
|
33
35
|
{'Value 1b'}
|
34
36
|
<br />
|
35
37
|
{'Value 1b'}
|
36
38
|
<br />
|
37
39
|
{'Value 1b'}
|
38
|
-
</
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
<
|
43
|
-
</
|
44
|
-
<
|
45
|
-
<
|
40
|
+
</td>
|
41
|
+
<td>{'Value 2b'}</td>
|
42
|
+
<td>{'Value 3b'}</td>
|
43
|
+
<td>{'Value 4b'}</td>
|
44
|
+
<td>{'Value 5b'}</td>
|
45
|
+
</tr>
|
46
|
+
<tr shift="down">
|
47
|
+
<td>
|
46
48
|
{'Value 1c'}
|
47
49
|
<br />
|
48
50
|
{'Value 1c'}
|
49
51
|
<br />
|
50
52
|
{'Value 1c'}
|
51
|
-
</
|
52
|
-
<
|
53
|
-
<
|
54
|
-
<
|
55
|
-
<
|
56
|
-
</
|
57
|
-
</
|
53
|
+
</td>
|
54
|
+
<td>{'Value 2c'}</td>
|
55
|
+
<td>{'Value 3c'}</td>
|
56
|
+
<td>{'Value 4c'}</td>
|
57
|
+
<td>{'Value 5c'}</td>
|
58
|
+
</tr>
|
59
|
+
</tbody>
|
58
60
|
</Table>
|
59
|
-
|
60
61
|
)
|
61
62
|
}
|
62
63
|
|
@@ -5,10 +5,10 @@ examples:
|
|
5
5
|
- table_lg: Large
|
6
6
|
- table_sticky: Sticky Header
|
7
7
|
- table_header: Table Header
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
-
|
8
|
+
- table_alignment_row: Row Alignment
|
9
|
+
- table_alignment_column: Column Alignment
|
10
|
+
- table_alignment_shift_row: Shift Row
|
11
|
+
- table_alignment_shift_data: Shift Column Data
|
12
12
|
- table_side_highlight: Side Highlight
|
13
13
|
- table_container: Table Container Off
|
14
14
|
- table_disable_hover: Disable Hover
|
@@ -26,7 +26,7 @@ examples:
|
|
26
26
|
- table_striped: Striped Table
|
27
27
|
- table_with_subcomponents_rails: Table with Sub Components (Table Elements)
|
28
28
|
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
29
|
-
|
29
|
+
|
30
30
|
|
31
31
|
react:
|
32
32
|
- table_sm: Small
|
@@ -34,9 +34,9 @@ examples:
|
|
34
34
|
- table_lg: Large
|
35
35
|
- table_sticky: Sticky Header
|
36
36
|
- table_alignment_row: Row Alignment
|
37
|
-
- table_alignment_column:
|
38
|
-
- table_alignment_shift_row: Row
|
39
|
-
- table_alignment_shift_data:
|
37
|
+
- table_alignment_column: Column Alignment
|
38
|
+
- table_alignment_shift_row: Shift Row
|
39
|
+
- table_alignment_shift_data: Shift Column Data
|
40
40
|
- table_side_highlight: Side Highlight
|
41
41
|
- table_container: Table Container Off
|
42
42
|
- table_disable_hover: Disable Hover
|
@@ -54,4 +54,4 @@ examples:
|
|
54
54
|
- table_striped: Striped Table
|
55
55
|
- table_with_subcomponents: Table with Sub Components (Table Elements)
|
56
56
|
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
57
|
-
|
57
|
+
|
@@ -24,4 +24,3 @@ export { default as TableStriped } from './_table_striped.jsx'
|
|
24
24
|
export { default as TableDiv } from './_table_div.jsx'
|
25
25
|
export { default as TableWithSubcomponents } from './_table_with_subcomponents.jsx'
|
26
26
|
export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
|
27
|
-
export { default as TableOuterPadding } from './_table_outer_padding.jsx'
|
@@ -30,16 +30,12 @@ module Playbook
|
|
30
30
|
prop :tag, type: Playbook::Props::Enum,
|
31
31
|
values: %w[table div],
|
32
32
|
default: "table"
|
33
|
-
prop :outer_padding, type: Playbook::Props::Enum,
|
34
|
-
values: ["none", "xxs", "xs", "sm", "md", "lg", "xl", nil],
|
35
|
-
default: nil
|
36
33
|
|
37
34
|
def classname
|
38
35
|
generate_classname(
|
39
36
|
"pb_table", "table-#{size}", single_line_class, dark_class,
|
40
37
|
disable_hover_class, container_class, data_table_class, sticky_class, collapse_class,
|
41
|
-
vertical_border_class, striped_class,
|
42
|
-
"table-responsive-#{responsive}", separator: " "
|
38
|
+
vertical_border_class, striped_class, "table-responsive-#{responsive}", separator: " "
|
43
39
|
)
|
44
40
|
end
|
45
41
|
|
@@ -80,15 +76,6 @@ module Playbook
|
|
80
76
|
def vertical_border_class
|
81
77
|
vertical_border ? "vertical-border" : nil
|
82
78
|
end
|
83
|
-
|
84
|
-
def outer_padding_class
|
85
|
-
if outer_padding.nil?
|
86
|
-
outer_padding
|
87
|
-
else
|
88
|
-
space_css_name = outer_padding != "none" ? "space_" : ""
|
89
|
-
outer_padding.present? ? "outer_padding_#{space_css_name}#{outer_padding}" : nil
|
90
|
-
end
|
91
|
-
end
|
92
79
|
end
|
93
80
|
end
|
94
81
|
end
|
@@ -52,6 +52,7 @@ const TableTagTable = () => {
|
|
52
52
|
);
|
53
53
|
};
|
54
54
|
|
55
|
+
|
55
56
|
const props = {
|
56
57
|
data: { testid: "table" },
|
57
58
|
sticky: false
|
@@ -160,8 +161,3 @@ test("Renders Table.Cell subkit for HTML Table elements Table", () => {
|
|
160
161
|
expect(head).toBeInTheDocument()
|
161
162
|
expect(head.tagName).toBe("TD")
|
162
163
|
})
|
163
|
-
|
164
|
-
test("Should have outerPadding class", () => {
|
165
|
-
const kit = renderKit(Table, props, { outerPadding: "sm" })
|
166
|
-
expect(kit).toHaveClass("pb_table table-sm table-responsive-collapse table-card outer_padding_space_sm table-collapse-sm")
|
167
|
-
})
|
@@ -7,7 +7,9 @@
|
|
7
7
|
id: "pb-th#{object.id}",
|
8
8
|
**combined_html_options) do %>
|
9
9
|
<% unless sorting_style? %>
|
10
|
+
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_nolink" }) do %>
|
10
11
|
<%= content.presence || object.text %>
|
12
|
+
<% end %>
|
11
13
|
<% else %>
|
12
14
|
<%= link_to next_link, style: link_style do %>
|
13
15
|
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_link" }) do %>
|
@@ -34,7 +34,6 @@ import * as DateYearStacked from 'pb_date_year_stacked/docs'
|
|
34
34
|
import * as Detail from 'pb_detail/docs'
|
35
35
|
import * as Dialog from 'pb_dialog/docs'
|
36
36
|
import * as DistributionBarDocs from 'pb_distribution_bar/docs'
|
37
|
-
import * as Draggable from 'pb_draggable/docs'
|
38
37
|
import * as Dropdown from 'pb_dropdown/docs'
|
39
38
|
import * as FileUpload from 'pb_file_upload/docs'
|
40
39
|
import * as Filter from 'pb_filter/docs'
|
@@ -138,7 +137,6 @@ WebpackerReact.registerComponents({
|
|
138
137
|
...Detail,
|
139
138
|
...Dialog,
|
140
139
|
...DistributionBarDocs,
|
141
|
-
...Draggable,
|
142
140
|
...Dropdown,
|
143
141
|
...FileUpload,
|
144
142
|
...Filter,
|
@@ -156,10 +156,6 @@ type Truncate = {
|
|
156
156
|
truncate?: TruncateType
|
157
157
|
}
|
158
158
|
|
159
|
-
type VerticalAlign = {
|
160
|
-
verticalAlign?: "baseline" | "super" | "top" | "middle" | "bottom" | "sub" | "text-top" | "text-bottom"
|
161
|
-
}
|
162
|
-
|
163
159
|
type ZIndexType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
|
164
160
|
type ZIndexResponsiveType = {[key: string]: ZIndexType}
|
165
161
|
type ZIndex = {
|
@@ -171,7 +167,7 @@ export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
|
171
167
|
BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
|
172
168
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
173
169
|
LineHeight & Margin & MaxWidth & NumberSpacing & Order & Overflow & Padding &
|
174
|
-
Position & Shadow & TextAlign & Truncate &
|
170
|
+
Position & Shadow & TextAlign & Truncate & ZIndex & { hover?: string } & Top & Right & Bottom & Left;
|
175
171
|
|
176
172
|
const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
|
177
173
|
const keys: string[] = Object.keys(prop)
|
@@ -474,13 +470,6 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
474
470
|
} else {
|
475
471
|
return textAlign ? `text_align_${textAlign} ` : ''
|
476
472
|
}
|
477
|
-
},
|
478
|
-
verticalAlignProps: ({ verticalAlign }: VerticalAlign) => {
|
479
|
-
if (typeof verticalAlign === 'object') {
|
480
|
-
return getResponsivePropClasses(verticalAlign, 'vertical_align')
|
481
|
-
} else {
|
482
|
-
return verticalAlign ? `vertical_align_${verticalAlign} ` : ''
|
483
|
-
}
|
484
473
|
}
|
485
474
|
}
|
486
475
|
|
data/dist/menu.yml
CHANGED
@@ -352,10 +352,6 @@ kits:
|
|
352
352
|
platforms: *web
|
353
353
|
description:
|
354
354
|
status: "stable"
|
355
|
-
- name: "draggable"
|
356
|
-
platforms: *react_only
|
357
|
-
description:
|
358
|
-
status: "beta"
|
359
355
|
- name: message_text_patterns
|
360
356
|
description:
|
361
357
|
components:
|
@@ -467,4 +463,5 @@ kits:
|
|
467
463
|
status: "stable"
|
468
464
|
- name: "user"
|
469
465
|
platforms: *web
|
470
|
-
description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
|
466
|
+
description: This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
|
467
|
+
status: "stable"
|