playbook_ui 13.19.0.pre.alpha.PBNTR200addadvancedtablekitdarkmodestyles2346 → 13.19.0.pre.alpha.PBNTR207tabledivsupport2245
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/Components/CollapsibleTrail.tsx +1 -6
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +0 -2
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -30
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +4 -7
- 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/_icon.tsx +16 -28
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.html.erb +11 -5
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.jsx +18 -44
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.md +8 -4
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +4 -6
- data/app/pb_kits/playbook/pb_icon/icon.rb +10 -27
- data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +0 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +67 -86
- 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 +26 -27
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -5
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -0
- 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/_div_support.scss +22 -0
- 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 +3 -3
- data/app/pb_kits/playbook/pb_table/table.html.erb +3 -1
- 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/app/pb_kits/playbook/pb_text_input/_text_input.tsx +5 -9
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_add_on.jsx +0 -20
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +1 -2
- data/app/pb_kits/playbook/pb_user/docs/example.yml +0 -1
- data/dist/playbook-rails.js +2 -2
- data/lib/playbook/version.rb +1 -1
- metadata +3 -13
- 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.md +0 -7
- 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.md +0 -3
- 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
- data/app/pb_kits/playbook/pb_user/docs/_user_presence_indicator_swift.md +0 -30
@@ -8,11 +8,11 @@ $pb_table_row_kit_side_highlight_colors: map-merge(map-merge($status_colors, $pr
|
|
8
8
|
}
|
9
9
|
|
10
10
|
[class^=pb_table] {
|
11
|
-
tbody, .
|
11
|
+
tbody, .tbody {
|
12
12
|
[class^=pb_table_row_kit] {
|
13
13
|
@each $color_name, $color_value in $pb_table_row_kit_side_highlight_colors {
|
14
14
|
&[class*=_side_highlight_#{$color_name}] {
|
15
|
-
td, .
|
15
|
+
td, .td {
|
16
16
|
&:first-child {
|
17
17
|
@include pb_table_row_kit_side_highlight($color_value);
|
18
18
|
}
|
@@ -4,9 +4,9 @@
|
|
4
4
|
max-width: 100vw;
|
5
5
|
table-layout: fixed;
|
6
6
|
|
7
|
-
tbody, .
|
8
|
-
tr, .
|
9
|
-
td, .
|
7
|
+
tbody, .tbody {
|
8
|
+
tr, .tr {
|
9
|
+
td, .td {
|
10
10
|
white-space: nowrap;
|
11
11
|
text-overflow: ellipsis;
|
12
12
|
|
@@ -20,7 +20,7 @@
|
|
20
20
|
display: block !important;
|
21
21
|
}
|
22
22
|
|
23
|
-
br, .
|
23
|
+
br, .br {
|
24
24
|
content:' ' !important;
|
25
25
|
|
26
26
|
&::after {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[class^="pb_table"] {
|
4
4
|
&.sticky-header {
|
5
|
-
thead, .
|
5
|
+
thead, .thead {
|
6
6
|
background: $white;
|
7
7
|
position: sticky;
|
8
8
|
top: 0;
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
&.dark {
|
14
14
|
&.sticky-header {
|
15
|
-
thead, .
|
15
|
+
thead, .thead {
|
16
16
|
background: $bg_dark;
|
17
17
|
position: sticky;
|
18
18
|
top: 0;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
[class^=pb_table] {
|
2
2
|
&.striped {
|
3
|
-
tbody, .
|
4
|
-
tr:nth-child(odd), .
|
3
|
+
tbody, .tbody {
|
4
|
+
tr:nth-child(odd), .tr:nth-child(odd) {
|
5
5
|
background-color: $bg_light;
|
6
6
|
}
|
7
7
|
}
|
@@ -9,8 +9,8 @@
|
|
9
9
|
|
10
10
|
&.dark {
|
11
11
|
&.striped {
|
12
|
-
tbody, .
|
13
|
-
tr:nth-child(odd), .
|
12
|
+
tbody, .tbody {
|
13
|
+
tr:nth-child(odd), .tr:nth-child(odd) {
|
14
14
|
background-color: $bg_dark;
|
15
15
|
}
|
16
16
|
}
|
@@ -1,19 +1,12 @@
|
|
1
1
|
@import "../../tokens/colors";
|
2
2
|
|
3
3
|
[class^=pb_table] {
|
4
|
-
display: table;
|
5
|
-
|
6
4
|
@each $name, $value in $cell-pad-list {
|
7
5
|
&.#{$name} {
|
8
6
|
width: 100%;
|
9
|
-
thead, .
|
10
|
-
|
11
|
-
|
12
|
-
tr, .pb_table_tr {
|
13
|
-
display: table-row;
|
14
|
-
|
15
|
-
th, .pb_table_th {
|
16
|
-
display: table-cell;
|
7
|
+
thead, .thead {
|
8
|
+
tr, .tr {
|
9
|
+
th, .th {
|
17
10
|
padding: $cell-pad-md $cell-gutter;
|
18
11
|
|
19
12
|
&:first-child {
|
@@ -25,14 +18,9 @@
|
|
25
18
|
}
|
26
19
|
}
|
27
20
|
}
|
28
|
-
tbody, .
|
29
|
-
|
30
|
-
|
31
|
-
tr, .pb_table_tr {
|
32
|
-
display: table-row;
|
33
|
-
|
34
|
-
td, .pb_table_td {
|
35
|
-
display: table-cell;
|
21
|
+
tbody, .tbody {
|
22
|
+
tr, .tr {
|
23
|
+
td, .td {
|
36
24
|
border-color: $border_light;
|
37
25
|
border-style: solid;
|
38
26
|
border-width: 0 0 1px;
|
@@ -48,8 +36,7 @@
|
|
48
36
|
}
|
49
37
|
}
|
50
38
|
&.data_table {
|
51
|
-
thead tr th
|
52
|
-
.pb_table_thead .pb_table_tr .pb_table_th {
|
39
|
+
thead tr th {
|
53
40
|
padding-top: $cell-pad-sm;
|
54
41
|
padding-bottom: $cell-pad-sm;
|
55
42
|
&:first-child {
|
@@ -59,8 +46,7 @@
|
|
59
46
|
padding-right: $cell-pad-sm;
|
60
47
|
}
|
61
48
|
}
|
62
|
-
tbody tr td
|
63
|
-
.pb_table_tbody .pb_table_tr .pb_table_td {
|
49
|
+
tbody tr td {
|
64
50
|
padding-top: $cell-pad-sm;
|
65
51
|
padding-bottom: $cell-pad-sm;
|
66
52
|
&:first-child {
|
@@ -7,9 +7,9 @@
|
|
7
7
|
border-spacing: 0;
|
8
8
|
background: $white;
|
9
9
|
|
10
|
-
thead, .
|
11
|
-
tr, .
|
12
|
-
th, .
|
10
|
+
thead, .thead {
|
11
|
+
tr, .tr {
|
12
|
+
th, .th {
|
13
13
|
border-color: $border_light;
|
14
14
|
border-style: solid;
|
15
15
|
border-width: 1px 0 1px 0;
|
@@ -26,9 +26,9 @@
|
|
26
26
|
}
|
27
27
|
}
|
28
28
|
|
29
|
-
tbody, .
|
30
|
-
tr, .
|
31
|
-
td, .
|
29
|
+
tbody, .tbody {
|
30
|
+
tr, .tr {
|
31
|
+
td, .td {
|
32
32
|
border-color: $border_light;
|
33
33
|
border-style: solid;
|
34
34
|
border-width: 0 0 1px 0;
|
@@ -42,7 +42,7 @@
|
|
42
42
|
}
|
43
43
|
|
44
44
|
&:last-child {
|
45
|
-
td, .
|
45
|
+
td, .td {
|
46
46
|
border-width: 0 0 1px 0;
|
47
47
|
|
48
48
|
&:first-child {
|
@@ -7,22 +7,22 @@ $table-dark-card-bg: $card_dark;
|
|
7
7
|
&.table-md,
|
8
8
|
&.table-lg {
|
9
9
|
&.table-dark {
|
10
|
-
thead, .
|
11
|
-
tr, .
|
10
|
+
thead, .thead {
|
11
|
+
tr, .tr {
|
12
12
|
border-color: $border_dark !important;
|
13
13
|
|
14
|
-
th, .
|
14
|
+
th, .th {
|
15
15
|
border-color: $border_dark !important;
|
16
16
|
color: $text_dk_light;
|
17
17
|
}
|
18
18
|
}
|
19
19
|
}
|
20
|
-
tbody, .
|
21
|
-
tr, .
|
20
|
+
tbody, .tbody {
|
21
|
+
tr, .tr {
|
22
22
|
border-color: $border_dark;
|
23
23
|
transition: none !important;
|
24
24
|
|
25
|
-
td, .
|
25
|
+
td, .td {
|
26
26
|
border-color: $border_dark !important;
|
27
27
|
color: $white;
|
28
28
|
|
@@ -31,7 +31,7 @@ $table-dark-card-bg: $card_dark;
|
|
31
31
|
}
|
32
32
|
}
|
33
33
|
&:first-child {
|
34
|
-
td, .
|
34
|
+
td, .td {
|
35
35
|
border-top-width: 0 !important;
|
36
36
|
}
|
37
37
|
}
|
@@ -54,9 +54,9 @@ $table-dark-card-bg: $card_dark;
|
|
54
54
|
&.table-dark {
|
55
55
|
background: none !important;
|
56
56
|
|
57
|
-
tbody, .
|
58
|
-
tr, .
|
59
|
-
td, .
|
57
|
+
tbody, .tbody {
|
58
|
+
tr, .tr {
|
59
|
+
td, .td {
|
60
60
|
background: $table-dark-card-bg !important;
|
61
61
|
}
|
62
62
|
}
|
@@ -64,15 +64,15 @@ $table-dark-card-bg: $card_dark;
|
|
64
64
|
}
|
65
65
|
}
|
66
66
|
&.table-dark {
|
67
|
-
tbody, .
|
68
|
-
tr, .
|
69
|
-
td, .
|
67
|
+
tbody, .tbody {
|
68
|
+
tr, .tr {
|
69
|
+
td, .td {
|
70
70
|
&:first-child {
|
71
71
|
border-top-color: $border_dark !important;
|
72
72
|
}
|
73
73
|
}
|
74
74
|
&:first-child {
|
75
|
-
td, .
|
75
|
+
td, .td {
|
76
76
|
border-top-width: 1px !important;
|
77
77
|
}
|
78
78
|
}
|
@@ -10,7 +10,7 @@ $text_align_values: (
|
|
10
10
|
);
|
11
11
|
|
12
12
|
[class^=pb_table] {
|
13
|
-
thead, .
|
13
|
+
thead, .thead {
|
14
14
|
[class^=pb_table_header_kit] {
|
15
15
|
@each $align_name, $align_value in $text_align_values {
|
16
16
|
&[class*=_align_#{$align_name}] {
|
@@ -32,7 +32,7 @@ $text_align_values: (
|
|
32
32
|
}
|
33
33
|
|
34
34
|
[class^=pb_table] {
|
35
|
-
thead, .
|
35
|
+
thead, .thead {
|
36
36
|
[class^=pb_th_active] {
|
37
37
|
color: $primary !important;
|
38
38
|
}
|
@@ -10,21 +10,21 @@
|
|
10
10
|
width: 100%;
|
11
11
|
background: none !important;
|
12
12
|
|
13
|
-
thead, .
|
14
|
-
tr, .
|
13
|
+
thead, .thead {
|
14
|
+
tr, .tr {
|
15
15
|
left: $offscreen;
|
16
16
|
position: absolute;
|
17
17
|
top: $offscreen;
|
18
18
|
|
19
|
-
th, .
|
19
|
+
th, .th {
|
20
20
|
display: block;
|
21
21
|
visibility: visible;
|
22
22
|
}
|
23
23
|
}
|
24
24
|
}
|
25
|
-
tbody, .
|
26
|
-
tr, .
|
27
|
-
td, .
|
25
|
+
tbody, .tbody {
|
26
|
+
tr, .tr {
|
27
|
+
td, .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, .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, .tbody {
|
78
|
+
tr, .tr {
|
79
|
+
td, .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, .tbody {
|
102
|
+
tr, .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, .tbody {
|
112
|
+
tr, .tr {
|
113
|
+
td, .td {
|
114
114
|
&:first-child,
|
115
115
|
&:last-child {
|
116
116
|
padding: $value $cell-gutter !important;
|
@@ -1,12 +1,12 @@
|
|
1
1
|
[class^=pb_table] {
|
2
2
|
&.vertical-border {
|
3
|
-
td, th, .
|
3
|
+
td, th, .td, .th {
|
4
4
|
border-right: 1px solid $border_light !important;
|
5
5
|
}
|
6
6
|
|
7
7
|
@media screen and (min-width: $screen-xs-min) {
|
8
|
-
tr:hover, .
|
9
|
-
td:last-child, .
|
8
|
+
tr:hover, .tr:hover {
|
9
|
+
td:last-child, .td:last-child {
|
10
10
|
border-right-color: darken($border_light, 10%) !important;
|
11
11
|
}
|
12
12
|
}
|
@@ -1,57 +1,47 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%=
|
1
|
+
<%= content_tag(:th,
|
2
|
+
colspan: object.colspan,
|
3
|
+
aria: object.aria,
|
4
|
+
class: object.classname,
|
5
|
+
data: object.data,
|
6
|
+
id: "pb-th#{object.id}" ) do %>
|
7
|
+
<% unless sorting_style? %>
|
8
|
+
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_nolink" }) do %>
|
9
|
+
<%= content.presence || object.text %>
|
10
|
+
<% end %>
|
11
|
+
<% else %>
|
12
|
+
<%= link_to next_link, style: link_style do %>
|
13
|
+
<%= pb_rails("flex", props:{ align: object.align_content, justify: object.justify_sort_icon, classname: "pb_th_link" }) do %>
|
10
14
|
<%= content.presence || object.text %>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
<% if sorting_style? %>
|
17
|
-
<%= pb_rails("icon", props: { icon: object.sort_icon(active_item[:direction], active_item[:active]),
|
18
|
-
fixed_width: true,
|
19
|
-
classname: active_item.any? ? "pb_th_active" : "",
|
20
|
-
padding_left: "xs" }) %>
|
21
|
-
<% end %>
|
15
|
+
<% if sorting_style? %>
|
16
|
+
<%= pb_rails("icon", props: { icon: object.sort_icon(active_item[:direction], active_item[:active]),
|
17
|
+
fixed_width: true,
|
18
|
+
classname: active_item.any? ? "pb_th_active" : "",
|
19
|
+
padding_left: "xs" }) %>
|
22
20
|
<% end %>
|
23
21
|
<% end %>
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
22
|
+
<% end %>
|
23
|
+
<% if use_dropdown_select %>
|
24
|
+
<%= pb_rails("popover", props: { classname: "pb_filter_sort_menu",
|
25
|
+
close_on_click: "outside",
|
26
|
+
trigger_element_id: "pb-th#{object.id}",
|
27
|
+
tooltip_id: "sort-filter-btn-tooltip#{object.id}",
|
28
|
+
position: object.placement ,
|
29
|
+
padding: 'none'}) do %>
|
30
|
+
<%= pb_rails("nav", props: {classname: "pb_table_header_dropdown"}) do %>
|
31
|
+
<% object.sort_items.each do |sort_item| %>
|
32
|
+
<% item = active_or_first_item(sort_items_for(sort_item)) %>
|
33
|
+
<%= pb_rails("nav/item", props: {
|
34
|
+
text: item[:item],
|
35
|
+
link: next_link(sort_item: sort_item),
|
36
|
+
highlighted_border: false,
|
37
|
+
padding: "xs",
|
38
|
+
icon_right: sort_icon(item[:direction], item[:active]),
|
39
|
+
active: item[:active],
|
40
|
+
classname: "header_nav_item"
|
41
|
+
}) %>
|
44
42
|
<% end %>
|
45
43
|
<% end %>
|
46
44
|
<% end %>
|
47
45
|
<% end %>
|
48
46
|
<% end %>
|
49
|
-
<%
|
50
|
-
<%= content_tag(:div,
|
51
|
-
aria: object.aria,
|
52
|
-
class: object.classname,
|
53
|
-
data: object.data,
|
54
|
-
id: object.id) do %>
|
55
|
-
<%= content.presence || object.text %>
|
56
|
-
<% end %>
|
57
|
-
<% end %>
|
47
|
+
<% end %>
|
@@ -23,16 +23,9 @@ module Playbook
|
|
23
23
|
default: ""
|
24
24
|
prop :sort_dropdown, type: Playbook::Props::Boolean,
|
25
25
|
default: false
|
26
|
-
prop :tag, type: Playbook::Props::Enum,
|
27
|
-
values: %w[table div],
|
28
|
-
default: "table"
|
29
26
|
|
30
27
|
def classname
|
31
|
-
generate_classname("pb_table_header_kit", align_class)
|
32
|
-
end
|
33
|
-
|
34
|
-
def tag_class
|
35
|
-
" pb_table_th"
|
28
|
+
generate_classname("pb_table_header_kit", align_class)
|
36
29
|
end
|
37
30
|
|
38
31
|
def align_class
|
@@ -1,17 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
<% end %>
|
9
|
-
<% else %>
|
10
|
-
<%= content_tag(:div,
|
11
|
-
aria: object.aria,
|
12
|
-
class: object.classname,
|
13
|
-
data: object.data,
|
14
|
-
id: object.id) do %>
|
15
|
-
<%= content.presence %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
1
|
+
<%= content_tag(:tr,
|
2
|
+
aria: object.aria,
|
3
|
+
class: object.classname,
|
4
|
+
data: object.data,
|
5
|
+
id: object.id) do %>
|
6
|
+
<%= content.presence %>
|
7
|
+
<% end %>
|
@@ -5,21 +5,14 @@ module Playbook
|
|
5
5
|
class TableRow < Playbook::KitBase
|
6
6
|
prop :side_highlight_color, type: Playbook::Props::String,
|
7
7
|
default: "none"
|
8
|
-
prop :tag, type: Playbook::Props::Enum,
|
9
|
-
values: %w[table div],
|
10
|
-
default: "table"
|
11
8
|
|
12
9
|
def classname
|
13
|
-
generate_classname("pb_table_row_kit", side_highlight_class)
|
10
|
+
generate_classname("pb_table_row_kit", side_highlight_class)
|
14
11
|
end
|
15
12
|
|
16
13
|
def side_highlight_class
|
17
14
|
side_highlight_color.present? ? "side_highlight_#{side_highlight_color}" : nil
|
18
15
|
end
|
19
|
-
|
20
|
-
def tag_class
|
21
|
-
" pb_table_tr"
|
22
|
-
end
|
23
16
|
end
|
24
17
|
end
|
25
18
|
end
|
@@ -27,7 +27,7 @@ type TextInputProps = {
|
|
27
27
|
required?: boolean,
|
28
28
|
type: string,
|
29
29
|
value: string | number,
|
30
|
-
children:
|
30
|
+
children: Node,
|
31
31
|
addOn?: {
|
32
32
|
icon?: string,
|
33
33
|
alignment?: "right" | "left",
|
@@ -85,12 +85,8 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
85
85
|
icon={icon}
|
86
86
|
/>
|
87
87
|
)
|
88
|
-
|
89
|
-
const childInput = children ? children.type === "input" : undefined
|
90
|
-
|
91
88
|
const textInput = (
|
92
|
-
|
93
|
-
(<input
|
89
|
+
<input
|
94
90
|
{...domSafeProps(props)}
|
95
91
|
className="text_input"
|
96
92
|
disabled={disabled}
|
@@ -103,7 +99,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
103
99
|
required={required}
|
104
100
|
type={type}
|
105
101
|
value={value}
|
106
|
-
/>
|
102
|
+
/>
|
107
103
|
)
|
108
104
|
|
109
105
|
const addOnInput = (
|
@@ -135,7 +131,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
135
131
|
)
|
136
132
|
|
137
133
|
const render = (() => {
|
138
|
-
if
|
134
|
+
if(children) return children
|
139
135
|
if (shouldShowAddOn) return addOnInput
|
140
136
|
|
141
137
|
return textInput
|
@@ -148,7 +144,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
148
144
|
{...htmlProps}
|
149
145
|
className={css}
|
150
146
|
>
|
151
|
-
{label &&
|
147
|
+
{label &&
|
152
148
|
<Caption
|
153
149
|
className="pb_text_input_kit_label"
|
154
150
|
text={label}
|
@@ -58,16 +58,6 @@ const TextInputAddOn = (props) => {
|
|
58
58
|
{...props}
|
59
59
|
/>
|
60
60
|
</div>
|
61
|
-
<div>
|
62
|
-
<TextInput
|
63
|
-
addOn={{ icon: 'frog', alignment: 'right', border: true }}
|
64
|
-
label="Right-Aligned Add On With Child Input"
|
65
|
-
onChange={handleUpdateFourthInput}
|
66
|
-
{...props}
|
67
|
-
>
|
68
|
-
<input />
|
69
|
-
</TextInput>
|
70
|
-
</div>
|
71
61
|
<div>
|
72
62
|
<TextInput
|
73
63
|
addOn={{ icon: 'percent', alignment: 'left', border: false }}
|
@@ -86,16 +76,6 @@ const TextInputAddOn = (props) => {
|
|
86
76
|
{...props}
|
87
77
|
/>
|
88
78
|
</div>
|
89
|
-
<div>
|
90
|
-
<TextInput
|
91
|
-
addOn={{ icon: 'frog', alignment: 'left', border: true }}
|
92
|
-
label="Left-Aligned Add On With Child Input"
|
93
|
-
onChange={handleUpdateFourthInput}
|
94
|
-
{...props}
|
95
|
-
>
|
96
|
-
<input />
|
97
|
-
</TextInput>
|
98
|
-
</div>
|
99
79
|
</>
|
100
80
|
)
|
101
81
|
}
|
@@ -7,5 +7,4 @@
|
|
7
7
|
| **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
|
8
8
|
| **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
|
9
9
|
| **territory** | `String` | Adds the User's territory | | |
|
10
|
-
| **title** | `String` | Adds a title | | |
|
11
|
-
| **status** | `PBAvatar.PresenceStatus?` | An idicator for the current status of the user | `.none` | `.online` `.away` `.offline` |
|
10
|
+
| **title** | `String` | Adds a title | | |
|