playbook_ui 13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466 → 13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +4 -8
  3. data/app/pb_kits/playbook/pb_advanced_table/README.md +2 -2
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +2 -7
  5. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +0 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +0 -5
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -2
  8. data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +1 -2
  9. data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +1 -2
  10. data/app/pb_kits/playbook/pb_background/background.html.erb +1 -2
  11. data/app/pb_kits/playbook/pb_badge/badge.html.erb +1 -2
  12. data/app/pb_kits/playbook/pb_body/body.html.erb +1 -2
  13. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +7 -0
  14. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +1 -2
  15. data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +1 -2
  16. data/app/pb_kits/playbook/pb_button/button.html.erb +1 -2
  17. data/app/pb_kits/playbook/pb_button/button.rb +3 -2
  18. data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +1 -2
  19. data/app/pb_kits/playbook/pb_caption/caption.html.erb +1 -2
  20. data/app/pb_kits/playbook/pb_card/card.html.erb +1 -2
  21. data/app/pb_kits/playbook/pb_card/card_body.html.erb +1 -2
  22. data/app/pb_kits/playbook/pb_card/card_header.html.erb +1 -2
  23. data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +1 -3
  24. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -2
  25. data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +1 -2
  26. data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +1 -2
  27. data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +1 -2
  28. data/app/pb_kits/playbook/pb_contact/contact.html.erb +1 -2
  29. data/app/pb_kits/playbook/pb_currency/currency.html.erb +1 -2
  30. data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +1 -2
  31. data/app/pb_kits/playbook/pb_date/date.html.erb +1 -2
  32. data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +2 -1
  33. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +0 -3
  34. data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +2 -4
  35. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +1 -2
  36. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +1 -1
  37. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +7 -9
  38. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +0 -2
  39. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +0 -1
  40. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -1
  41. data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +1 -2
  42. data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +1 -2
  43. data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +1 -2
  44. data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +1 -2
  45. data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +2 -3
  46. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +1 -2
  47. data/app/pb_kits/playbook/pb_detail/detail.html.erb +1 -2
  48. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -2
  49. data/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb +2 -3
  50. data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +1 -2
  51. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +2 -3
  52. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -2
  53. data/app/pb_kits/playbook/pb_filter/filter.html.erb +1 -2
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +3 -8
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +0 -1
  56. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +1 -51
  57. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +11 -62
  58. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +2 -7
  59. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +3 -4
  60. data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.html.erb +4 -0
  61. data/app/pb_kits/playbook/pb_flex/flex.html.erb +1 -2
  62. data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +1 -2
  63. data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +1 -2
  64. data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +2 -2
  65. data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +1 -2
  66. data/app/pb_kits/playbook/pb_highlight/highlight.html.erb +1 -2
  67. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.html.erb +1 -2
  68. data/app/pb_kits/playbook/pb_icon/_icon.tsx +0 -1
  69. data/app/pb_kits/playbook/pb_icon/icon.html.erb +1 -2
  70. data/app/pb_kits/playbook/pb_icon/icon.rb +3 -3
  71. data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -2
  72. data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +1 -2
  73. data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +1 -2
  74. data/app/pb_kits/playbook/pb_image/image.html.erb +1 -2
  75. data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +1 -2
  76. data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +2 -3
  77. data/app/pb_kits/playbook/pb_layout/body.html.erb +1 -2
  78. data/app/pb_kits/playbook/pb_layout/footer.html.erb +1 -2
  79. data/app/pb_kits/playbook/pb_layout/header.html.erb +1 -2
  80. data/app/pb_kits/playbook/pb_layout/item.html.erb +1 -2
  81. data/app/pb_kits/playbook/pb_layout/layout.html.erb +1 -2
  82. data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +1 -2
  83. data/app/pb_kits/playbook/pb_legend/legend.html.erb +1 -2
  84. data/app/pb_kits/playbook/pb_list/item.html.erb +1 -2
  85. data/app/pb_kits/playbook/pb_list/list.html.erb +1 -2
  86. data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -2
  87. data/app/pb_kits/playbook/pb_message/message.html.erb +1 -2
  88. data/app/pb_kits/playbook/pb_message/message_mention.html.erb +2 -3
  89. data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +1 -2
  90. data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +1 -2
  91. data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +1 -2
  92. data/app/pb_kits/playbook/pb_nav/item.html.erb +2 -4
  93. data/app/pb_kits/playbook/pb_nav/nav.html.erb +1 -2
  94. data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +1 -2
  95. data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +1 -2
  96. data/app/pb_kits/playbook/pb_passphrase/passphrase.html.erb +1 -1
  97. data/app/pb_kits/playbook/pb_person/person.html.erb +1 -2
  98. data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +1 -2
  99. data/app/pb_kits/playbook/pb_pill/pill.html.erb +1 -2
  100. data/app/pb_kits/playbook/pb_popover/popover.html.erb +1 -2
  101. data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +1 -2
  102. data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +1 -2
  103. data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +1 -2
  104. data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +1 -2
  105. data/app/pb_kits/playbook/pb_radio/radio.html.erb +1 -2
  106. data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +1 -2
  107. data/app/pb_kits/playbook/pb_select/select.html.erb +1 -2
  108. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -2
  109. data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.html.erb +1 -2
  110. data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.html.erb +1 -2
  111. data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +1 -2
  112. data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +1 -2
  113. data/app/pb_kits/playbook/pb_source/source.html.erb +1 -2
  114. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +1 -2
  115. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +1 -2
  116. data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +1 -2
  117. data/app/pb_kits/playbook/pb_table/table.html.erb +2 -4
  118. data/app/pb_kits/playbook/pb_table/table_body.html.erb +3 -5
  119. data/app/pb_kits/playbook/pb_table/table_cell.html.erb +3 -5
  120. data/app/pb_kits/playbook/pb_table/table_head.html.erb +3 -5
  121. data/app/pb_kits/playbook/pb_table/table_header.html.erb +3 -5
  122. data/app/pb_kits/playbook/pb_table/table_row.html.erb +3 -5
  123. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -0
  124. data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +1 -2
  125. data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -2
  126. data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +1 -2
  127. data/app/pb_kits/playbook/pb_time/time.html.erb +1 -2
  128. data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +2 -3
  129. data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +1 -2
  130. data/app/pb_kits/playbook/pb_timeline/item.html.erb +1 -2
  131. data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +1 -2
  132. data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +1 -2
  133. data/app/pb_kits/playbook/pb_title/title.html.erb +2 -3
  134. data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +1 -2
  135. data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +1 -2
  136. data/app/pb_kits/playbook/pb_toggle/toggle.html.erb +1 -2
  137. data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +1 -2
  138. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +1 -2
  139. data/app/pb_kits/playbook/pb_user/user.html.erb +1 -2
  140. data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +1 -2
  141. data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +1 -2
  142. data/dist/playbook-rails.js +4 -4
  143. data/lib/playbook/kit_base.rb +0 -18
  144. data/lib/playbook/version.rb +1 -1
  145. metadata +5 -15
  146. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +0 -14
  147. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +0 -19
  148. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +0 -9
  149. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +0 -30
  150. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +0 -20
  151. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -21
  152. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +0 -37
  153. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -32
  154. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.html.erb +0 -7
  155. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_margin_bottom.jsx +0 -41
