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.
Files changed (210) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CollapsibleTrail.tsx +6 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +19 -32
  5. data/app/pb_kits/playbook/pb_advanced_table/SubKits/TableBody.tsx +1 -3
  6. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +6 -46
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +36 -94
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +1 -8
  10. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +2 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +1 -1
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +1 -1
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -8
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +0 -4
  16. data/app/pb_kits/playbook/pb_advanced_table/index.js +92 -185
  17. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
  18. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +8 -57
  19. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +13 -18
  20. data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -78
  21. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +3 -12
  22. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +2 -15
  23. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +6 -10
  24. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +4 -8
  25. data/app/pb_kits/playbook/pb_avatar/_avatar.scss +2 -0
  26. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +9 -11
  27. data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -4
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +49 -53
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +36 -29
  30. data/app/pb_kits/playbook/pb_body/_body.scss +13 -14
  31. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +16 -22
  32. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -3
  33. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +0 -6
  34. data/app/pb_kits/playbook/pb_button/_button.scss +1 -3
  35. data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -2
  36. data/app/pb_kits/playbook/pb_card/_card.scss +3 -21
  37. data/app/pb_kits/playbook/pb_card/_card.tsx +7 -7
  38. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +2 -2
  39. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -39
  40. data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +0 -90
  41. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  42. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +2 -4
  43. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +0 -3
  44. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -1
  45. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -1
  46. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +0 -8
  47. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +0 -9
  48. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +4 -9
  49. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +2 -2
  50. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +2 -2
  51. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -3
  52. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +3 -5
  53. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -6
  54. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +2 -4
  55. data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +2 -2
  56. data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +8 -10
  57. data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +0 -5
  58. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +17 -31
  59. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +1 -3
  60. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx +1 -4
  61. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +1 -1
  62. data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +2 -8
  63. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -11
  64. data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +4 -6
  65. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +1 -31
  66. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +3 -3
  67. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +5 -25
  68. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -17
  69. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +1 -17
  70. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +0 -15
  71. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +1 -2
  72. data/app/pb_kits/playbook/pb_home_address_street/home_address_street.rb +1 -15
  73. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +14 -4
  74. data/app/pb_kits/playbook/pb_label_value/_label_value.scss +2 -4
  75. data/app/pb_kits/playbook/pb_layout/_layout.tsx +11 -30
  76. data/app/pb_kits/playbook/pb_link/_link.scss +3 -3
  77. data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -3
  78. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -3
  79. data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -11
  80. data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +2 -16
  81. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +1 -1
  82. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +2 -2
  83. data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -5
  84. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +8 -10
  85. data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -4
  86. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -4
  87. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -4
  88. data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +1 -64
  89. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -3
  90. data/app/pb_kits/playbook/pb_section_separator/docs/example.yml +0 -2
  91. data/app/pb_kits/playbook/pb_section_separator/docs/index.js +0 -1
  92. data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +1 -4
  93. data/app/pb_kits/playbook/pb_select/_select.scss +3 -5
  94. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +7 -9
  95. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +1 -1
  96. data/app/pb_kits/playbook/pb_skeleton_loading/_skeleton_loading.scss +2 -2
  97. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_default.html.erb +1 -1
  98. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -8
  99. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +3 -9
  100. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +0 -2
  101. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.html.erb +12 -8
  102. data/app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb +1 -48
  103. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +36 -44
  104. data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +4 -4
  105. data/app/pb_kits/playbook/pb_table/_table.tsx +24 -80
  106. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
  107. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +1 -4
  108. data/app/pb_kits/playbook/pb_table/docs/example.yml +0 -9
  109. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -7
  110. data/app/pb_kits/playbook/pb_table/index.ts +26 -102
  111. data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -2
  112. data/app/pb_kits/playbook/pb_table/styles/_scroll.scss +2 -63
  113. data/app/pb_kits/playbook/pb_table/styles/_sticky_columns.scss +4 -17
  114. data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +1 -106
  115. data/app/pb_kits/playbook/pb_table/table.html.erb +2 -8
  116. data/app/pb_kits/playbook/pb_table/table.rb +2 -21
  117. data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -3
  118. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +4 -43
  119. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +0 -1
  120. data/app/pb_kits/playbook/pb_text_input/docs/index.js +0 -1
  121. data/app/pb_kits/playbook/pb_text_input/text_input.test.js +2 -219
  122. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -3
  123. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -5
  124. data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -4
  125. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +5 -5
  126. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.html.erb +5 -4
  127. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.jsx +4 -4
  128. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_gap.md +1 -1
  129. data/app/pb_kits/playbook/pb_timeline/timeline.rb +6 -6
  130. data/app/pb_kits/playbook/pb_title/_title.scss +5 -6
  131. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -13
  132. data/app/pb_kits/playbook/pb_toggle/_toggle.scss +3 -5
  133. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +46 -115
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +2 -9
  135. data/app/pb_kits/playbook/pb_typeahead/typeahead.html.erb +2 -3
  136. data/app/pb_kits/playbook/tokens/_titles.scss +8 -0
  137. data/app/pb_kits/playbook/utilities/_hover.scss +2 -11
  138. data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -1
  139. data/app/pb_kits/playbook/utilities/globalProps.ts +9 -20
  140. data/app/pb_kits/playbook/utilities/test/globalProps/hover.test.js +0 -15
  141. data/dist/chunks/_typeahead-B8fkIeXA.js +22 -0
  142. data/dist/chunks/_weekday_stacked-CiL8BjKa.js +45 -0
  143. data/dist/chunks/{lib-B7sgJtGS.js → lib-SyD3buPZ.js} +3 -3
  144. data/dist/chunks/{pb_form_validation-C5Cc0-1v.js → pb_form_validation-Dt8UJgrJ.js} +1 -1
  145. data/dist/chunks/vendor.js +1 -1
  146. data/dist/menu.yml +2 -2
  147. data/dist/playbook-doc.js +1 -1
  148. data/dist/playbook-rails-react-bindings.js +1 -1
  149. data/dist/playbook-rails.js +1 -1
  150. data/dist/playbook.css +1 -1
  151. data/lib/playbook/classnames.rb +0 -1
  152. data/lib/playbook/hover.rb +1 -7
  153. data/lib/playbook/spacing.rb +0 -21
  154. data/lib/playbook/version.rb +2 -2
  155. metadata +8 -59
  156. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +0 -36
  157. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +0 -1
  158. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.html.erb +0 -43
  159. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +0 -60
  160. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +0 -1
  161. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb +0 -58
  162. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +0 -74
  163. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +0 -1
  164. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +0 -50
  165. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +0 -1
  166. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +0 -57
  167. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +0 -5
  168. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +0 -5600
  169. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +0 -1
  170. data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +0 -57
  171. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.html.erb +0 -32
  172. data/app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb +0 -29
  173. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.html.erb +0 -10
  174. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +0 -42
  175. data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.md +0 -3
  176. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_description.md +0 -3
  177. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius.html.erb +0 -9
  178. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +0 -1
  179. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_color.html.erb +0 -7
  180. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.html.erb +0 -119
  181. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +0 -174
  182. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.html.erb +0 -15
  183. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width_rails.md +0 -3
  184. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.html.erb +0 -3
  185. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.html.erb +0 -63
  186. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +0 -97
  187. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +0 -88
  188. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +0 -3
  189. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +0 -77
  190. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +0 -3
  191. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +0 -87
  192. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +0 -5
  193. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +0 -75
  194. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +0 -1
  195. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +0 -108
  196. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +0 -2
  197. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +0 -94
  198. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
  199. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +0 -83
  200. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +0 -3
  201. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +0 -120
  202. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +0 -1
  203. data/app/pb_kits/playbook/pb_table/styles/_collapsible.scss +0 -35
  204. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +0 -106
  205. data/app/pb_kits/playbook/pb_text_input/inputMask.ts +0 -108
  206. data/app/pb_kits/playbook/utilities/_gap.scss +0 -29
  207. data/dist/chunks/_typeahead-C2iCBqxQ.js +0 -36
  208. data/dist/chunks/_weekday_stacked-CWnbnW7m.js +0 -45
  209. /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_border_radius_react.md → _skeleton_loading_border_radius.md} +0 -0
  210. /data/app/pb_kits/playbook/pb_skeleton_loading/docs/{_skeleton_loading_height_width_react.md → _skeleton_loading_height_width.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bcddb88a9dfb415486e86df29a22c55884190ed39205451c9034a621311c75f8
4
- data.tar.gz: 344f303ea394159d8314f69334c59620cc6f1ab1c5781768cb700e7b17ac09e4
3
+ metadata.gz: 6eeac1641692681cc2b3574b0b29cd8aada02014cef63306160e935b9ad0a395
4
+ data.tar.gz: 1711db522e35dd4218ec9ecb47d4316d0b58c731e4d4b95cc62a8197cb4034b8
5
5
  SHA512:
6
- metadata.gz: 40d48f3e79dffff5949ede088d54fbf2042a1b7f9443a84f9222d9aaa640cd4428fe4f8c19342558360c760e011a9457cff979e9d27a980446014b3bdb2db999
7
- data.tar.gz: ac66fc8ced8a8332815151154d12cd7628813ddae7ea3b22b84997923228edc5efcf40c4fb2f0d08acbf565b0f4c1c6e84c7d439f3d0e226ebd96eba2b451ea7
6
+ metadata.gz: 0bacb49cde1c17d2e4afc1f69939dbdd3bd5fe3c40d20b20b26ea43c3171363eb464a54dcd6ddeb6df4a3c1a537374f362c7dfd10b274757934e3e03c300b7e5
7
+ data.tar.gz: 00e186fdd8852d32e48e104742c3e9e8f76da180b3fead2acd32b24067b4f5d033e8ec4fb65c25fa9ccc858b32a3766b5ae687cf042b8fc6fc5b88e18be15e70
@@ -128,4 +128,3 @@
128
128
  @import 'utilities/truncate';
129
129
  @import 'utilities/vertical_align';
130
130
  @import 'utilities/height';
131
- @import 'utilities/gap';
@@ -3,13 +3,18 @@ import React from "react"
3
3
  //CollapsibleTrail component
4
4
  const CollapsibleTrail = ({ leftOffset }: { leftOffset: number }) => {
5
5
  const style: { [key: string]: string | number } = {
6
+ position: "absolute",
6
7
  left: `${leftOffset}em`,
8
+ top: 0,
9
+ bottom: 0,
10
+ width: "2px",
11
+ backgroundColor: "#E4E8F0",
7
12
  }
8
13
 
9
14
  return (
10
15
  <div
11
16
  className="collapsible-trail"
12
- style={style}
17
+ style={style}
13
18
  />
14
19
  )
15
20
  }
@@ -40,59 +40,46 @@ export const TableHeaderCell = ({
40
40
 
41
41
  const toggleSortButton = (event: React.SyntheticEvent) => {
42
42
  if (sortControl) {
43
- const sortIsDesc = header?.column.getIsSorted() === "desc"
43
+ const sortIsDesc = header.column.getIsSorted() === "desc"
44
44
  sortIsDesc
45
45
  ? sortControl.onChange({ desc: true })
46
46
  : sortControl.onChange({ desc: false })
47
47
  } else {
48
- header?.column.getToggleSortingHandler()(event)
48
+ header.column.getToggleSortingHandler()(event)
49
49
  }
50
50
  }
51
51
 
52
- const isLeafColumn =
53
- header?.column.getLeafColumns().length === 1 &&
54
- header?.column.getLeafColumns()[0].id === header.column.id
55
-
56
- const isLastHeaderCell =
57
- header?.column.parent?.columns.at(-1) === header?.column ||
58
- (header?.colSpan > 1 && header?.column.parent !== undefined);
59
-
60
- const cellClassName = classnames(
61
- "table-header-cells",
62
- `${isChrome() ? "chrome-styles" : ""}`,
52
+ const cellClassName = classnames("table-header-cells",
53
+ `${isChrome() ? "chrome-styles" : ""}`,
63
54
  `${enableSorting ? "table-header-cells-active" : ""}`,
64
- { "pinned-left": responsive === "scroll" && isPinnedLeft },
65
- isLastHeaderCell ? "last-header-cell" : ""
66
- );
55
+ { 'pinned-left': responsive === "scroll" && isPinnedLeft },
56
+ )
67
57
 
68
58
  const cellId = `${loading ?
69
- `loading-${header?.id}`
70
- : `${header?.id}`
59
+ `loading-${header.id}`
60
+ : `${header.id}`
71
61
  }`
72
62
 
73
63
  const isToggleExpansionEnabledLoading =
74
- header?.index === 0 &&
64
+ header.index === 0 &&
75
65
  loading &&
76
66
  (enableToggleExpansion === "all" || "header") &&
77
67
  enableToggleExpansion !== "none"
78
68
 
79
69
  const isToggleExpansionEnabled =
80
- header?.index === 0 &&
70
+ header.index === 0 &&
81
71
  !loading &&
82
72
  (enableToggleExpansion === "all" || "header") &&
83
73
  enableToggleExpansion !== "none"
84
74
 
85
- const justifyHeader = isLeafColumn ? "end" : "center"
86
-
87
75
  return (
88
76
  <th
89
77
  align="right"
90
78
  className={cellClassName}
91
- colSpan={header?.colSpan}
92
79
  id={cellId}
93
- key={`${header?.id}-header`}
80
+ key={`${header.id}-header`}
94
81
  >
95
- {header?.isPlaceholder ? null : headerChildren && header?.index === 0 ? (
82
+ {header.isPlaceholder ? null : headerChildren && header.index === 0 ? (
96
83
  <Flex alignItems="center">
97
84
  {headerChildren}
98
85
  <div>
@@ -102,7 +89,7 @@ const justifyHeader = isLeafColumn ? "end" : "center"
102
89
  ) : (
103
90
  <Flex
104
91
  alignItems="center"
105
- justify={header?.index === 0 && enableSorting ? "between" : header?.index === 0 && !enableSorting ? "start" : justifyHeader}
92
+ justify={header.index === 0 && enableSorting ? "between" : header.index === 0 && !enableSorting ? "start" : "end"}
106
93
  >
107
94
  {isToggleExpansionEnabled && (
108
95
  <ToggleIconButton onClick={handleExpandOrCollapse} />
@@ -113,11 +100,11 @@ const justifyHeader = isLeafColumn ? "end" : "center"
113
100
  )}
114
101
 
115
102
  <Flex
116
- className={`${header?.index === 0 &&
103
+ className={`${header.index === 0 &&
117
104
  enableSorting &&
118
105
  "header-sort-button pb_th_link"}`}
119
- cursor={header?.index === 0 && enableSorting ? "pointer" : "default"}
120
- {...(header?.index === 0 &&
106
+ cursor={header.index === 0 && enableSorting ? "pointer" : "default"}
107
+ {...(header.index === 0 &&
121
108
  enableSorting && {
122
109
  htmlOptions: {
123
110
  onClick: (event: React.MouseEvent) => toggleSortButton(event),
@@ -129,14 +116,14 @@ const justifyHeader = isLeafColumn ? "end" : "center"
129
116
  tabIndex: 0,
130
117
  },
131
118
  })}
132
- justify={header?.index === 0 && enableSorting ? "between" : "none"}
119
+ justify={header.index === 0 && enableSorting ? "between" : "none"}
133
120
  paddingLeft={enableSorting ? "xxs" : "xs"}
134
121
  >
135
122
  <div>
136
- {flexRender(header?.column.columnDef.header, header?.getContext())}
123
+ {flexRender(header.column.columnDef.header, header.getContext())}
137
124
  </div>
138
125
 
139
- {header?.index === 0 &&
126
+ {header.index === 0 &&
140
127
  header.column.getCanSort() &&
141
128
  enableSorting &&
142
129
  (loading ? (
@@ -86,7 +86,6 @@ export const TableBody = ({
86
86
  >
87
87
  {row.getVisibleCells().map((cell, i) => {
88
88
  const isPinnedLeft = columnPinning.left.includes(cell.column.id)
89
- const isLastCell = cell.column.parent?.columns.at(-1)?.id === cell.column.id
90
89
 
91
90
  return (
92
91
  <td
@@ -94,8 +93,7 @@ export const TableBody = ({
94
93
  className={classnames(
95
94
  `${cell.id}-cell position_relative`,
96
95
  isChrome() ? "chrome-styles" : "",
97
- isPinnedLeft && 'pinned-left',
98
- isLastCell && 'last-cell',
96
+ isPinnedLeft && 'pinned-left'
99
97
  )}
100
98
  key={`${cell.id}-data`}
101
99
  >
@@ -31,37 +31,6 @@
31
31
  min-width: 180px;
32
32
  }
33
33
 
34
- .pb_advanced_table_header {
35
- > tr:not(:first-child) {
36
- .last-header-cell {
37
- border-right: 1px solid $border_light !important;
38
- }
39
- th {
40
- border-radius: 0px !important;
41
- border-width: 0 0 1px 0 !important;
42
- }
43
- th:first-child {
44
- border-left-width: 1px !important;
45
- }
46
- }
47
- th[colspan]:not([colspan="1"]) {
48
- border-right: 1px solid $border_light !important;
49
- }
50
- }
51
-
52
- .pb_advanced_table_body {
53
- .last-cell {
54
- border-right: 1px solid $border_light !important;
55
- }
56
- tr td:first-child {
57
- padding-left: 8px !important;
58
- }
59
- tr .pb_table_td:last-child {
60
- padding-right: 8px !important;
61
- }
62
- }
63
-
64
-
65
34
  .table-header-cells-active:first-child {
66
35
  color: $primary !important;
67
36
  }
@@ -128,7 +97,7 @@
128
97
  }
129
98
 
130
99
  .toggle-content {
131
- display: none !important;
100
+ display: none;
132
101
  height: 0;
133
102
  padding-bottom: 0 !important;
134
103
  padding-top: 0 !important;
@@ -137,21 +106,13 @@
137
106
  }
138
107
 
139
108
  .toggle-content.is-visible {
140
- display: table-row !important;
109
+ display: contents;
141
110
  height: auto;
142
111
  }
143
112
 
144
- .collapsible-trail {
145
- background-color: $border_light;
146
- position: absolute;
147
- top: 0;
148
- bottom: 0;
149
- width: 2px;
150
- }
151
-
152
113
  // Responsive Styles
153
114
  @media only screen and (max-width: $screen-xl-min) {
154
- &[class*="advanced-table-responsive-scroll"] {
115
+ &[class*="table-responsive-scroll"] {
155
116
  border-radius: 4px;
156
117
  box-shadow: 1px 0 0 0px $border_light,
157
118
  -1px 0 0 0px $border_light;
@@ -160,7 +121,7 @@
160
121
  width: 100%;
161
122
  [class^=pb_table].table-sm.table-card thead tr th:first-child,
162
123
  [class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:first-child {
163
- border-left-width: 0px !important;
124
+ border-left-width: 0px;
164
125
  }
165
126
  [class^=pb_table].table-sm.table-card thead tr th:last-child,
166
127
  [class^=pb_table].table-sm:not(.no-hover).table-card tbody tr td:last-child {
@@ -186,11 +147,10 @@
186
147
  .bg-white td:first-child {
187
148
  background-color: $white;
188
149
  }
189
-
190
150
  }
191
151
  }
192
152
  @media only screen and (min-width: $screen-xl-min) {
193
- &[class*="advanced-table-responsive-scroll"] {
153
+ &[class*="table-responsive-scroll"] {
194
154
  overflow-x: visible;
195
155
  }
196
156
  }
@@ -240,7 +200,7 @@
240
200
  }
241
201
  // Dark Mode Responsive Styles
242
202
  @media only screen and (max-width: $screen-xl-min) {
243
- &[class*="advanced-table-responsive-scroll"] {
203
+ &[class*="table-responsive-scroll"] {
244
204
  border-radius: 4px;
245
205
  box-shadow: 1px 0 0 0px $border_dark,
246
206
  -1px 0 0 0px $border_dark;
@@ -7,7 +7,6 @@ import {
7
7
  createColumnHelper,
8
8
  getCoreRowModel,
9
9
  getExpandedRowModel,
10
- getPaginationRowModel,
11
10
  getSortedRowModel,
12
11
  Row,
13
12
  useReactTable,
@@ -26,7 +25,6 @@ import { updateExpandAndCollapseState } from "./Utilities/ExpansionControlHelper
26
25
  import { CustomCell } from "./Components/CustomCell"
27
26
  import { TableHeader } from "./SubKits/TableHeader"
28
27
  import { TableBody } from "./SubKits/TableBody"
29
- import Pagination from "../pb_pagination/_pagination"
30
28
 
31
29
  type AdvancedTableProps = {
32
30
  aria?: { [key: string]: string }
@@ -44,8 +42,6 @@ type AdvancedTableProps = {
44
42
  loading?: boolean | string
45
43
  onRowToggleClick?: (arg: Row<GenericObject>) => void
46
44
  onToggleExpansionClick?: (arg: Row<GenericObject>) => void
47
- pagination?: boolean,
48
- paginationProps?: GenericObject
49
45
  responsive?: "scroll" | "none",
50
46
  sortControl?: GenericObject
51
47
  tableData: GenericObject[]
@@ -71,8 +67,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
71
67
  loading,
72
68
  onRowToggleClick,
73
69
  onToggleExpansionClick,
74
- pagination = false,
75
- paginationProps,
76
70
  responsive = "scroll",
77
71
  sortControl,
78
72
  tableData,
@@ -142,41 +136,27 @@ const AdvancedTable = (props: AdvancedTableProps) => {
142
136
  }
143
137
  return columnCells
144
138
  }
145
-
146
- const buildColumns = (columnDefinitions: GenericObject[]): any => {
147
- return (
148
- columnDefinitions &&
139
+ //Create column array in format needed by Tanstack
140
+ const columns =
141
+ columnDefinitions &&
149
142
  columnDefinitions.map((column, index) => {
150
- //Checking to see if grouped column or not
151
- if (column.columns && column.columns.length > 0) {
152
- return {
153
- header: column.label || "",
154
- columns: buildColumns(column.columns),
155
- };
156
- } else {
157
- // Define the base column structure
158
- const columnStructure = {
159
- ...columnHelper.accessor(column.accessor, {
160
- header: column.label || "",
161
- }),
162
- };
163
-
164
- if (column.cellAccessors || column.customRenderer) {
165
- columnStructure.cell = createCellFunction(
166
- column.cellAccessors,
167
- column.customRenderer,
168
- index
169
- );
170
- }
143
+ // Define the base column structure
144
+ const columnStructure = {
145
+ ...columnHelper.accessor(column.accessor, {
146
+ header: column.label,
147
+ }),
148
+ }
171
149
 
172
- return columnStructure;
173
- }
174
- })
175
- );
176
- };
150
+ if (column.cellAccessors || column.customRenderer) {
151
+ columnStructure.cell = createCellFunction(
152
+ column.cellAccessors,
153
+ column.customRenderer,
154
+ index
155
+ )
156
+ }
177
157
 
178
- //Create column array in format needed by Tanstack
179
- const columns = buildColumns(columnDefinitions);
158
+ return columnStructure
159
+ })
180
160
 
181
161
  //Syntax for sorting Array if we want to manage state ourselves
182
162
  const sorting = [
@@ -197,17 +177,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
197
177
  }
198
178
  }
199
179
 
200
- const paginationInitializer = pagination ? {
201
- getPaginationRowModel: getPaginationRowModel(),
202
- paginateExpandedRows: false,
203
- initialState: {
204
- pagination: {
205
- pageIndex: paginationProps?.pageIndex ?? 0,
206
- pageSize: paginationProps?.pageSize ?? 20,
207
- },
208
- },
209
- } : {}
210
-
211
180
  //initialize table
212
181
  const table = useReactTable({
213
182
  data: loading ? Array(loadingStateRowCount).fill({}) : tableData,
@@ -220,7 +189,6 @@ const AdvancedTable = (props: AdvancedTableProps) => {
220
189
  enableSortingRemoval: false,
221
190
  sortDescFirst: true,
222
191
  ...expandAndSortState(),
223
- ... paginationInitializer,
224
192
  ...tableOptions,
225
193
  })
226
194
 
@@ -254,15 +222,11 @@ const AdvancedTable = (props: AdvancedTableProps) => {
254
222
  const htmlProps = buildHtmlProps(htmlOptions)
255
223
  const classes = classnames(
256
224
  buildCss("pb_advanced_table"),
257
- `advanced-table-responsive-${responsive}`,
225
+ `table-responsive-${responsive}`,
258
226
  globalProps(props),
259
227
  className
260
228
  )
261
229
 
262
- const onPageChange = (page: number) => {
263
- table.setPageIndex(page - 1)
264
- }
265
-
266
230
  return (
267
231
  <div {...ariaProps}
268
232
  {...dataProps}
@@ -286,45 +250,23 @@ const AdvancedTable = (props: AdvancedTableProps) => {
286
250
  toggleExpansionIcon,
287
251
  }}
288
252
  >
289
- <>
290
- {pagination &&
291
- <Pagination
292
- current={table.getState().pagination.pageIndex + 1}
293
- key={`pagination-top-${table.getState().pagination.pageIndex + 1}`}
294
- marginBottom="xs"
295
- onChange={onPageChange}
296
- range={paginationProps?.range ? paginationProps?.range : 5}
297
- total={table.getPageCount()}
298
- />
299
- }
300
- <Table
301
- className={`${loading ? "content-loading" : ""}`}
302
- dark={dark}
303
- dataTable
304
- numberSpacing="tabular"
305
- responsive="none"
306
- {...tableProps}
307
- >
308
- {children ? (
309
- children
310
- ) : (
311
- <>
312
- <TableHeader />
313
- <TableBody />
314
- </>
315
- )}
316
- </Table>
317
- {pagination &&
318
- <Pagination
319
- current={table.getState().pagination.pageIndex + 1}
320
- key={`pagination-bottom-${table.getState().pagination.pageIndex + 1}`}
321
- marginTop="xs"
322
- onChange={onPageChange}
323
- range={paginationProps?.range ? paginationProps?.range : 5}
324
- total={table.getPageCount()}
325
- />
326
- }
327
- </>
253
+ <Table
254
+ className={`${loading ? "content-loading" : ""}`}
255
+ dark={dark}
256
+ dataTable
257
+ numberSpacing="tabular"
258
+ responsive="none"
259
+ {...tableProps}
260
+ >
261
+ {children ? (
262
+ children
263
+ ) : (
264
+ <>
265
+ <TableHeader />
266
+ <TableBody />
267
+ </>
268
+ )}
269
+ </Table>
328
270
  </AdvancedTableContext.Provider>
329
271
  </div>
330
272
  )
@@ -1,5 +1,5 @@
1
1
  <%= pb_content_tag do %>
2
- <%= pb_rails("table", props: { size: "sm", data_table: true, number_spacing:"tabular", responsive:"none", dark: dark }) do %>
2
+ <%= pb_rails("table", props: { size: "sm", tag:"div", data_table: true, number_spacing:"tabular", responsive:"none", dark: dark }) do %>
3
3
  <% if content.present? %>
4
4
  <% content.presence %>
5
5
  <% else %>
@@ -10,16 +10,9 @@ module Playbook
10
10
  prop :enable_toggle_expansion, type: Playbook::Props::Enum,
11
11
  values: %w[all header none],
12
12
  default: "header"
13
- prop :responsive, type: Playbook::Props::Enum,
14
- values: %w[none scroll],
15
- default: "none"
16
13
 
17
14
  def classname
18
- generate_classname("pb_advanced_table", responsive_classname, separator: " ")
19
- end
20
-
21
- def responsive_classname
22
- responsive == "scroll" ? "advanced-table-responsive-scroll" : "advanced-table-responsive-none"
15
+ generate_classname("pb_advanced_table")
23
16
  end
24
17
  end
25
18
  end
@@ -468,7 +468,7 @@ test("responsive prop functions as expected", () => {
468
468
  )
469
469
 
470
470
  const kit = screen.getByTestId(testId)
471
- expect(kit).toHaveClass("pb_advanced_table advanced-table-responsive-scroll")
471
+ expect(kit).toHaveClass("pb_advanced_table table-responsive-scroll")
472
472
  })
473
473
 
474
474
  test("responsive none prop functions as expected", () => {
@@ -483,7 +483,7 @@ test("responsive none prop functions as expected", () => {
483
483
  )
484
484
 
485
485
  const kit = screen.getByTestId(testId)
486
- expect(kit).toHaveClass("pb_advanced_table advanced-table-responsive-none")
486
+ expect(kit).toHaveClass("pb_advanced_table table-responsive-none")
487
487
  })
488
488
 
489
489
  test("customRenderer prop functions as expected", () => {
@@ -49,9 +49,11 @@
49
49
  label: "Graduated Students",
50
50
  }
51
51
  ]
52
+
53
+ subrow_headers = ["Quarter", "Month", "Day"]
52
54
  %>
53
55
 
54
56
  <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
55
57
  <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
56
- <%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, enable_toggle_expansion: "all" }) %>
58
+ <%= pb_rails("advanced_table/table_body", props: { id: "beta_sort", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
57
59
  <% end %>
@@ -36,5 +36,5 @@
36
36
 
37
37
  <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions }) do %>
38
38
  <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
39
- <%= pb_rails("advanced_table/table_body", props: { id: "test_table", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { id: "subrow_headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
40
40
  <% end %>
@@ -1,3 +1,3 @@
1
1
  `subrow_headers` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
2
 
3
- `enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle expansion button will appear in the table header as well as in the subRow headers. If set to "header", the button will only appear in header and NOT in subRow headers. This prop is set to "header" by default.
3
+ `enable_toggle_expansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enable_toggle_expansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
@@ -2,12 +2,8 @@ examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
- - advanced_table_collapsible_trail_rails: Collapsible Trail
6
5
  - advanced_table_beta_sort: Enable Sorting
7
6
  - advanced_table_custom_cell_rails: Custom Components for Cells
8
- - advanced_table_column_headers: Multi-Header Columns
9
- - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
10
-
11
7
 
12
8
  react:
13
9
  - advanced_table_default: Default (Required Props)
@@ -22,7 +18,3 @@ examples:
22
18
  - advanced_table_inline_row_loading: Inline Row Loading
23
19
  - advanced_table_responsive: Responsive Tables
24
20
  - advanced_table_custom_cell: Custom Components for Cells
25
- - advanced_table_pagination: Pagination
26
- - advanced_table_pagination_with_props: Pagination Props
27
- - advanced_table_column_headers: Multi-Header Columns
28
- - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
@@ -10,7 +10,3 @@ export { default as AdvancedTableTableProps } from './_advanced_table_table_prop
10
10
  export { default as AdvancedTableInlineRowLoading } from './_advanced_table_inline_row_loading.jsx'
11
11
  export { default as AdvancedTableResponsive } from './_advanced_table_responsive.jsx'
12
12
  export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cell.jsx'
13
- export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
14
- export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
15
- export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
16
- export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'