playbook_ui 14.12.0.pre.alpha.PLAY1602lightboxoverlapnitrobug5655 → 14.12.0.pre.alpha.advancedtablealignmentfixes5693
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/pb_advanced_table/Components/CustomCell.tsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +13 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +15 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +11 -11
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +12 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +7 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +9 -0
- data/app/pb_kits/playbook/pb_card/card.html.erb +21 -2
- data/app/pb_kits/playbook/pb_card/card.rb +7 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +6 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_table/table_row.rb +1 -1
- data/dist/chunks/_weekday_stacked-N1NVUtQO.js +45 -0
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +10 -3
- data/dist/chunks/_weekday_stacked-zyBCd1s8.js +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e4dc3d2e5a79486ca82c7d90654b0cf1db86bdb42cc9c0540ffb9635c373174
|
4
|
+
data.tar.gz: cb9d6f1a2680e4ac81dc637ec1984efa4368d5b0739c44f6134ec44f214dccd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77ec944b74d30f62a35b54bb1138fa97dd7b4635a67375336fd6c4fd6d3d2875abb8338d271a874688c22f562e126c49387d2ce5ca1d9610a3b12d077f5efb7a
|
7
|
+
data.tar.gz: dfbf55ff877f9c17064e58ee45b72a24adf289238e3b06cac9b27f4fa3492dec18d7d6b756cd5053b954d1142de84942468d8b794e2f3432dc8c88e16c19a3c7
|
@@ -39,7 +39,7 @@ export const TableHeaderCell = ({
|
|
39
39
|
sortIcon,
|
40
40
|
table
|
41
41
|
}: TableHeaderCellProps) => {
|
42
|
-
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar } =
|
42
|
+
const { sortControl, responsive, selectableRows, hasAnySubRows, showActionsBar, inlineRowLoading } =
|
43
43
|
useContext(AdvancedTableContext);
|
44
44
|
|
45
45
|
type justifyTypes = "none" | "center" | "start" | "end" | "between" | "around" | "evenly"
|
@@ -91,7 +91,7 @@ const isToggleExpansionEnabled =
|
|
91
91
|
|
92
92
|
let justifyHeader:justifyTypes;
|
93
93
|
|
94
|
-
if (header?.index === 0 && hasAnySubRows) {
|
94
|
+
if (header?.index === 0 && hasAnySubRows || (header?.index === 0 && inlineRowLoading)) {
|
95
95
|
justifyHeader = enableSorting ? "between" : "start";
|
96
96
|
} else {
|
97
97
|
justifyHeader = isLeafColumn ? "end" : "center";
|
@@ -1,10 +1,15 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
2
|
+
<%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive: "none", dark: dark }.merge(object.table_props)) do %>
|
3
|
+
<% if content.present? %>
|
4
|
+
<% content.presence %>
|
5
|
+
<% else %>
|
6
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions,
|
7
|
+
enable_toggle_expansion: object.enable_toggle_expansion,
|
8
|
+
responsive: object.responsive }) %>
|
9
|
+
<%= pb_rails("advanced_table/table_body", props: { id: object.id,
|
10
|
+
table_data: object.table_data,
|
11
|
+
column_definitions: object.column_definitions,
|
12
|
+
responsive: object.responsive }) %>
|
13
|
+
<% end %>
|
14
|
+
<% end %>
|
10
15
|
<% end %>
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
<% column_definitions = [
|
3
|
+
{
|
4
|
+
accessor: "year",
|
5
|
+
label: "Year",
|
6
|
+
cellAccessors: ["quarter", "month", "day"],
|
7
|
+
},
|
8
|
+
{
|
9
|
+
accessor: "newEnrollments",
|
10
|
+
label: "New Enrollments",
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "scheduledMeetings",
|
14
|
+
label: "Scheduled Meetings",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "attendanceRate",
|
18
|
+
label: "Attendance Rate",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "completedClasses",
|
22
|
+
label: "Completed Classes",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "classCompletionRate",
|
26
|
+
label: "Class Completion Rate",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "graduatedStudents",
|
30
|
+
label: "Graduated Students",
|
31
|
+
},
|
32
|
+
] %>
|
33
|
+
|
34
|
+
<%= pb_rails("title", props: { size: 4 }) do %> Not Responsive <% end %>
|
35
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table_non_responsive", table_data: @table_data, column_definitions: column_definitions, responsive: "none" }) %>
|
36
|
+
|
37
|
+
<%= pb_rails("title", props: { padding_top: "sm", size: 4 }) do %> Responsive as Default <% end %>
|
38
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table_responsive", table_data: @table_data, column_definitions: column_definitions }) %>
|
@@ -5,6 +5,7 @@ examples:
|
|
5
5
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
6
6
|
- advanced_table_table_props: Table Props
|
7
7
|
- advanced_table_beta_sort: Enable Sorting
|
8
|
+
- advanced_table_responsive: Responsive Tables
|
8
9
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
9
10
|
- advanced_table_column_headers: Multi-Header Columns
|
10
11
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
@@ -16,6 +16,9 @@ module Playbook
|
|
16
16
|
default: []
|
17
17
|
prop :collapsible_trail, type: Playbook::Props::Boolean,
|
18
18
|
default: true
|
19
|
+
prop :responsive, type: Playbook::Props::Enum,
|
20
|
+
values: %w[none scroll],
|
21
|
+
default: "scroll"
|
19
22
|
|
20
23
|
def flatten_columns(columns)
|
21
24
|
columns.flat_map do |col|
|
@@ -46,12 +49,12 @@ module Playbook
|
|
46
49
|
row_parent: "#{id}_#{ancestor_ids.last}",
|
47
50
|
}
|
48
51
|
# Subrow header if applicable
|
49
|
-
output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: leaf_columns, depth: current_depth, subrow_header: subrow_headers[current_depth - 1], collapsible_trail: collapsible_trail, classname: "toggle-content", subrow_data_attributes: subrow_data_attributes }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
|
52
|
+
output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: leaf_columns, depth: current_depth, subrow_header: subrow_headers[current_depth - 1], collapsible_trail: collapsible_trail, classname: "toggle-content", responsive: responsive, subrow_data_attributes: subrow_data_attributes }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
|
50
53
|
|
51
54
|
current_data_attributes = current_depth.zero? ? { row_depth: 0 } : table_data_attributes
|
52
55
|
|
53
56
|
# Additional class and data attributes needed for toggle logic
|
54
|
-
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes })
|
57
|
+
output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: leaf_columns, depth: current_depth, collapsible_trail: collapsible_trail, classname: additional_classes, table_data_attributes: current_data_attributes, responsive: responsive })
|
55
58
|
|
56
59
|
if row[:children].present?
|
57
60
|
row[:children].each do |child_row|
|
@@ -74,7 +77,16 @@ module Playbook
|
|
74
77
|
end
|
75
78
|
|
76
79
|
def classname
|
77
|
-
|
80
|
+
additional_classes = []
|
81
|
+
additional_classes << "advanced-table-responsive-#{responsive} pinned-left" if responsive == "scroll"
|
82
|
+
|
83
|
+
generate_classname("pb_advanced_table_body", *additional_classes, separator: " ")
|
84
|
+
end
|
85
|
+
|
86
|
+
def pinned_cell_class(index)
|
87
|
+
return "pinned-left" if index.zero? && responsive == "scroll"
|
88
|
+
|
89
|
+
""
|
78
90
|
end
|
79
91
|
|
80
92
|
private
|
@@ -3,17 +3,17 @@
|
|
3
3
|
<%= pb_rails("table/table_row") do %>
|
4
4
|
<% header_row.each_with_index do |cell, cell_index| %>
|
5
5
|
<% header_id = cell[:accessor].present? ? cell[:accessor] : "header_#{row_index}_#{cell_index}" %>
|
6
|
-
<%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname, ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
6
|
+
<%= pb_rails("table/table_header", props: { id: header_id, colspan: cell[:colspan], classname: [object.th_classname(is_first_column: cell_index.zero?), ('last-header-cell' if cell[:is_last_in_group] && cell_index != 0)].compact.join(' '), sort_menu: cell[:accessor] ? cell[:sort_menu] : nil }) do %>
|
7
|
+
<%= pb_rails("flex", props: { align: "center", justify: cell_index.zero? ? "start" : row_index === header_rows.size - 1 ? "end" : "center", text_align: "end" }) do %>
|
8
|
+
<% if cell_index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") && row_index === header_rows.size - 1 %>
|
9
|
+
<button
|
10
|
+
class="gray-icon toggle-all-icon"
|
11
|
+
onclick="expandAllRows(this); event.preventDefault();">
|
12
|
+
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right: "xs" }) %>
|
13
|
+
</button>
|
14
|
+
<% end %>
|
15
|
+
<%= cell[:label] %>
|
16
|
+
<% end %>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
<% end %>
|
@@ -8,13 +8,22 @@ module Playbook
|
|
8
8
|
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
9
9
|
values: %w[all header none],
|
10
10
|
default: "header"
|
11
|
+
prop :responsive, type: Playbook::Props::Enum,
|
12
|
+
values: %w[none scroll],
|
13
|
+
default: "scroll"
|
11
14
|
|
12
15
|
def classname
|
13
|
-
|
16
|
+
additional_classes = []
|
17
|
+
additional_classes << "advanced-table-responsive-#{responsive} pinned-left" if responsive == "scroll"
|
18
|
+
|
19
|
+
generate_classname("pb_advanced_table_header", "pb_table_thead", *additional_classes, separator: " ")
|
14
20
|
end
|
15
21
|
|
16
|
-
def th_classname
|
17
|
-
|
22
|
+
def th_classname(is_first_column: false)
|
23
|
+
additional_classes = []
|
24
|
+
additional_classes << "pinned-left" if is_first_column && responsive == "scroll"
|
25
|
+
|
26
|
+
generate_classname("table-header-cells", *additional_classes, separator: " ")
|
18
27
|
end
|
19
28
|
|
20
29
|
def header_rows
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= pb_content_tag(:tr) do %>
|
2
2
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
3
|
<% next unless column[:accessor].present? %>
|
4
|
-
<%= pb_rails("table/table_cell", props: { classname:object.td_classname(column)}) do %>
|
4
|
+
<%= pb_rails("table/table_cell", props: { classname:object.td_classname(column, index)}) do %>
|
5
5
|
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
6
6
|
<% if collapsible_trail && index.zero? %>
|
7
7
|
<% (1..depth).each do |i| %>
|
@@ -13,6 +13,11 @@ module Playbook
|
|
13
13
|
default: true
|
14
14
|
prop :table_data_attributes, type: Playbook::Props::HashProp,
|
15
15
|
default: {}
|
16
|
+
prop :responsive, type: Playbook::Props::Enum,
|
17
|
+
values: %w[none scroll],
|
18
|
+
default: "scroll"
|
19
|
+
prop :is_pinned_left, type: Playbook::Props::Boolean,
|
20
|
+
default: false
|
16
21
|
|
17
22
|
def data
|
18
23
|
Hash(prop(:data)).merge(table_data_attributes)
|
@@ -22,9 +27,10 @@ module Playbook
|
|
22
27
|
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
23
28
|
end
|
24
29
|
|
25
|
-
def td_classname(column)
|
30
|
+
def td_classname(column, index)
|
26
31
|
classes = %w[id-cell chrome-styles]
|
27
32
|
classes << "last-cell" if column[:is_last_in_group]
|
33
|
+
classes << "pinned-left" if index.zero? && is_pinned_left && responsive == "scroll"
|
28
34
|
classes.join(" ")
|
29
35
|
end
|
30
36
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= pb_content_tag(:tr) do %>
|
2
2
|
<% object.column_definitions.each_with_index do |column, index| %>
|
3
|
-
<%= pb_rails("table/table_cell", props: { classname:
|
3
|
+
<%= pb_rails("table/table_cell", props: { classname: object.td_classname(index) }) do %>
|
4
4
|
<%= pb_rails("flex", props:{ align: "center", justify: "start" }) do %>
|
5
5
|
<% if collapsible_trail && index.zero? %>
|
6
6
|
<% (1..depth).each do |i| %>
|
@@ -16,6 +16,9 @@ module Playbook
|
|
16
16
|
default: true
|
17
17
|
prop :subrow_data_attributes, type: Playbook::Props::HashProp,
|
18
18
|
default: {}
|
19
|
+
prop :responsive, type: Playbook::Props::Enum,
|
20
|
+
values: %w[none scroll],
|
21
|
+
default: "scroll"
|
19
22
|
|
20
23
|
def data
|
21
24
|
Hash(prop(:data)).merge(subrow_data_attributes)
|
@@ -25,6 +28,12 @@ module Playbook
|
|
25
28
|
generate_classname("pb_table_tr", "bg-silver", "pb_subrow_header", subrow_depth_classname, separator: " ")
|
26
29
|
end
|
27
30
|
|
31
|
+
def td_classname(index)
|
32
|
+
classes = %w[id-cell chrome-styles]
|
33
|
+
classes << "pinned-left" if index.zero? && responsive == "scroll"
|
34
|
+
classes.join(" ")
|
35
|
+
end
|
36
|
+
|
28
37
|
private
|
29
38
|
|
30
39
|
def subrow_depth_classname
|
@@ -1,5 +1,24 @@
|
|
1
|
-
|
2
|
-
<%=
|
1
|
+
<% if object.draggable_item %>
|
2
|
+
<%= pb_rails("draggable/draggable_item", props:{drag_id: object.drag_id}) do %>
|
3
|
+
<%= pb_content_tag(object.tag) do %>
|
4
|
+
<% if object.draggable_item %>
|
5
|
+
<%= pb_rails("flex", props: { align: "center" }) do %>
|
6
|
+
<% if object.drag_handle %>
|
7
|
+
<span classname="card_draggable_handle">
|
8
|
+
<%= pb_rails("icon", props: { icon: "grip-dots-vertical", padding_right: "xs" }) %>
|
9
|
+
</span>
|
10
|
+
<% end %>
|
11
|
+
<div style="width: 100%">
|
12
|
+
<%= content.presence %>
|
13
|
+
</div>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
18
|
+
<% else %>
|
19
|
+
<%= pb_content_tag(object.tag) do %>
|
20
|
+
<%= content.presence %>
|
21
|
+
<% end %>
|
3
22
|
<% end %>
|
4
23
|
|
5
24
|
|
@@ -17,6 +17,13 @@ module Playbook
|
|
17
17
|
prop :background, type: Playbook::Props::Enum,
|
18
18
|
values: %w[white light dark product_1_background product_1_highlight product_2_background product_2_highlight product_3_background product_3_highlight product_4_background product_4_highlight product_5_background product_5_highlight product_6_background product_6_highlight product_7_background product_7_highlight product_8_background product_8_highlight product_9_background product_9_highlight product_10_background product_10_highlight windows siding doors solar roofing gutters insulation none success_subtle warning_subtle error_subtle info_subtle neutral_subtle],
|
19
19
|
default: "none"
|
20
|
+
prop :drag_id, type: Playbook::Props::String
|
21
|
+
prop :draggable_item, type: Playbook::Props::Boolean,
|
22
|
+
default: false
|
23
|
+
prop :drag_handle, type: Playbook::Props::Boolean,
|
24
|
+
default: true
|
25
|
+
prop :items, type: Playbook::Props::Array,
|
26
|
+
default: []
|
20
27
|
|
21
28
|
def classname
|
22
29
|
generate_classname("pb_card_kit",
|
@@ -7,8 +7,7 @@
|
|
7
7
|
<%= pb_rails("draggable", props: {initial_items: initial_items}) do %>
|
8
8
|
<%= pb_rails("draggable/draggable_container") do %>
|
9
9
|
<% initial_items.each do |item| %>
|
10
|
-
|
11
|
-
<%= pb_rails("card", props: {highlight: {position: "side", color:"primary"}, margin_bottom: "xs", padding: "xs"}) do %>
|
10
|
+
<%= pb_rails("card", props: {highlight: {position: "side", color:"primary"}, margin_bottom: "xs", padding: "xs", drag_id: item[:id], draggable_item: true }) do %>
|
12
11
|
<%= pb_rails("flex", props:{align_items: "stretch", flex_direction:"column"}) do %>
|
13
12
|
<%= pb_rails("flex", props:{gap: "xs"}) do %>
|
14
13
|
<%= pb_rails("title", props: { text: item[:name], tag: "h4", size: 4 }) %>
|
@@ -32,7 +31,6 @@
|
|
32
31
|
<% end %>
|
33
32
|
<% end %>
|
34
33
|
<% end %>
|
35
|
-
<% end %>
|
36
34
|
<% end %>
|
37
35
|
<% end %>
|
38
36
|
<% end %>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
For a simplified version of the Draggable API for the Card kit, you can do the following:
|
2
|
+
|
3
|
+
Use the `draggable` kit and manage state as shown.
|
4
|
+
|
5
|
+
`draggable/draggable_container` kit creates the container within which the cards can be dragged and dropped.
|
6
|
+
|
7
|
+
The Card kit is optimized to work with the draggable kit. To enable drag, use the `draggable_item` and `drag_id` props on the Card kit as shown. An additional optional boolean prop (set to true by default) of `drag_handle` is also available to show the drag handle icon.
|
@@ -2,7 +2,6 @@
|
|
2
2
|
@import "../tokens/screen_sizes";
|
3
3
|
|
4
4
|
$slides-margin: $space-md;
|
5
|
-
$lightbox-z-index-floor: 9999900;
|
6
5
|
|
7
6
|
.carousel {
|
8
7
|
|
@@ -14,7 +13,7 @@ $lightbox-z-index-floor: 9999900;
|
|
14
13
|
top: 0;
|
15
14
|
left: 0;
|
16
15
|
right: 0;
|
17
|
-
z-index:
|
16
|
+
z-index: 9999999;
|
18
17
|
align-items: center;
|
19
18
|
transition: all .5s;
|
20
19
|
|
@@ -56,7 +55,7 @@ $lightbox-z-index-floor: 9999900;
|
|
56
55
|
justify-content: space-between;
|
57
56
|
flex-direction: column;
|
58
57
|
background-color: black;
|
59
|
-
z-index:
|
58
|
+
z-index: 1;
|
60
59
|
overflow: hidden;
|
61
60
|
}
|
62
61
|
|
@@ -64,7 +63,7 @@ $lightbox-z-index-floor: 9999900;
|
|
64
63
|
display: flex;
|
65
64
|
height: calc(100% - 120px);
|
66
65
|
width: 100%;
|
67
|
-
z-index:
|
66
|
+
z-index: 1;
|
68
67
|
|
69
68
|
[class^="react-transform-wrapper"] {
|
70
69
|
flex-shrink: 0;
|
@@ -88,7 +87,7 @@ $lightbox-z-index-floor: 9999900;
|
|
88
87
|
.carousel-arrow-left {
|
89
88
|
display: block;
|
90
89
|
position: absolute;
|
91
|
-
z-index:
|
90
|
+
z-index: 4;
|
92
91
|
top: 50%;
|
93
92
|
@media only screen and (max-width: $screen-xs-max) {
|
94
93
|
display: none;
|
@@ -98,7 +97,7 @@ $lightbox-z-index-floor: 9999900;
|
|
98
97
|
.carousel-arrow-right {
|
99
98
|
display: block;
|
100
99
|
position: absolute;
|
101
|
-
z-index:
|
100
|
+
z-index: 4;
|
102
101
|
top: 50%;
|
103
102
|
right: 0;
|
104
103
|
@media only screen and (max-width: $screen-xs-max) {
|
@@ -141,7 +140,7 @@ $lightbox-z-index-floor: 9999900;
|
|
141
140
|
width: 100vw;
|
142
141
|
padding: 3px;
|
143
142
|
overflow: scroll;
|
144
|
-
z-index:
|
143
|
+
z-index: 20;
|
145
144
|
&.centered {
|
146
145
|
justify-content: center;
|
147
146
|
}
|
@@ -8,27 +8,31 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
8
8
|
<Card
|
9
9
|
borderNone
|
10
10
|
borderRadius="none"
|
11
|
-
color="light"
|
11
|
+
color="light"
|
12
12
|
paddingX="xl"
|
13
13
|
paddingY="md"
|
14
14
|
{...props}
|
15
15
|
>
|
16
|
-
<Body paddingBottom="sm"
|
16
|
+
<Body paddingBottom="sm"
|
17
17
|
text="Expanded Custom Layout"
|
18
18
|
{...props}
|
19
19
|
/>
|
20
20
|
<Flex justify="between">
|
21
21
|
<Image
|
22
|
-
|
22
|
+
size="sm"
|
23
|
+
url="https://unsplash.it/500/400/?image=634"
|
23
24
|
/>
|
24
25
|
<Image
|
25
|
-
|
26
|
+
size="sm"
|
27
|
+
url="https://unsplash.it/500/400/?image=634"
|
26
28
|
/>
|
27
29
|
<Image
|
28
|
-
|
30
|
+
size="sm"
|
31
|
+
url="https://unsplash.it/500/400/?image=634"
|
29
32
|
/>
|
30
33
|
<Image
|
31
|
-
|
34
|
+
size="sm"
|
35
|
+
url="https://unsplash.it/500/400/?image=634"
|
32
36
|
/>
|
33
37
|
</Flex>
|
34
38
|
</Card>
|
@@ -52,7 +56,7 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
52
56
|
|
53
57
|
</Table.Head>
|
54
58
|
<Table.Body>
|
55
|
-
<Table.Row collapsible
|
59
|
+
<Table.Row collapsible
|
56
60
|
collapsibleContent={<Content/>}
|
57
61
|
{...props}
|
58
62
|
>
|
@@ -61,7 +65,7 @@ const TableWithCollapsibleWithCustomContent = (props) => {
|
|
61
65
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
62
66
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
63
67
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
64
|
-
<Table.Cell textAlign="right">{
|
68
|
+
<Table.Cell textAlign="right">{
|
65
69
|
<Icon
|
66
70
|
color="primary"
|
67
71
|
fixedWidth
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("card", props: { border_none: true, border_radius: "none", padding: "md" }) do %>
|
3
|
+
<%= pb_rails("body", props: { text: "Expanded Custom Layout", padding_bottom: "sm" }) %>
|
4
|
+
<%= pb_rails("flex", props: { justify: "between" }) do %>
|
5
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
6
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
7
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
8
|
+
<%= pb_rails("image", props: { size: "sm", url: "https://unsplash.it/500/400/?image=634" }) %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
14
|
+
<%= pb_rails("table/table_head") do %>
|
15
|
+
<%= pb_rails("table/table_row") do %>
|
16
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
17
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
18
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
19
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
20
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
21
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<%= pb_rails("table/table_body") do %>
|
25
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, id: "2" }) do %>
|
26
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
32
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<%= pb_rails("table/table_row") do %>
|
36
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
37
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
42
|
+
<% end %>
|
43
|
+
<%= pb_rails("table/table_row") do %>
|
44
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
45
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
46
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
47
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
48
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
49
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
File without changes
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
<% content = capture do %>
|
2
|
+
<%= pb_rails("table", props: { container: false, border_radius: "none", size: "sm"}) do %>
|
3
|
+
<%= pb_rails("background", props: { tag: "tr" }) do %>
|
4
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
5
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
6
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
7
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
8
|
+
<%= pb_rails("table/table_cell") do %>Expanded<% end %>
|
9
|
+
<% end %>
|
10
|
+
<% end %>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<%= pb_rails("table", props: { size: "sm" }) do %>
|
14
|
+
<%= pb_rails("table/table_head") do %>
|
15
|
+
<%= pb_rails("table/table_row") do %>
|
16
|
+
<%= pb_rails("table/table_header", props: { text: "Column 1"}) %>
|
17
|
+
<%= pb_rails("table/table_header", props: { text: "Column 2"}) %>
|
18
|
+
<%= pb_rails("table/table_header", props: { text: "Column 3"}) %>
|
19
|
+
<%= pb_rails("table/table_header", props: { text: "Column 4"}) %>
|
20
|
+
<%= pb_rails("table/table_header", props: { text: "Column 5"}) %>
|
21
|
+
<%= pb_rails("table/table_header", props: { text: ""}) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<%= pb_rails("table/table_body") do %>
|
25
|
+
<%= pb_rails("table/table_row", props: { collapsible: true, collapsible_content: content, collapsible_side_highlight: false, id: "3" }) do %>
|
26
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
27
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
28
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
29
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
30
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
31
|
+
<%= pb_rails("table/table_cell", props: { text_align: "right"}) do %>
|
32
|
+
<%= pb_rails("icon", props: { icon: "chevron-down", fixed_width: true, color: "primary" }) %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
<%= pb_rails("table/table_row") do %>
|
36
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
37
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
38
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
39
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
40
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
41
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
42
|
+
<% end %>
|
43
|
+
<%= pb_rails("table/table_row") do %>
|
44
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 1"}) %>
|
45
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 2"}) %>
|
46
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 3"}) %>
|
47
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 4"}) %>
|
48
|
+
<%= pb_rails("table/table_cell", props: { text: "Value 5"}) %>
|
49
|
+
<%= pb_rails("table/table_cell", props: { text: ""}) %>
|
50
|
+
<% end %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|