@@ -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.tr("_", "-") }
92
- end
93
75
  end
94
76
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "13.21.0"
5
- VERSION = "13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466"
5
+ VERSION = "13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438"
6
6
  end
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.PBNTR224letuserresetrowexpansion2466
4
+ version: 13.21.0.pre.alpha.PBNTR225advancedtablefeedback2438
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-25 00:00:00.000000000 Z
12
+ date: 2024-03-21 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
@@ -317,12 +315,6 @@ files:
317
315
  - app/pb_kits/playbook/pb_advanced_table/scss_partials/_chrome_styles.scss
318
316
  - app/pb_kits/playbook/pb_advanced_table/scss_partials/_loading.scss
319
317
  - 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
318
  - app/pb_kits/playbook/pb_avatar/_avatar.scss
327
319
  - app/pb_kits/playbook/pb_avatar/_avatar.tsx
328
320
  - app/pb_kits/playbook/pb_avatar/avatar.html.erb
@@ -832,8 +824,6 @@ files:
832
824
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.html.erb
833
825
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.jsx
834
826
  - 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
827
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb
838
828
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.jsx
839
829
  - app/pb_kits/playbook/pb_date_picker/docs/_date_picker_month_and_year.html.erb
@@ -2896,11 +2886,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
2896
2886
  version: '0'
2897
2887
  required_rubygems_version: !ruby/object:Gem::Requirement
2898
2888
  requirements:
2899
- - - ">="
2889
+ - - ">"
2900
2890
  - !ruby/object:Gem::Version
2901
- version: '0'
2891
+ version: 1.3.1
2902
2892
  requirements: []
2903
- rubygems_version: 3.5.3
2893
+ rubygems_version: 3.3.7
2904
2894
  signing_key:
2905
2895
  specification_version: 4
2906
2896
  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,9 +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.table_data.each do |row| %>
7
- <%= render_row_and_children(row, object.column_definitions) %>
8
- <% end %>
9
- <% 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