playbook_ui 13.21.0.pre.alpha.PLAY120322465 → 13.21.0.pre.alpha.pbntr220improveexpansionspeed2415
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/CustomCell.tsx +19 -21
- data/app/pb_kits/playbook/pb_advanced_table/Components/SortIconButton.tsx +3 -6
- data/app/pb_kits/playbook/pb_advanced_table/Components/SubRowHeaderRow.tsx +8 -12
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +9 -14
- data/app/pb_kits/playbook/pb_advanced_table/Components/ToggleIconButton.tsx +5 -9
- data/app/pb_kits/playbook/pb_advanced_table/README.md +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +11 -15
- data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableHeader.tsx +8 -12
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/ExpansionControlHelpers.tsx +22 -38
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +9 -7
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +81 -86
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +54 -54
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +7 -7
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data.js +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -2
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +1 -2
- data/app/pb_kits/playbook/pb_background/background.html.erb +1 -2
- data/app/pb_kits/playbook/pb_badge/badge.html.erb +1 -2
- data/app/pb_kits/playbook/pb_body/body.html.erb +1 -2
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +7 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +1 -2
- data/app/pb_kits/playbook/pb_button/button.html.erb +1 -2
- data/app/pb_kits/playbook/pb_button/button.rb +3 -2
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +1 -2
- data/app/pb_kits/playbook/pb_caption/caption.html.erb +1 -2
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -2
- data/app/pb_kits/playbook/pb_card/card_body.html.erb +1 -2
- data/app/pb_kits/playbook/pb_card/card_header.html.erb +1 -2
- data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +1 -3
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -2
- data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -2
- data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +1 -2
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +1 -2
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +1 -2
- data/app/pb_kits/playbook/pb_currency/currency.html.erb +1 -2
- data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date/date.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +2 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +1 -2
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +1 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +7 -9
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -1
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -2
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -3
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +1 -2
- data/app/pb_kits/playbook/pb_detail/detail.html.erb +1 -2
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -2
- data/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb +2 -3
- data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +2 -3
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +4 -5
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +0 -2
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -2
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +1 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +3 -8
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +0 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -51
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +11 -62
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +2 -7
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +3 -4
- data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.html.erb +4 -0
- data/app/pb_kits/playbook/pb_flex/flex.html.erb +1 -2
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +1 -2
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +2 -2
- data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +1 -2
- data/app/pb_kits/playbook/pb_highlight/highlight.html.erb +1 -2
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +0 -1
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon/icon.rb +3 -3
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +1 -2
- data/app/pb_kits/playbook/pb_image/image.html.erb +1 -2
- data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +1 -2
- data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +2 -3
- data/app/pb_kits/playbook/pb_layout/body.html.erb +1 -2
- data/app/pb_kits/playbook/pb_layout/footer.html.erb +1 -2
- data/app/pb_kits/playbook/pb_layout/header.html.erb +1 -2
- data/app/pb_kits/playbook/pb_layout/item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_layout/layout.html.erb +1 -2
- data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +1 -2
- data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -2
- data/app/pb_kits/playbook/pb_list/item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_list/list.html.erb +1 -2
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -2
- data/app/pb_kits/playbook/pb_message/message.html.erb +1 -2
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +2 -3
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -2
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -2
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +1 -2
- data/app/pb_kits/playbook/pb_nav/item.html.erb +2 -4
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +1 -2
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -2
- data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +1 -2
- data/app/pb_kits/playbook/pb_passphrase/passphrase.html.erb +1 -1
- data/app/pb_kits/playbook/pb_person/person.html.erb +1 -2
- data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +1 -2
- data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -2
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -2
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +1 -2
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -2
- data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +1 -2
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +1 -2
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -2
- data/app/pb_kits/playbook/pb_select/select.html.erb +1 -2
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -2
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.html.erb +1 -2
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.html.erb +1 -2
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +1 -2
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_source/source.html.erb +1 -2
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +1 -2
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +1 -2
- data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +1 -2
- data/app/pb_kits/playbook/pb_table/table.html.erb +2 -4
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +3 -5
- data/app/pb_kits/playbook/pb_table/table_cell.html.erb +3 -5
- data/app/pb_kits/playbook/pb_table/table_head.html.erb +3 -5
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +3 -5
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +3 -5
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +1 -2
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -2
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +1 -2
- data/app/pb_kits/playbook/pb_time/time.html.erb +1 -2
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +2 -3
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +1 -2
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -2
- data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +1 -2
- data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +1 -2
- data/app/pb_kits/playbook/pb_title/title.html.erb +2 -3
- data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +1 -2
- data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +1 -2
- data/app/pb_kits/playbook/pb_toggle/toggle.html.erb +1 -2
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +1 -2
- data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
- data/app/pb_kits/playbook/pb_user/user.html.erb +1 -2
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +1 -2
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +1 -2
- data/dist/playbook-rails.js +4 -4
- data/lib/playbook/kit_base.rb +0 -18
- data/lib/playbook/version.rb +1 -1
- metadata +5 -16
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +0 -14
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -19
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/_chrome_styles.scss +0 -13
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +0 -9
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +0 -30
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +0 -20
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -21
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +0 -37
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -32
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.html.erb +0 -7
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.jsx +0 -41
data/lib/playbook/kit_base.rb
CHANGED
@@ -67,28 +67,10 @@ module Playbook
|
|
67
67
|
prop :id
|
68
68
|
prop :data, type: Playbook::Props::HashProp, default: {}
|
69
69
|
prop :aria, type: Playbook::Props::HashProp, default: {}
|
70
|
-
prop :html_options, type: Playbook::Props::HashProp, default: {}
|
71
70
|
prop :children, type: Playbook::Props::Proc
|
72
71
|
|
73
72
|
def object
|
74
73
|
self
|
75
74
|
end
|
76
|
-
|
77
|
-
def combined_html_options
|
78
|
-
default_html_options.merge(html_options.deep_merge(data_attributes))
|
79
|
-
end
|
80
|
-
|
81
|
-
private
|
82
|
-
|
83
|
-
def default_html_options
|
84
|
-
{}
|
85
|
-
end
|
86
|
-
|
87
|
-
def data_attributes
|
88
|
-
{
|
89
|
-
data: data,
|
90
|
-
aria: aria,
|
91
|
-
}.transform_keys { |key| key.to_s.gsub("_", "-") }
|
92
|
-
end
|
93
75
|
end
|
94
76
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.21.0.pre.alpha.
|
4
|
+
version: 13.21.0.pre.alpha.pbntr220improveexpansionspeed2415
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-03-
|
12
|
+
date: 2024-03-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -286,8 +286,6 @@ files:
|
|
286
286
|
- app/pb_kits/playbook/pb_advanced_table/Utilities/types.ts
|
287
287
|
- app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss
|
288
288
|
- app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx
|
289
|
-
- app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb
|
290
|
-
- app/pb_kits/playbook/pb_advanced_table/advanced_table.rb
|
291
289
|
- app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
|
292
290
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx
|
293
291
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.md
|
@@ -314,15 +312,8 @@ files:
|
|
314
312
|
- app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js
|
315
313
|
- app/pb_kits/playbook/pb_advanced_table/docs/example.yml
|
316
314
|
- app/pb_kits/playbook/pb_advanced_table/docs/index.js
|
317
|
-
- app/pb_kits/playbook/pb_advanced_table/scss_partials/_chrome_styles.scss
|
318
315
|
- app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss
|
319
316
|
- app/pb_kits/playbook/pb_advanced_table/scss_partials/_pseudo_states.scss
|
320
|
-
- app/pb_kits/playbook/pb_advanced_table/table_body.html.erb
|
321
|
-
- app/pb_kits/playbook/pb_advanced_table/table_body.rb
|
322
|
-
- app/pb_kits/playbook/pb_advanced_table/table_header.html.erb
|
323
|
-
- app/pb_kits/playbook/pb_advanced_table/table_header.rb
|
324
|
-
- app/pb_kits/playbook/pb_advanced_table/table_row.html.erb
|
325
|
-
- app/pb_kits/playbook/pb_advanced_table/table_row.rb
|
326
317
|
- app/pb_kits/playbook/pb_avatar/_avatar.scss
|
327
318
|
- app/pb_kits/playbook/pb_avatar/_avatar.tsx
|
328
319
|
- app/pb_kits/playbook/pb_avatar/avatar.html.erb
|
@@ -832,8 +823,6 @@ files:
|
|
832
823
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.html.erb
|
833
824
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.jsx
|
834
825
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.md
|
835
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.html.erb
|
836
|
-
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.jsx
|
837
826
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb
|
838
827
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.jsx
|
839
828
|
- app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.html.erb
|
@@ -2896,11 +2885,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2896
2885
|
version: '0'
|
2897
2886
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2898
2887
|
requirements:
|
2899
|
-
- - "
|
2888
|
+
- - ">"
|
2900
2889
|
- !ruby/object:Gem::Version
|
2901
|
-
version:
|
2890
|
+
version: 1.3.1
|
2902
2891
|
requirements: []
|
2903
|
-
rubygems_version: 3.
|
2892
|
+
rubygems_version: 3.3.7
|
2904
2893
|
signing_key:
|
2905
2894
|
specification_version: 4
|
2906
2895
|
summary: Playbook Design System
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<%= content_tag(:div,
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id) do %>
|
6
|
-
<%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none" }) do %>
|
7
|
-
<% if content.present? %>
|
8
|
-
<% content.presence %>
|
9
|
-
<% else %>
|
10
|
-
<%= pb_rails("advanced_table/table_header", props: {column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion }) %>
|
11
|
-
<%= pb_rails("advanced_table/table_body", props: {table_data: object.table_data, column_definitions: object.column_definitions}) %>
|
12
|
-
<% end %>
|
13
|
-
<% end %>
|
14
|
-
<% end %>
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbAdvancedTable
|
5
|
-
class AdvancedTable < Playbook::KitBase
|
6
|
-
prop :table_data, type: Playbook::Props::Array,
|
7
|
-
default: []
|
8
|
-
prop :column_definitions, type: Playbook::Props::Array,
|
9
|
-
default: []
|
10
|
-
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
11
|
-
values: %w[all header none],
|
12
|
-
default: "header"
|
13
|
-
|
14
|
-
def classname
|
15
|
-
generate_classname("pb_advanced_table")
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbAdvancedTable
|
5
|
-
class TableBody < Playbook::KitBase
|
6
|
-
prop :table_data, type: Playbook::Props::Array,
|
7
|
-
default: []
|
8
|
-
prop :column_definitions, type: Playbook::Props::Array,
|
9
|
-
default: []
|
10
|
-
|
11
|
-
def render_row_and_children(row, column_definitions, current_depth = 0)
|
12
|
-
output = ActiveSupport::SafeBuffer.new
|
13
|
-
|
14
|
-
output << pb_rails("advanced_table/table_row", props: { row: row, column_definitions: column_definitions, depth: current_depth })
|
15
|
-
|
16
|
-
if row[:children].present?
|
17
|
-
row[:children].each do |child_row|
|
18
|
-
output << render_row_and_children(child_row, column_definitions, current_depth + 1)
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
output
|
23
|
-
end
|
24
|
-
|
25
|
-
def classname
|
26
|
-
generate_classname("pb_advanced_table_body", "pb_table_tbody", separator: " ")
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%= content_tag(:div,
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id) do %>
|
6
|
-
<%= pb_rails("table/table_row", props: {tag:"div"}) do %>
|
7
|
-
<% object.column_definitions.each_with_index do |item, index| %>
|
8
|
-
<%= pb_rails("table/table_header", props: { tag:"div", id:item[:accessor], classname:object.th_classname}) do %>
|
9
|
-
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align:"end" }) do %>
|
10
|
-
<% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
|
11
|
-
<button class="gray-icon toggle-all-icon">
|
12
|
-
<%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right:"xs" }) %>
|
13
|
-
</button>
|
14
|
-
<% end %>
|
15
|
-
<%= item[:label] %>
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
<% end %>
|
@@ -1,21 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbAdvancedTable
|
5
|
-
class TableHeader < Playbook::KitBase
|
6
|
-
prop :column_definitions, type: Playbook::Props::Array,
|
7
|
-
default: []
|
8
|
-
prop :enable_toggle_expansion, type: Playbook::Props::Enum,
|
9
|
-
values: %w[all header none],
|
10
|
-
default: "header"
|
11
|
-
|
12
|
-
def classname
|
13
|
-
generate_classname("pb_advanced_table_header", "pb_table_thead", separator: " ")
|
14
|
-
end
|
15
|
-
|
16
|
-
def th_classname
|
17
|
-
generate_classname("table-header-cells", separator: " ")
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<%= content_tag(:div,
|
2
|
-
aria: object.aria,
|
3
|
-
class: object.classname,
|
4
|
-
data: object.data,
|
5
|
-
id: object.id) do %>
|
6
|
-
<% object.column_definitions.each_with_index do |column, index| %>
|
7
|
-
<%= pb_rails("table/table_cell", props: { tag:"div", classname:object.td_classname}) do %>
|
8
|
-
<%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end" }) do %>
|
9
|
-
<div style="padding-left: <%= depth * 1.25 %>em">
|
10
|
-
<%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
|
11
|
-
<% if index.zero? && object.row[:children].present? %>
|
12
|
-
<button class="gray-icon expand-toggle-icon">
|
13
|
-
<%= pb_rails("icon", props: { icon: "circle-play", cursor: "pointer" }) %>
|
14
|
-
</button>
|
15
|
-
<% end %>
|
16
|
-
<%= pb_rails("flex/flex_item", props:{padding_left: index.zero? && object.row[:children].present? ? "none" : "xs"}) do %>
|
17
|
-
<% if index.zero? %>
|
18
|
-
<% if object.depth.zero? %>
|
19
|
-
<%= object.row[column[:accessor].to_sym] %>
|
20
|
-
<% else %>
|
21
|
-
<% object.depth_accessors.each_with_index do |item, accessor_index| %>
|
22
|
-
<% if object.depth - 1 == accessor_index %>
|
23
|
-
<% key = item.to_sym %>
|
24
|
-
<%= object.row[key] %>
|
25
|
-
<% end %>
|
26
|
-
<% end %>
|
27
|
-
<% end %>
|
28
|
-
<% else %>
|
29
|
-
<%= object.row[column[:accessor].to_sym] %>
|
30
|
-
<% end %>
|
31
|
-
<% end %>
|
32
|
-
<% end %>
|
33
|
-
</div>
|
34
|
-
<% end %>
|
35
|
-
<% end %>
|
36
|
-
<% end %>
|
37
|
-
<% end %>
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbAdvancedTable
|
5
|
-
class TableRow < Playbook::KitBase
|
6
|
-
prop :column_definitions, type: Playbook::Props::Array,
|
7
|
-
default: []
|
8
|
-
prop :row
|
9
|
-
prop :depth
|
10
|
-
|
11
|
-
def classname
|
12
|
-
generate_classname("pb_table_tr", "bg-white", subrow_depth_classname, separator: " ")
|
13
|
-
end
|
14
|
-
|
15
|
-
def td_classname
|
16
|
-
generate_classname("id-cell", "chrome-styles", separator: " ")
|
17
|
-
end
|
18
|
-
|
19
|
-
def depth_accessors
|
20
|
-
column_definitions.flat_map do |column|
|
21
|
-
column[:cellAccessors] if column.key?(:cellAccessors)
|
22
|
-
end.compact
|
23
|
-
end
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def subrow_depth_classname
|
28
|
-
depth.positive? ? "depth-sub-row-#{depth}" : ""
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
|
2
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-none", margin_bottom: "none"}) %>
|
3
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-xs", margin_bottom: "xs"}) %>
|
4
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-sm", margin_bottom: "sm"}) %>
|
5
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-md", margin_bottom: "md"}) %>
|
6
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-lg", margin_bottom: "lg"}) %>
|
7
|
-
<%= pb_rails("date_picker", props: { picker_id: "date-picker-xl", margin_bottom: "xl"}) %>
|
@@ -1,41 +0,0 @@
|
|
1
|
-
|
2
|
-
import React from 'react'
|
3
|
-
|
4
|
-
import DatePicker from '../_date_picker'
|
5
|
-
|
6
|
-
const DatePickerMarginBottom = (props) => (
|
7
|
-
<div>
|
8
|
-
<DatePicker
|
9
|
-
marginBottom="none"
|
10
|
-
pickerId="date-picker-none"
|
11
|
-
{...props}
|
12
|
-
/>
|
13
|
-
<DatePicker
|
14
|
-
marginBottom="xs"
|
15
|
-
pickerId="date-picker-xs"
|
16
|
-
{...props}
|
17
|
-
/>
|
18
|
-
<DatePicker
|
19
|
-
marginBottom="sm"
|
20
|
-
pickerId="date-picker-sm"
|
21
|
-
{...props}
|
22
|
-
/>
|
23
|
-
<DatePicker
|
24
|
-
marginBottom="md"
|
25
|
-
pickerId="date-picker-md"
|
26
|
-
{...props}
|
27
|
-
/>
|
28
|
-
<DatePicker
|
29
|
-
marginBottom="lg"
|
30
|
-
pickerId="date-picker-lg"
|
31
|
-
{...props}
|
32
|
-
/>
|
33
|
-
<DatePicker
|
34
|
-
marginBottom="xl"
|
35
|
-
pickerId="date-picker-xl"
|
36
|
-
{...props}
|
37
|
-
/>
|
38
|
-
</div>
|
39
|
-
)
|
40
|
-
|
41
|
-
export default DatePickerMarginBottom
|