playbook_ui 14.10.0.pre.alpha.play16825301 → 14.10.0.pre.rc.0
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 +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +19 -32
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +1 -3
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -46
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +36 -94
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -8
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -4
- data/app/pb_kits/playbook/pb_advanced_table/index.js +92 -185
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +8 -57
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +13 -18
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -78
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -12
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -15
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +6 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +4 -8
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +9 -11
- data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -4
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
- data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -3
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
- data/app/pb_kits/playbook/pb_button/_button.scss +1 -3
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
- data/app/pb_kits/playbook/pb_card/_card.scss +3 -21
- data/app/pb_kits/playbook/pb_card/_card.tsx +7 -7
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -39
- data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +0 -90
- data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +2 -4
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -3
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +0 -8
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +0 -9
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -9
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
- data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -3
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +3 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -6
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -4
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +2 -2
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +8 -10
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +17 -31
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +1 -3
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx +1 -4
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -11
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +4 -6
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +1 -31
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +3 -3
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +5 -25
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +1 -17
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +0 -15
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +1 -15
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +14 -4
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +2 -4
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +11 -30
- data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -3
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -3
- data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
- data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
- data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -5
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +8 -10
- data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -4
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -64
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
- data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_section_separator/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -4
- data/app/pb_kits/playbook/pb_select/_select.scss +3 -5
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +7 -9
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +3 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -2
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -8
- data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +1 -48
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
- data/app/pb_kits/playbook/pb_table/_table.tsx +24 -80
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +1 -4
- data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_table/docs/index.js +0 -7
- data/app/pb_kits/playbook/pb_table/index.ts +26 -102
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
- data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -63
- data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +4 -17
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
- data/app/pb_kits/playbook/pb_table/table.html.erb +2 -8
- data/app/pb_kits/playbook/pb_table/table.rb +2 -21
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +4 -43
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -219
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -3
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -5
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -4
- data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -5
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +5 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +4 -4
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +1 -1
- data/app/pb_kits/playbook/pb_timeline/timeline.rb +6 -6
- data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -5
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +46 -115
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -9
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -3
- data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
- data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
- data/app/pb_kits/playbook/utilities/globalProps.ts +9 -20
- data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
- data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
- data/dist/chunks/_weekday_stacked-CiL8BjKa.js +45 -0
- data/dist/chunks/{lib-B7sgJtGS.js → lib-SyD3buPZ.js} +3 -3
- data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -2
- data/dist/playbook-doc.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/classnames.rb +0 -1
- data/lib/playbook/hover.rb +1 -7
- data/lib/playbook/spacing.rb +0 -21
- data/lib/playbook/version.rb +2 -2
- metadata +8 -59
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +0 -36
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +0 -43
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +0 -60
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +0 -58
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +0 -74
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +0 -1
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +0 -57
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +0 -32
- data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +0 -29
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +0 -10
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +0 -42
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +0 -9
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +0 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +0 -7
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +0 -119
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +0 -174
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +0 -15
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +0 -3
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +0 -63
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +0 -97
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +0 -88
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -77
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +0 -87
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +0 -5
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
- data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -106
- data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -108
- data/app/pb_kits/playbook/utilities/_gap.scss +0 -29
- data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
- data/dist/chunks/_weekday_stacked-CWnbnW7m.js +0 -45
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius_react.md → _skeleton_loading_border_radius.md} +0 -0
- /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width_react.md → _skeleton_loading_height_width.md} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= pb_content_tag do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
<%= pb_rails("body", props: { status: object.status }) do %>
|
3
|
+
<%= pb_rails("icon", props: { fixed_width: true, icon: object.returned_icon }) if object.returned_icon %>
|
4
|
+
<%= "#{object.value}%" if object.value %>
|
5
|
+
<% end %>
|
6
6
|
<% end %>
|
@@ -28,8 +28,7 @@ type TableProps = {
|
|
28
28
|
singleLine?: boolean,
|
29
29
|
size?: "sm" | "md" | "lg",
|
30
30
|
sticky?: boolean,
|
31
|
-
|
32
|
-
stickyRightColumn?: string[],
|
31
|
+
stickyLeftcolumn?: string[],
|
33
32
|
striped?: boolean,
|
34
33
|
tag?: "table" | "div",
|
35
34
|
verticalBorder?: boolean,
|
@@ -53,8 +52,7 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
53
52
|
singleLine = false,
|
54
53
|
size = 'sm',
|
55
54
|
sticky = false,
|
56
|
-
|
57
|
-
stickyRightColumn= [],
|
55
|
+
stickyLeftcolumn = [],
|
58
56
|
striped = false,
|
59
57
|
tag = 'table',
|
60
58
|
verticalBorder = false,
|
@@ -69,7 +67,6 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
69
67
|
const outerPaddingCss = outerPadding ? `outer_padding_${spaceCssName}${outerPadding}` : ''
|
70
68
|
const isTableTag = tag === 'table'
|
71
69
|
const dynamicInlineProps = globalInlineProps(props)
|
72
|
-
const stickyRightColumnReversed = stickyRightColumn.reverse()
|
73
70
|
|
74
71
|
const classNames = classnames(
|
75
72
|
'pb_table',
|
@@ -82,8 +79,7 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
82
79
|
'single-line': singleLine,
|
83
80
|
'no-hover': disableHover,
|
84
81
|
'sticky-header': sticky,
|
85
|
-
'sticky-left-column':
|
86
|
-
'sticky-right-column': stickyRightColumn,
|
82
|
+
'sticky-left-column': stickyLeftcolumn,
|
87
83
|
'striped': striped,
|
88
84
|
[outerPaddingCss]: outerPadding !== '',
|
89
85
|
},
|
@@ -94,106 +90,54 @@ const Table = (props: TableProps): React.ReactElement => {
|
|
94
90
|
)
|
95
91
|
|
96
92
|
useEffect(() => {
|
97
|
-
const
|
98
|
-
if (!stickyLeftColumn.length) return;
|
93
|
+
const handleStickyColumns = () => {
|
99
94
|
let accumulatedWidth = 0;
|
100
|
-
|
101
|
-
|
102
|
-
const isLastColumn = index ===
|
95
|
+
|
96
|
+
stickyLeftcolumn.forEach((colId, index) => {
|
97
|
+
const isLastColumn = index === stickyLeftcolumn.length - 1;
|
103
98
|
const header = document.querySelector(`th[id="${colId}"]`);
|
104
99
|
const cells = document.querySelectorAll(`td[id="${colId}"]`);
|
105
|
-
|
100
|
+
|
106
101
|
if (header) {
|
107
102
|
header.classList.add('sticky');
|
108
103
|
(header as HTMLElement).style.left = `${accumulatedWidth}px`;
|
109
|
-
|
104
|
+
|
110
105
|
if (!isLastColumn) {
|
111
|
-
header.classList.add('with-border
|
112
|
-
header.classList.remove('sticky-
|
106
|
+
header.classList.add('with-border');
|
107
|
+
header.classList.remove('sticky-shadow');
|
113
108
|
} else {
|
114
|
-
header.classList.remove('with-border
|
115
|
-
header.classList.add('sticky-
|
109
|
+
header.classList.remove('with-border');
|
110
|
+
header.classList.add('sticky-shadow');
|
116
111
|
}
|
117
|
-
|
112
|
+
|
118
113
|
accumulatedWidth += (header as HTMLElement).offsetWidth;
|
119
114
|
}
|
120
|
-
|
115
|
+
|
121
116
|
cells.forEach((cell) => {
|
122
117
|
cell.classList.add('sticky');
|
123
118
|
(cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
|
124
|
-
|
125
|
-
if (!isLastColumn) {
|
126
|
-
cell.classList.add('with-border-right');
|
127
|
-
cell.classList.remove('sticky-left-shadow');
|
128
|
-
} else {
|
129
|
-
cell.classList.remove('with-border-right');
|
130
|
-
cell.classList.add('sticky-left-shadow');
|
131
|
-
}
|
132
|
-
});
|
133
|
-
});
|
134
|
-
};
|
135
|
-
|
136
|
-
setTimeout(() => {
|
137
|
-
handleStickyLeftColumns();
|
138
|
-
}, 10);
|
139
|
-
|
140
|
-
window.addEventListener('resize', handleStickyLeftColumns);
|
141
|
-
|
142
|
-
return () => {
|
143
|
-
window.removeEventListener('resize', handleStickyLeftColumns);
|
144
|
-
};
|
145
|
-
}, [stickyLeftColumn]);
|
146
|
-
|
147
|
-
useEffect(() => {
|
148
|
-
const handleStickyRightColumns = () => {
|
149
|
-
if (!stickyRightColumn.length) return;
|
150
|
-
let accumulatedWidth = 0;
|
151
|
-
|
152
|
-
stickyRightColumnReversed.forEach((colId, index) => {
|
153
|
-
const isLastColumn = index === stickyRightColumn.length - 1;
|
154
|
-
const header = document.querySelector(`th[id="${colId}"]`);
|
155
|
-
const cells = document.querySelectorAll(`td[id="${colId}"]`);
|
156
|
-
|
157
|
-
if (header) {
|
158
|
-
header.classList.add('sticky');
|
159
|
-
(header as HTMLElement).style.right = `${accumulatedWidth}px`;
|
160
|
-
|
161
|
-
if (!isLastColumn) {
|
162
|
-
header.classList.add('with-border-left');
|
163
|
-
header.classList.remove('sticky-right-shadow');
|
164
|
-
} else {
|
165
|
-
header.classList.remove('with-border-left');
|
166
|
-
header.classList.add('sticky-right-shadow');
|
167
|
-
}
|
168
|
-
|
169
|
-
accumulatedWidth += (header as HTMLElement).offsetWidth;
|
170
|
-
}
|
171
|
-
|
172
|
-
cells.forEach((cell) => {
|
173
|
-
cell.classList.add('sticky');
|
174
|
-
(cell as HTMLElement).style.right = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
|
175
|
-
|
119
|
+
|
176
120
|
if (!isLastColumn) {
|
177
|
-
cell.classList.add('with-border
|
178
|
-
cell.classList.remove('sticky-
|
121
|
+
cell.classList.add('with-border');
|
122
|
+
cell.classList.remove('sticky-shadow');
|
179
123
|
} else {
|
180
|
-
cell.classList.remove('with-border
|
181
|
-
cell.classList.add('sticky-
|
124
|
+
cell.classList.remove('with-border');
|
125
|
+
cell.classList.add('sticky-shadow');
|
182
126
|
}
|
183
127
|
});
|
184
128
|
});
|
185
129
|
};
|
186
130
|
|
187
131
|
setTimeout(() => {
|
188
|
-
|
132
|
+
handleStickyColumns();
|
189
133
|
}, 10);
|
190
134
|
|
191
|
-
window.addEventListener('resize',
|
135
|
+
window.addEventListener('resize', handleStickyColumns);
|
192
136
|
|
193
137
|
return () => {
|
194
|
-
window.removeEventListener('resize',
|
138
|
+
window.removeEventListener('resize', handleStickyColumns);
|
195
139
|
};
|
196
|
-
}, [
|
140
|
+
}, [stickyLeftcolumn]);
|
197
141
|
|
198
142
|
useEffect(() => {
|
199
143
|
const instance = new PbTable()
|
@@ -1,5 +1,2 @@
|
|
1
1
|
The `stickyLeftColumn` prop expects an array of the column ids you want to be sticky. Make sure to add the corresponding id to the `<th>` and `<td>`.
|
2
|
-
|
3
|
-
If you are using the sub-component variant, then you will pass the id to `<Table.Header>` and `<Table.Cell>`
|
4
|
-
|
5
|
-
Please ensure that unique ids are used for all columns across multiple tables. Using the same columns ids on multiple tables can lead to issues when using `stickyLeftColumn` prop.
|
2
|
+
If you are using the sub-component variant, then you will pass the id to `<Table.Header>` and `<Table.Cell>`
|
@@ -4,7 +4,6 @@ examples:
|
|
4
4
|
- table_md: Medium
|
5
5
|
- table_lg: Large
|
6
6
|
- table_sticky: Sticky Header
|
7
|
-
- table_sticky_left_columns: Sticky Left Column
|
8
7
|
- table_header: Table Header
|
9
8
|
- table_alignment_row_rails: Row Alignment
|
10
9
|
- table_alignment_column_rails: Cell Alignment
|
@@ -34,9 +33,6 @@ examples:
|
|
34
33
|
- table_md: Medium
|
35
34
|
- table_lg: Large
|
36
35
|
- table_sticky: Sticky Header
|
37
|
-
- table_sticky_left_columns: Sticky Left Column
|
38
|
-
- table_sticky_right_columns: Sticky Right Column
|
39
|
-
- table_sticky_columns: Sticky Left and Right Columns
|
40
36
|
- table_alignment_row: Row Alignment
|
41
37
|
- table_alignment_column: Cell Alignment
|
42
38
|
- table_alignment_shift_row: Row Shift
|
@@ -59,8 +55,3 @@ examples:
|
|
59
55
|
- table_with_subcomponents: Table with Sub Components (Table Elements)
|
60
56
|
- table_with_subcomponents_as_divs: Table with Sub Components (Divs)
|
61
57
|
- table_outer_padding: Outer Padding
|
62
|
-
- table_with_collapsible: Table with Collapsible
|
63
|
-
- table_with_collapsible_with_custom_click: Table with Collapsible with Custom Click
|
64
|
-
- table_with_collapsible_with_custom_content: Table with Collapsible with Custom Content
|
65
|
-
- table_with_collapsible_with_nested_rows: Table with Collapsible with Nested Rows
|
66
|
-
- table_with_collapsible_with_nested_table: Table with Collapsible with Nested Table
|
@@ -26,10 +26,3 @@ export { default as TableWithSubcomponents } from './_table_with_subcomponents.j
|
|
26
26
|
export { default as TableWithSubcomponentsAsDivs } from './_table_with_subcomponents_as_divs.jsx'
|
27
27
|
export { default as TableOuterPadding } from './_table_outer_padding.jsx'
|
28
28
|
export { default as TableStickyLeftColumns } from './_table_sticky_left_columns.jsx'
|
29
|
-
export { default as TableStickyRightColumns } from './_table_sticky_right_columns.jsx'
|
30
|
-
export { default as TableStickyColumns } from './_table_sticky_columns.jsx'
|
31
|
-
export { default as TableWithCollapsible } from './_table_with_collapsible.jsx'
|
32
|
-
export { default as TableWithCollapsibleWithCustomContent } from './_table_with_collapsible_with_custom_content.jsx'
|
33
|
-
export { default as TableWithCollapsibleWithNestedTable } from './_table_with_collapsible_with_nested_table.jsx'
|
34
|
-
export { default as TableWithCollapsibleWithNestedRows } from './_table_with_collapsible_with_nested_rows.jsx'
|
35
|
-
export { default as TableWithCollapsibleWithCustomClick } from './_table_with_collapsible_with_custom_click.jsx'
|
@@ -1,108 +1,32 @@
|
|
1
1
|
import PbEnhancedElement from '../pb_enhanced_element'
|
2
2
|
|
3
3
|
export default class PbTable extends PbEnhancedElement {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
//
|
14
|
-
|
15
|
-
|
16
|
-
const
|
17
|
-
|
18
|
-
|
19
|
-
for (let i = 0; i < colSpan; i++) {
|
20
|
-
headers.push(header.textContent.replace(/\r?\n|\r/, ''));
|
21
|
-
}
|
22
|
-
});
|
23
|
-
// for each row in tbody
|
24
|
-
[].forEach.call(table.querySelectorAll('tbody tr'), (row: HTMLTableRowElement) => {
|
25
|
-
// for each cell
|
26
|
-
[].forEach.call(row.cells, (cell: HTMLTableCellElement, headerIndex: number) => {
|
27
|
-
// apply the attribute
|
28
|
-
cell.setAttribute('data-title', headers[headerIndex])
|
29
|
-
})
|
30
|
-
})
|
31
|
-
});
|
32
|
-
|
33
|
-
// New sticky columns logic
|
34
|
-
this.initStickyLeftColumns();
|
35
|
-
}
|
36
|
-
|
37
|
-
private initStickyLeftColumns(): void {
|
38
|
-
// Find tables with sticky-left-column class
|
39
|
-
const tables = document.querySelectorAll('.sticky-left-column');
|
40
|
-
|
41
|
-
tables.forEach((table) => {
|
42
|
-
// Extract sticky left column IDs by looking at the component's class
|
43
|
-
const classList = Array.from(table.classList);
|
44
|
-
|
45
|
-
// Look for classes in the format sticky-left-column-{ids}
|
46
|
-
const stickyColumnClass = classList.find(cls => cls.startsWith('sticky-columns-'));
|
47
|
-
if (stickyColumnClass) {
|
48
|
-
// Extract the IDs from the class name
|
49
|
-
this.stickyLeftColumns = stickyColumnClass
|
50
|
-
.replace('sticky-columns-', '')
|
51
|
-
.split('-');
|
52
|
-
|
53
|
-
if (this.stickyLeftColumns.length > 0) {
|
54
|
-
setTimeout(() => {
|
55
|
-
this.handleStickyLeftColumnsRef = this.handleStickyLeftColumns.bind(this);
|
56
|
-
this.handleStickyLeftColumns();
|
57
|
-
window.addEventListener('resize', this.handleStickyLeftColumnsRef);
|
58
|
-
}, 10);
|
59
|
-
}
|
4
|
+
static get selector(): string {
|
5
|
+
return '.table-responsive-collapse'
|
6
|
+
}
|
7
|
+
|
8
|
+
connect(): void {
|
9
|
+
const tables = document.querySelectorAll('.table-responsive-collapse');
|
10
|
+
|
11
|
+
// Each Table
|
12
|
+
[].forEach.call(tables, (table: HTMLTableElement) => {
|
13
|
+
// Header Titles
|
14
|
+
const headers: string[] = [];
|
15
|
+
[].forEach.call(table.querySelectorAll('th'), (header: HTMLTableCellElement) => {
|
16
|
+
const colSpan = header.colSpan
|
17
|
+
for (let i = 0; i < colSpan; i++) {
|
18
|
+
headers.push(header.textContent.replace(/\r?\n|\r/, ''));
|
60
19
|
}
|
61
20
|
});
|
62
|
-
}
|
63
|
-
|
64
|
-
private handleStickyLeftColumns(): void {
|
65
|
-
let accumulatedWidth = 0;
|
66
21
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
header.classList.remove('sticky-left-shadow');
|
79
|
-
} else {
|
80
|
-
header.classList.remove('with-border-right');
|
81
|
-
header.classList.add('sticky-left-shadow');
|
82
|
-
}
|
83
|
-
|
84
|
-
accumulatedWidth += (header as HTMLElement).offsetWidth;
|
85
|
-
}
|
86
|
-
|
87
|
-
cells.forEach((cell) => {
|
88
|
-
cell.classList.add('sticky');
|
89
|
-
(cell as HTMLElement).style.left = `${accumulatedWidth - (header as HTMLElement).offsetWidth}px`;
|
90
|
-
|
91
|
-
if (!isLastColumn) {
|
92
|
-
cell.classList.add('with-border-right');
|
93
|
-
cell.classList.remove('sticky-left-shadow');
|
94
|
-
} else {
|
95
|
-
cell.classList.remove('with-border-right');
|
96
|
-
cell.classList.add('sticky-left-shadow');
|
97
|
-
}
|
98
|
-
});
|
99
|
-
});
|
100
|
-
}
|
101
|
-
|
102
|
-
// Cleanup method to remove event listener
|
103
|
-
disconnect(): void {
|
104
|
-
if (this.handleStickyLeftColumnsRef) {
|
105
|
-
window.removeEventListener('resize', this.handleStickyLeftColumnsRef);
|
106
|
-
}
|
107
|
-
}
|
108
|
-
}
|
22
|
+
// for each row in tbody
|
23
|
+
[].forEach.call(table.querySelectorAll('tbody tr'), (row: HTMLTableRowElement) => {
|
24
|
+
// for each cell
|
25
|
+
[].forEach.call(row.cells, (cell: HTMLTableCellElement, headerIndex: number) => {
|
26
|
+
// apply the attribute
|
27
|
+
cell.setAttribute('data-title', headers[headerIndex])
|
28
|
+
})
|
29
|
+
})
|
30
|
+
})
|
31
|
+
}
|
32
|
+
}
|
@@ -1,65 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
.table-responsive-scroll {
|
4
|
-
display: block;
|
5
|
-
overflow-x: scroll;
|
6
|
-
|
7
|
-
// hides duplicate scroll bar for those that see two (byproduct of repeated table-responsive-scroll class
|
8
|
-
// hides outer scroll bar in chrome and safari
|
9
|
-
&:not(.table-responsive-scroll .table-responsive-scroll) {
|
10
|
-
&::-webkit-scrollbar {
|
11
|
-
height: 0px;
|
12
|
-
}
|
13
|
-
}
|
14
|
-
// hides outer scroll bar in firefox
|
15
|
-
@supports (scrollbar-width: none) {
|
16
|
-
scrollbar-width: none;
|
17
|
-
.pb_table {
|
18
|
-
overflow-x: auto;
|
19
|
-
scrollbar-width: auto;
|
20
|
-
}
|
21
|
-
}
|
22
|
-
// ensures visible inner scroll bar can scroll
|
23
|
-
.pb_table {
|
1
|
+
.table-responsive-scroll {
|
2
|
+
display: block;
|
24
3
|
overflow-x: auto;
|
25
4
|
}
|
26
|
-
|
27
|
-
// Responsive Styles
|
28
|
-
@media (max-width: 1600px) {
|
29
|
-
&[class*="table-responsive-scroll"] {
|
30
|
-
border-radius: 4px;
|
31
|
-
box-shadow: 1px 0 0 0px $border_light,
|
32
|
-
-1px 0 0 0px $border_light
|
33
|
-
}
|
34
|
-
|
35
|
-
&[class^=pb_table].table-sm.table-card thead tr th:first-child,
|
36
|
-
&[class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:first-child {
|
37
|
-
border-left-width: 0px;
|
38
|
-
}
|
39
|
-
|
40
|
-
&[class^=pb_table].table-md.table-card thead tr th:first-child,
|
41
|
-
&[class^=pb_table].table-md:not(.no-hover).table-card tbody tr td:first-child {
|
42
|
-
border-left-width: 0px;
|
43
|
-
}
|
44
|
-
|
45
|
-
&[class^=pb_table].table-lg.table-card thead tr th:first-child,
|
46
|
-
&[class^=pb_table].table-lg:not(.no-hover).table-card tbody tr td:first-child {
|
47
|
-
border-left-width: 0px;
|
48
|
-
}
|
49
|
-
|
50
|
-
&[class^=pb_table].table-sm.table-card thead tr th:last-child,
|
51
|
-
&[class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:last-child {
|
52
|
-
border-right-width: 0px;
|
53
|
-
}
|
54
|
-
|
55
|
-
&[class^=pb_table].table-md.table-card thead tr th:last-child,
|
56
|
-
&[class^=pb_table].table-md:not(.no-hover).table-card tbody tr td:last-child {
|
57
|
-
border-right-width: 0px;
|
58
|
-
}
|
59
|
-
|
60
|
-
&[class^=pb_table].table-lg.table-card thead tr th:last-child,
|
61
|
-
&[class^=pb_table].table-lg:not(.no-hover).table-card tbody tr td:last-child {
|
62
|
-
border-right-width: 0px;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
}
|
@@ -3,29 +3,16 @@
|
|
3
3
|
[class^="pb_table"] {
|
4
4
|
.sticky {
|
5
5
|
position: sticky !important;
|
6
|
+
left: 0;
|
6
7
|
z-index: 1;
|
7
8
|
background-color: white;
|
8
9
|
}
|
9
10
|
|
10
|
-
|
11
|
-
.sticky-left-shadow {
|
12
|
-
box-shadow: 4px 0 10px rgba(60, 106, 172, 0.16) !important;
|
13
|
-
left: 0;
|
14
|
-
}
|
15
|
-
|
16
|
-
.with-border-right {
|
11
|
+
.with-border {
|
17
12
|
border-right: 1px solid $border_light !important;
|
18
|
-
left: 0;
|
19
|
-
}
|
20
|
-
|
21
|
-
// For use with sticky right columns
|
22
|
-
.sticky-right-shadow {
|
23
|
-
box-shadow: -4px 0 10px rgba(60, 106, 172, 0.16) !important;
|
24
|
-
right: 0;
|
25
13
|
}
|
26
14
|
|
27
|
-
.
|
28
|
-
|
29
|
-
right: 0;
|
15
|
+
.sticky-shadow {
|
16
|
+
box-shadow: 4px 0 10px rgba(60, 106, 172, 0.16) !important;
|
30
17
|
}
|
31
18
|
}
|
@@ -7,21 +7,14 @@ import {
|
|
7
7
|
buildHtmlProps,
|
8
8
|
} from "../../utilities/props";
|
9
9
|
import { globalProps } from "../../utilities/globalProps";
|
10
|
-
import Collapsible from "../../pb_collapsible/_collapsible";
|
11
|
-
import useCollapsible from "../../pb_collapsible/useCollapsible";
|
12
10
|
|
13
11
|
type TableRowPropTypes = {
|
14
12
|
aria?: { [key: string]: string };
|
15
13
|
children: React.ReactNode[] | React.ReactNode;
|
16
14
|
className: string;
|
17
|
-
collapsible?: boolean;
|
18
|
-
collapsibleContent?: React.ReactNode[] | React.ReactNode;
|
19
|
-
collapsibleSideHighlight?: boolean;
|
20
15
|
data?: { [key: string]: string };
|
21
|
-
dark?: boolean;
|
22
16
|
htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
|
23
17
|
id?: string;
|
24
|
-
toggleCellId?: string;
|
25
18
|
sideHighlightColor: string;
|
26
19
|
tag?: "table" | "div";
|
27
20
|
};
|
@@ -30,15 +23,10 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
30
23
|
const {
|
31
24
|
aria = {},
|
32
25
|
children,
|
33
|
-
collapsible,
|
34
|
-
collapsibleContent,
|
35
|
-
collapsibleSideHighlight = true,
|
36
26
|
className,
|
37
27
|
data = {},
|
38
|
-
dark = false,
|
39
28
|
htmlOptions = {},
|
40
29
|
id,
|
41
|
-
toggleCellId,
|
42
30
|
sideHighlightColor = "none",
|
43
31
|
tag = "table",
|
44
32
|
} = props;
|
@@ -48,110 +36,17 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
48
36
|
const htmlProps = buildHtmlProps(htmlOptions);
|
49
37
|
const sideHighlightClass =
|
50
38
|
sideHighlightColor != "" ? `side_highlight_${sideHighlightColor}` : null;
|
51
|
-
|
52
|
-
const [isCollapsed, setIsCollapsed] = useCollapsible(true);
|
53
|
-
|
54
|
-
const collapsibleRow = collapsible && isCollapsed === true ? "collapsible_table_row" : null;
|
55
39
|
const classes = classnames(
|
56
40
|
buildCss("pb_table_row_kit", sideHighlightClass),
|
57
41
|
"pb_table_tr",
|
58
|
-
collapsibleRow,
|
59
42
|
globalProps(props),
|
60
43
|
className
|
61
44
|
);
|
62
45
|
const isTableTag = tag === "table";
|
63
46
|
|
64
|
-
// const [isCollapsed, setIsCollapsed] = useCollapsible(true);
|
65
|
-
|
66
|
-
const colSpan = React.Children.count(children);
|
67
|
-
|
68
|
-
const handleRowClick = (event: React.MouseEvent) => {
|
69
|
-
if (toggleCellId) {
|
70
|
-
const target = event.target as HTMLElement;
|
71
|
-
const clickedCell = target.closest(`#${toggleCellId}`);
|
72
|
-
const isIconClick =
|
73
|
-
target instanceof SVGElement &&
|
74
|
-
(target.matches("svg.pb_custom_icon") || target.closest("svg.pb_custom_icon"));
|
75
|
-
|
76
|
-
if (clickedCell || isIconClick) {
|
77
|
-
setIsCollapsed(!isCollapsed);
|
78
|
-
}
|
79
|
-
} else {
|
80
|
-
setIsCollapsed(!isCollapsed);
|
81
|
-
}
|
82
|
-
};
|
83
|
-
|
84
47
|
return (
|
85
48
|
<>
|
86
|
-
{
|
87
|
-
isTableTag ? (
|
88
|
-
<>
|
89
|
-
<tr
|
90
|
-
{...ariaProps}
|
91
|
-
{...dataProps}
|
92
|
-
{...htmlProps}
|
93
|
-
className={classes}
|
94
|
-
id={id}
|
95
|
-
onClick={(e)=>handleRowClick(e)}
|
96
|
-
style={{ cursor: toggleCellId ? "default" : "pointer" }}
|
97
|
-
>
|
98
|
-
{children}
|
99
|
-
</tr>
|
100
|
-
<tr>
|
101
|
-
<Collapsible
|
102
|
-
collapsed={isCollapsed}
|
103
|
-
dark={dark}
|
104
|
-
htmlOptions={{ colSpan: colSpan }}
|
105
|
-
padding="none"
|
106
|
-
tag="td"
|
107
|
-
>
|
108
|
-
<tr/>
|
109
|
-
<Collapsible.Content
|
110
|
-
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
111
|
-
dark={dark}
|
112
|
-
margin="none"
|
113
|
-
padding="none"
|
114
|
-
>
|
115
|
-
{collapsibleContent}
|
116
|
-
</Collapsible.Content>
|
117
|
-
</Collapsible>
|
118
|
-
</tr>
|
119
|
-
</>
|
120
|
-
) : (
|
121
|
-
<>
|
122
|
-
<div
|
123
|
-
{...ariaProps}
|
124
|
-
{...dataProps}
|
125
|
-
{...htmlProps}
|
126
|
-
className={classes}
|
127
|
-
id={id}
|
128
|
-
onClick={handleRowClick}
|
129
|
-
style={{ cursor: "pointer" }}
|
130
|
-
>
|
131
|
-
{children}
|
132
|
-
</div>
|
133
|
-
<tr>
|
134
|
-
<Collapsible
|
135
|
-
collapsed={isCollapsed}
|
136
|
-
dark={dark}
|
137
|
-
htmlOptions={{ colSpan: colSpan }}
|
138
|
-
padding="none"
|
139
|
-
tag="td"
|
140
|
-
>
|
141
|
-
<tr/>
|
142
|
-
<Collapsible.Content
|
143
|
-
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
144
|
-
dark={dark}
|
145
|
-
margin="none"
|
146
|
-
padding="none"
|
147
|
-
>
|
148
|
-
{collapsibleContent}
|
149
|
-
</Collapsible.Content>
|
150
|
-
</Collapsible>
|
151
|
-
</tr>
|
152
|
-
</>
|
153
|
-
)
|
154
|
-
) : isTableTag ? (
|
49
|
+
{isTableTag ? (
|
155
50
|
<tr
|
156
51
|
{...ariaProps}
|
157
52
|
{...dataProps}
|
@@ -1,10 +1,4 @@
|
|
1
|
-
|
2
|
-
<% responsive_class = object.responsive_classname %>
|
3
|
-
<% else %>
|
4
|
-
<% responsive_class = nil %>
|
5
|
-
<% end %>
|
6
|
-
|
7
|
-
<%= content_tag(:div, class: responsive_class) do %>
|
1
|
+
<%= content_tag(:div) do %>
|
8
2
|
<% if object.tag == "table" %>
|
9
3
|
<%= content_tag(:table,
|
10
4
|
aria: object.aria,
|
@@ -24,4 +18,4 @@
|
|
24
18
|
<%= content.presence %>
|
25
19
|
<% end %>
|
26
20
|
<% end %>
|
27
|
-
<% end %>
|
21
|
+
<% end %>
|