playbook_ui_docs 15.3.0.pre.rc.7 → 15.4.0.pre.alpha.PLAY1541responsivefloorPOC12370

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +4 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +1 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +3 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +2 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +1 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +2 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +28 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +11 -2
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +9 -1
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +4 -1
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +3 -2
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +1 -1
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +1 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +1 -1
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +16 -0
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.html.erb +104 -0
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header_rails.md +1 -0
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_rails.html.erb +1 -1
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +42 -0
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  26. data/app/pb_kits/playbook/pb_background/docs/_background_category.md +1 -1
  27. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +4 -4
  28. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +4 -0
  29. data/app/pb_kits/playbook/pb_card/docs/_card_background.md +1 -1
  30. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  31. data/app/pb_kits/playbook/pb_card/docs/_card_highlight.md +1 -1
  32. data/app/pb_kits/playbook/pb_card/docs/_card_light.md +1 -1
  33. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
  34. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
  35. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +1 -0
  36. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.jsx +38 -0
  37. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_and_dropdown_range.md +14 -0
  38. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -1
  39. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -1
  40. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.html.erb +4 -0
  41. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.jsx +43 -0
  42. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_show_current_year.md +1 -0
  43. data/app/pb_kits/playbook/pb_date_range_inline/docs/_description.md +1 -1
  44. data/app/pb_kits/playbook/pb_date_range_inline/docs/example.yml +3 -2
  45. data/app/pb_kits/playbook/pb_date_range_inline/docs/index.js +1 -0
  46. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.html.erb +12 -0
  47. data/app/pb_kits/playbook/pb_date_stacked/docs/{_date_stacked_not_current_year.jsx → _date_stacked_current_year.jsx} +6 -5
  48. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_current_year.md +1 -0
  49. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.html.erb +1 -1
  50. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +1 -1
  51. data/app/pb_kits/playbook/pb_date_stacked/docs/_description.md +1 -1
  52. data/app/pb_kits/playbook/pb_date_stacked/docs/example.yml +2 -2
  53. data/app/pb_kits/playbook/pb_date_stacked/docs/index.js +1 -1
  54. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +2 -2
  55. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_custom_colors.md +1 -1
  56. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx +18 -0
  57. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md +4 -0
  58. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx +18 -0
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md +1 -0
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.jsx +19 -0
  61. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.md +1 -0
  62. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.jsx +38 -0
  63. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.md +14 -0
  64. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +1 -1
  65. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
  66. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +5 -1
  67. data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.md +1 -1
  68. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +15 -1
  69. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.html.erb +9 -8
  70. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb +11 -10
  71. data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -0
  72. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  73. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_rails.md +1 -1
  74. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_truncated_text_react.md +1 -1
  75. data/app/pb_kits/playbook/pb_icon/docs/_icon_color.md +1 -1
  76. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.md +1 -1
  77. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +7 -14
  78. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +6 -15
  79. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.md +1 -1
  80. data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.md +1 -1
  81. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.html.erb +21 -0
  82. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.jsx +113 -0
  83. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav_disabled.md +1 -0
  84. data/app/pb_kits/playbook/pb_nav/docs/_nav_with_spacing_control.md +1 -1
  85. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.html.erb +30 -0
  86. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.jsx +117 -0
  87. data/app/pb_kits/playbook/pb_nav/docs/_vertical_nav_disabled.md +1 -0
  88. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -0
  89. data/app/pb_kits/playbook/pb_nav/docs/index.js +3 -1
  90. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +1 -1
  91. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -1
  92. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.md +1 -0
  93. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +1 -1
  94. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.md +11 -0
  95. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -1
  96. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_custom_tooltip.md +2 -1
  97. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_pb_circle_chart_default.md +1 -0
  98. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -1
  99. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +2 -2
  100. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.md +1 -0
  101. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -1
  102. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.md +1 -0
  103. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +1 -1
  104. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  105. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +68 -0
  106. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +1 -0
  107. data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
  108. data/app/pb_kits/playbook/pb_popover/docs/index.js +1 -0
  109. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_description.md +1 -1
  110. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default_rails.md +7 -0
  111. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.html.erb +10 -2
  112. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline_rails.md +1 -0
  113. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +19 -11
  114. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.html.erb +5 -1
  115. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.html.erb +1 -1
  116. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky_rails.md +1 -0
  117. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -2
  118. data/app/pb_kits/playbook/pb_section_separator/docs/_description.md +1 -1
  119. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_rails.md +1 -1
  120. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_border_radius_react.md +1 -1
  121. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_layout.md +1 -1
  122. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +1 -1
  123. data/app/pb_kits/playbook/pb_table/docs/_table_sm.md +1 -1
  124. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.html.erb +63 -0
  125. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx +89 -0
  126. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md +4 -0
  127. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md +3 -0
  128. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  129. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  130. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +64 -0
  131. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +70 -0
  132. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +1 -0
  133. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.html.erb +67 -1
  134. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.jsx +68 -6
  135. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.md +1 -1
  136. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +2 -0
  137. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +2 -1
  138. data/dist/playbook-doc.js +1 -19
  139. metadata +46 -5
  140. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.html.erb +0 -5
  141. /data/app/pb_kits/playbook/pb_popover/docs/{_popover_append_to.md → _popover_append_to_rails.md} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 206db7f54ac610a11ff080bfb1e760b30bc663204d07b74d15f4ba7c63a63922
4
- data.tar.gz: 1ec8de8dde5c4ddde67abfb1d2b3fb6ac26904dcb151a8bcb162f46fe819e12b
3
+ metadata.gz: 2d824c3eae86a4ba06d36a9fd442555437fca51d7661ae7a552a667f2ebab911
4
+ data.tar.gz: 9c3cff79265888ed61fb9d111d0749c52049dd670ed78933b43ab3976a8dc2f3
5
5
  SHA512:
6
- metadata.gz: 881f0844a5f24a643a8f4eca76ce166669797065987a007ab242d3600479b564c1573e7b2efce11d8aea9810222c869f536ccba324b681828c1e6ddc30504315
7
- data.tar.gz: a4e0ab6c12e5ef93a456c33f2911d1e50ac55e228eabd868516c90393fd382a35ac8f21779eee6db75c84b82499ebccaa039a91e57073e1c3d30b935514108cb
6
+ metadata.gz: 136836abf6ce19375bb8dfab32042e7a2bc94f68f7ec29a09befc801269fa160ede22df744fe50efa1f50f33e856dce1d6b38c5b7524f761e8191d7b785ed015
7
+ data.tar.gz: 3a95c71ba1935861cc98a1fd21ac0ed8db7d64605199a82e5b32834491758e41321d31e13997e9662094d6c499561235401757a0974e20ccc121983beea3e401
@@ -26,6 +26,10 @@
26
26
  {
27
27
  accessor: "classCompletionRate",
28
28
  label: "Class Completion Rate",
29
+ column_styling: {
30
+ cell_background_color: "category_1",
31
+ font_color: "white"
32
+ }
29
33
  },
30
34
  {
31
35
  accessor: "graduatedStudents",
@@ -1 +1 @@
1
- `column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here.
1
+ `column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here. Use `font_color` to achieve better contrast between cell content and background for darker backgrounds.
@@ -1,3 +1,3 @@
1
1
  The borders of column groups can be set to a different color using the `columnGroupBorderColor` prop. In order for these borders to be visible, this prop must be used with `tableProps` and `verticalBorder` set to true.
2
2
 
3
- The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
3
+ The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/tokens/colors).
@@ -1,3 +1,3 @@
1
1
  The borders of column groups can be set to a different color using the `column_group_border_color` prop. In order for these borders to be visible, this prop must be used with `table_props` and `vertical_border` set to true.
2
2
 
3
- The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
3
+ The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/tokens/colors).
@@ -1,7 +1,8 @@
1
1
  import React from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
2
+ import { AdvancedTable, colors } from "playbook-ui"
3
3
  import MOCK_DATA from "./advanced_table_mock_data.json"
4
4
 
5
+
5
6
  const AdvancedTableColumnStyling = (props) => {
6
7
  const columnDefinitions = [
7
8
  {
@@ -34,6 +35,7 @@ const AdvancedTableColumnStyling = (props) => {
34
35
  {
35
36
  accessor: "graduatedStudents",
36
37
  label: "Graduated Students",
38
+ columnStyling:{fontColor: colors.data_8},
37
39
  },
38
40
  ]
39
41
 
@@ -4,4 +4,6 @@ The `columnStyling` prop is an optional item that can be used within `columnDefi
4
4
 
5
5
  2) `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
6
6
 
7
+ 3) `fontColor`: This will allow you to control the font color for a given column.
8
+
7
9
  `columnStyling` can be used within the columnDefinition of all the columns or some of them, as shown. Each column has its own individual control in this way.
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table';
2
+ import { AdvancedTable } from "playbook-ui";
3
3
  import MOCK_DATA from "./advanced_table_mock_data.json";
4
4
 
5
5
  const AdvancedTableColumnStylingColumnHeaders = (props) => {
@@ -29,6 +29,7 @@
29
29
  {
30
30
  accessor: "graduatedStudents",
31
31
  label: "Graduated Students",
32
+ column_styling: { font_color: "red" }
32
33
  }
33
34
  ] %>
34
35
 
@@ -4,4 +4,6 @@ The `column_styling` prop is an optional item that can be used within `column_de
4
4
 
5
5
  2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
6
6
 
7
+ 3) `font_color`: This will allow you to control the font color for a given column.
8
+
7
9
  `column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
@@ -1,6 +1,8 @@
1
1
  import React from "react"
2
2
  import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import Caption from '../../pb_caption/_caption'
3
4
  import { MOCK_DATA_INLINE_LOADING } from "./_mock_data_inline_loading"
5
+ import { MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN } from "./_mock_data_inline_loading_empty_children"
4
6
 
5
7
  const AdvancedTableInlineRowLoading = (props) => {
6
8
  const columnDefinitions = [
@@ -41,16 +43,42 @@ const AdvancedTableInlineRowLoading = (props) => {
41
43
 
42
44
  return (
43
45
  <div>
46
+ <Caption text="Inline Row Loading - Demonstrated in Row 1 (Rows 2 and 3 have data)" />
44
47
  <AdvancedTable
45
48
  columnDefinitions={columnDefinitions}
46
49
  enableToggleExpansion="all"
47
50
  inlineRowLoading
51
+ marginBottom="md"
48
52
  tableData={MOCK_DATA_INLINE_LOADING}
49
53
  {...props}
50
54
  >
51
55
  <AdvancedTable.Header />
52
56
  <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
53
57
  </AdvancedTable>
58
+ <Caption text="Inline Row Loading with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is not rendered" />
59
+ <AdvancedTable
60
+ columnDefinitions={columnDefinitions}
61
+ enableToggleExpansion="all"
62
+ inlineRowLoading
63
+ marginBottom="md"
64
+ tableData={MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN}
65
+ {...props}
66
+ >
67
+ <AdvancedTable.Header />
68
+ <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
69
+ </AdvancedTable>
70
+ <Caption text="Inline Row Loading and Persist Toggle Expansion Button with No Subrow Data - All Rows Display Inline Row Loading and the Toggle All Button is rendered" />
71
+ <AdvancedTable
72
+ columnDefinitions={columnDefinitions}
73
+ enableToggleExpansion="all"
74
+ inlineRowLoading
75
+ persistToggleExpansionButton
76
+ tableData={MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN}
77
+ {...props}
78
+ >
79
+ <AdvancedTable.Header />
80
+ <AdvancedTable.Body subRowHeaders={subRowHeaders}/>
81
+ </AdvancedTable>
54
82
  </div>
55
83
  )
56
84
  }
@@ -1,5 +1,14 @@
1
+ ### inlineRowLoading
1
2
  As a default, the kit assumes that the initial dataset is complete, and it renders all expansion buttons/controls based on that data; if no children are present, no expansion controls are rendered. If, however, you want to change the initial dataset to omit some or all of its children (to improve load times of a complex dataset, perhaps), and you implement a querying logic that loads children only when its parent is expanded, then you must use the `inlineRowLoading` prop to ensure your expansion controls are rendered even though your child data is not yet loaded. You must also pass an empty `children` array to any node that will have children to ensure its parent maintains its ability to expand. If this prop is called AND your data contains empty `children` arrays, the kit will render expansion controls on any row with empty children, and then add an inline loading state within the expanded subrow until those child row(s) are returned to the page [by your query logic].
2
3
 
3
- In this code example, 2021 has an empty children array. Toggle it open to see the inline loading state. Once the correct data loads, this state will be replaced with the correct data rows.
4
+ In the first Advanced Table in this code example, 2021 has an empty children array. Toggle it open to see the inline loading state. Once the correct data loads, this state will be replaced with the correct data rows.
4
5
 
5
- This prop is set to `false` by default.
6
+ This prop is set to `false` by default.
7
+
8
+
9
+ ### persistToggleExpansion
10
+ The `persistToggleExpansionButton` is a boolean prop that renders the toggle-all icon in the top left header cell for complex datasets with empty `children` arrays and advanced querying logic explained in the preceeding doc example. Your logic may require an additional query helper file to update data specifically from requerying via toggle all buttons.
11
+
12
+ In the second and third Advanced Tables in this code example, all 3 rows have empty children arrays. The second Advanced Table demonstrates that the toggle all button does not render (prior to an initial row expansion) without `persistToggleExpansionButton` in place. The third Advanced Table shows the toggle all button due to `persistToggleExpansionButton`.
13
+
14
+ This prop is set to false by default and should only be used in conjunction with `inlineRowLoading`.
@@ -22,7 +22,6 @@ const AdvancedTablePaddingControl = (props) => {
22
22
  {value}
23
23
  </Background>
24
24
  ),
25
-
26
25
  },
27
26
  {
28
27
  accessor: "scheduledMeetings",
@@ -39,6 +38,15 @@ const AdvancedTablePaddingControl = (props) => {
39
38
  {
40
39
  accessor: "classCompletionRate",
41
40
  label: "Class Completion Rate",
41
+ columnStyling:{cellPadding: "none", fontColor: "white"},
42
+ customRenderer: (row, value) => (
43
+ <Background
44
+ backgroundColor={"category_1"}
45
+ padding="xs"
46
+ >
47
+ {value}
48
+ </Background>
49
+ ),
42
50
  },
43
51
  {
44
52
  accessor: "graduatedStudents",
@@ -1,3 +1,3 @@
1
1
  `columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
2
2
 
3
- This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
3
+ This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here. Use `fontColor` to achieve better contrast between cell content and background for darker backgrounds.
@@ -38,7 +38,10 @@ const AdvancedTablePaginationWithProps = (props) => {
38
38
  const paginationProps = {
39
39
  pageIndex: 1,
40
40
  pageSize: 10,
41
- range: 2
41
+ range: 2,
42
+ onPageChange: (pageIndex) => {
43
+ console.log('Current page index:', pageIndex);
44
+ }
42
45
  }
43
46
 
44
47
  return (
@@ -1,5 +1,6 @@
1
- `paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with 2 optional items:
1
+ `paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with the following optional items:
2
2
 
3
3
  - `pageIndex`: An optional prop to set which page is set to open on initial load. Default is '0'
4
4
  - `pageSize`: An optional prop to set total number of rows for each page before the Table paginates. Default is '20'
5
- - `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'
5
+ - `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'
6
+ - `onPageChange`: A callback function that gives to access to the current page index.
@@ -1,7 +1,7 @@
1
1
  To achieve a sticky header AND sticky columns together, in addition to the `stickyLeftColumn` logic outlined above, you can:
2
2
 
3
3
  - Set `sticky: true` via `tableProps`
4
- - Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
4
+ - Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud//global_props/max_height) global prop.
5
5
 
6
6
  **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the column stickiness.
7
7
 
@@ -1,4 +1,4 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/global_props/max_height) global prop.
2
2
 
3
3
  **NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
4
 
@@ -1,4 +1,4 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/global_props/max_height) global prop.
2
2
 
3
3
  **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
4
 
@@ -76,6 +76,22 @@ const columnDefinitions = [
76
76
  {
77
77
  label: "Attendance",
78
78
  id: "attendance",
79
+ header: () => (
80
+ <Flex alignItems="center"
81
+ justifyContent="center"
82
+ >
83
+ <Caption marginRight="xs">Attendance</Caption>
84
+ <Tooltip placement="top"
85
+ text="Whoa. I'm a Tooltip Too!"
86
+ zIndex={10}
87
+ >
88
+ <Icon cursor="pointer"
89
+ icon="info"
90
+ size="xs"
91
+ />
92
+ </Tooltip>
93
+ </Flex>
94
+ ),
79
95
  columns: [
80
96
  {
81
97
  accessor: "attendanceRate",
@@ -0,0 +1,104 @@
1
+ <%
2
+ column_definitions = [
3
+ {
4
+ accessor: "year",
5
+ label: "Year",
6
+ id: "year",
7
+ cellAccessors: ["quarter", "month", "day"],
8
+ },
9
+ {
10
+ label: "Enrollment Data",
11
+ id: "enrollmentData",
12
+ header: ->(cell, label) {
13
+ capture do
14
+ pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
15
+ pb_rails("caption", props: { margin_right: "xs", text: "Enrollment Data" }) +
16
+ pb_rails("icon", props: { id: "tooltip-interact-multi", icon: "info", size: "xs", cursor: "pointer" }) +
17
+ pb_rails("tooltip", props: {
18
+ trigger_element_id: "tooltip-interact-multi",
19
+ tooltip_id: "example-custom-tooltip-multi",
20
+ position: "top",
21
+ z_index: "10"
22
+ }) do
23
+ "Whoa. I'm a Tooltip"
24
+ end
25
+ end
26
+ end
27
+ },
28
+ columns: [
29
+ {
30
+ label: "Enrollment Stats",
31
+ id: "enrollmentStats",
32
+ columns: [
33
+ {
34
+ accessor: "newEnrollments",
35
+ id: "newEnrollments",
36
+ label: "New Enrollments",
37
+ },
38
+ {
39
+ accessor: "scheduledMeetings",
40
+ id: "scheduledMeetings",
41
+ label: "Scheduled Meetings",
42
+ },
43
+ ],
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ label: "Performance Data",
49
+ id: "performanceData",
50
+ columns: [
51
+ {
52
+ label: "Completion Metrics",
53
+ id: "completionMetrics",
54
+ columns: [
55
+ {
56
+ accessor: "completedClasses",
57
+ id: "completedClasses",
58
+ label: "Completed Classes",
59
+ },
60
+ {
61
+ accessor: "classCompletionRate",
62
+ id: "classCompletionRate",
63
+ label: "Class Completion Rate",
64
+ },
65
+ ],
66
+ },
67
+ {
68
+ label: "Attendance",
69
+ id: "attendance",
70
+ header: ->(cell, label) {
71
+ capture do
72
+ pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
73
+ pb_rails("caption", props: { margin_right: "xs", text: "Attendance" }) +
74
+ pb_rails("icon", props: { id: "tooltip-interact-multi-2", icon: "info", size: "xs", cursor: "pointer" }) +
75
+ pb_rails("tooltip", props: {
76
+ trigger_element_id: "tooltip-interact-multi-2",
77
+ tooltip_id: "example-custom-tooltip-multi-2",
78
+ position: "top",
79
+ z_index: "10"
80
+ }) do
81
+ "Whoa. I'm a Tooltip Too!"
82
+ end
83
+ end
84
+ end
85
+ },
86
+ columns: [
87
+ {
88
+ accessor: "attendanceRate",
89
+ id: "attendanceRate",
90
+ label: "Attendance Rate",
91
+ },
92
+ {
93
+ accessor: "scheduledMeetings",
94
+ id: "scheduledMeetings",
95
+ label: "Scheduled Meetings",
96
+ },
97
+ ],
98
+ },
99
+ ],
100
+ },
101
+ ]
102
+ %>
103
+
104
+ <%= pb_rails("advanced_table", props: { id: "custom_header_multi_header_table", table_data: @table_data, column_definitions: column_definitions }) %>
@@ -0,0 +1 @@
1
+ The optional `header` item within `column_definitions` can also be used with multi headers as seen here.
@@ -12,7 +12,7 @@
12
12
  capture do
13
13
  pb_rails("flex", props: { align_items: "center", justify_content: "center" }) do
14
14
  pb_rails("caption", props: { margin_right: "xs", text: "New Enrollments" }) +
15
- pb_rails("icon", props: { id: "tooltip-interact", icon: "info", size: "xs" }) +
15
+ pb_rails("icon", props: { id: "tooltip-interact", icon: "info", size: "xs", cursor: "pointer" }) +
16
16
  pb_rails("tooltip", props: {
17
17
  trigger_element_id: "tooltip-interact",
18
18
  tooltip_id: "example-custom-tooltip",
@@ -0,0 +1,42 @@
1
+ export const MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN = [
2
+ {
3
+ year: "2021",
4
+ quarter: null,
5
+ month: null,
6
+ day: null,
7
+ newEnrollments: "20",
8
+ scheduledMeetings: "10",
9
+ attendanceRate: "51%",
10
+ completedClasses: "3",
11
+ classCompletionRate: "33%",
12
+ graduatedStudents: "19",
13
+ children: [],
14
+ },
15
+ {
16
+ year: "2022",
17
+ quarter: null,
18
+ month: null,
19
+ day: null,
20
+ newEnrollments: "25",
21
+ scheduledMeetings: "17",
22
+ attendanceRate: "75%",
23
+ completedClasses: "5",
24
+ classCompletionRate: "45%",
25
+ graduatedStudents: "32",
26
+ children: [],
27
+ },
28
+ {
29
+ year: "2023",
30
+ quarter: null,
31
+ month: null,
32
+ day: null,
33
+ newEnrollments: "10",
34
+ scheduledMeetings: "15",
35
+ attendanceRate: "65%",
36
+ completedClasses: "4",
37
+ classCompletionRate: "49%",
38
+ graduatedStudents: "29",
39
+ children: [],
40
+ },
41
+ ]
42
+
@@ -11,6 +11,7 @@ examples:
11
11
  - advanced_table_responsive: Responsive Tables
12
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
13
13
  - advanced_table_with_custom_header_rails: Custom Header Cell
14
+ - advanced_table_with_custom_header_multi_header_rails: Custom Header with Multiple Headers
14
15
  - advanced_table_column_headers: Multi-Header Columns
15
16
  - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
16
17
  - advanced_table_column_headers_vertical_border: Multi-Header Columns with Vertical Borders
@@ -1 +1 @@
1
- Category colors can be passed into the background kit. Values `category_1` to `category_21` are accepted. List of all category and status colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">here</a>.
1
+ Category colors can be passed into the background kit. Values `category_1` to `category_21` are accepted. List of all category and status colors can be viewed <a href="https://playbook.powerapp.cloud/tokens/colors" target="_blank">here</a>.
@@ -1,13 +1,13 @@
1
1
 
2
2
  <div>
3
3
  <%= pb_rails("bread_crumbs", props: { aria: { label: "Breadcrumb Navigation" } }) do%>
4
- <%= pb_rails("icon", props: { icon: "home"}) %>
4
+ <%= pb_rails("icon", props: { icon: "home", color: "link"}) %>
5
5
  <%= pb_rails("bread_crumbs/bread_crumb_item", props: { link: "/" }) do %>
6
- <%= pb_rails("title", props: { size: 4, text: "Home", tag: "span" }) %>
6
+ <%= pb_rails("title", props: { size: 4, text: "Home", tag: "span", color: "link" }) %>
7
7
  <%end%>
8
- <%= pb_rails("icon", props: { icon: 'users'}) %>
8
+ <%= pb_rails("icon", props: { icon: 'users', color: "link"}) %>
9
9
  <%= pb_rails("bread_crumbs/bread_crumb_item", props: { link: "/users" }) do %>
10
- <%= pb_rails("title", props: { size: 4, text: "Users", tag: "span" }) %>
10
+ <%= pb_rails("title", props: { size: 4, text: "Users", tag: "span", color: "link" }) %>
11
11
  <%end%>
12
12
  <%= pb_rails("icon", props: { icon: "user"}) %>
13
13
  <%= pb_rails("bread_crumbs/bread_crumb_item") do %>
@@ -12,6 +12,7 @@ const BreadCrumbsDefault = (props) => {
12
12
  {...props}
13
13
  >
14
14
  <Icon
15
+ color="link"
15
16
  icon="home"
16
17
  size="1x"
17
18
  {...props}
@@ -21,6 +22,7 @@ const BreadCrumbsDefault = (props) => {
21
22
  href="/home"
22
23
  >
23
24
  <Title
25
+ color="link"
24
26
  size="4"
25
27
  tag="span"
26
28
  text="Home"
@@ -28,6 +30,7 @@ const BreadCrumbsDefault = (props) => {
28
30
  />
29
31
  </BreadCrumbItem>
30
32
  <Icon
33
+ color="link"
31
34
  icon="users"
32
35
  size="1x"
33
36
  {...props}
@@ -37,6 +40,7 @@ const BreadCrumbsDefault = (props) => {
37
40
  href="/users"
38
41
  >
39
42
  <Title
43
+ color="link"
40
44
  size="4"
41
45
  tag="span"
42
46
  text="Users"
@@ -1 +1 @@
1
- Add a background color by passing the color name to background. List of all colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">here</a> under Product Colors and Status: Subtle Variations.
1
+ Add a background color by passing the color name to background. List of all colors can be viewed <a href="https://playbook.powerapp.cloud/tokens/colors" target="_blank">here</a> under Product Colors and Status: Subtle Variations.
@@ -1 +1 @@
1
- Card headers pass category, product, status and background colors only. List of all category, product, status and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
1
+ Card headers pass category, product, status and background colors only. List of all category, product, status and background colors can be viewed <a href="https://playbook.powerapp.cloud/token/colors" target="_blank">here</a>.
@@ -1 +1 @@
1
- Card highlight can pass status, product, and category colors. List of all colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
1
+ Card highlight can pass status, product, and category colors. List of all colors can be viewed <a href="https://playbook.powerapp.cloud/token/colors" target="_blank">here</a>.
@@ -1 +1 @@
1
- Card can leverage the max-width property. Learn more in our <a href="https://playbook.powerapp.cloud/visual_guidelines" target="_blank">visual guidelines.</a>
1
+ Card can leverage the max-width property. Learn more in our <a href="https://playbook.powerapp.cloud/global_props/max_width" target="_blank">visual guidelines.</a>
@@ -7,7 +7,7 @@
7
7
  }) %>
8
8
 
9
9
  <%= pb_rails("currency", props: {
10
- amount: "342",
10
+ amount: 342,
11
11
  label: "Light",
12
12
  margin_bottom: "md",
13
13
  size: "sm",
@@ -14,7 +14,7 @@ const CurrencyVariants = (props) => {
14
14
  {...props}
15
15
  />
16
16
  <Currency
17
- amount="342"
17
+ amount={342}
18
18
  label="Light"
19
19
  marginBottom="md"
20
20
  size="sm"
@@ -0,0 +1 @@
1
+ **NOTE:** The value passed into the `amount` prop can be either a string or numeric value.
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import Dropdown from "../../pb_dropdown/_dropdown";
3
+ import DatePicker from "../../pb_date_picker/_date_picker";
4
+
5
+ const DatePickerAndDropdownRange = (props) => {
6
+ return (
7
+ <>
8
+ <Dropdown
9
+ controlsEndId="end-date-picker1"
10
+ controlsStartId="start-date-picker1"
11
+ id="dropdown-as-quickpick"
12
+ label="Date Range"
13
+ marginBottom="sm"
14
+ placeholder="Select a Date Range"
15
+ variant="quickpick"
16
+ {...props}
17
+ />
18
+
19
+ <DatePicker
20
+ label="Start Date"
21
+ pickerId="start-date-picker1"
22
+ placeholder="Select a Start Date"
23
+ syncStartWith="dropdown-as-quickpick"
24
+ {...props}
25
+ />
26
+
27
+ <DatePicker
28
+ label="End Date"
29
+ pickerId="end-date-picker1"
30
+ placeholder="Select an End Date"
31
+ syncEndWith="dropdown-as-quickpick"
32
+ {...props}
33
+ />
34
+ </>
35
+ );
36
+ };
37
+
38
+ export default DatePickerAndDropdownRange;
@@ -0,0 +1,14 @@
1
+ You can link a Dropdown (`quickpick` variant) to standard DatePickers using the following props:
2
+
3
+ **For the Dropdown**:
4
+ `controlsStartId`: ID of the DatePicker that should receive the start date.
5
+
6
+ `controlsEndId`: ID of the DatePicker that should receive the end date.
7
+
8
+ When a quickpick option like “This Year” is selected, it automatically populates the linked start and end inputs.
9
+
10
+ **For the Start/End DatePickers**:
11
+ `syncStartWith`: ID of the quickpick this start date is synced to.
12
+ `syncEndWith`: ID of the quickpick this end date is synced to.
13
+
14
+ When a user manually edits the start or end date, it clears the selected quickpick to prevent conflicting values.
@@ -48,7 +48,8 @@ examples:
48
48
  - date_picker_quick_pick_custom: Custom Quick Pick Dates
49
49
  - date_picker_quick_pick_custom_override: Custom Quick Pick Dates (append to defaults)
50
50
  - date_picker_quick_pick_default_date: Range (Quick Pick w/ Default Date)
51
- - date_picker_range_pattern: Range with 2 Date Pickers and a Quick Pick
51
+ # - date_picker_range_pattern: Range with 2 Date Pickers and a Quick Pick
52
+ - date_picker_and_dropdown_range: Range with Dropdown and 2 Date Pickers
52
53
  - date_picker_format: Format
53
54
  - date_picker_disabled: Disabled Dates
54
55
  - date_picker_min_max: Min Max
@@ -26,4 +26,5 @@ export { default as DatePickerOnClose } from './_date_picker_on_close.jsx'
26
26
  export { default as DatePickerQuickPickCustom } from './_date_picker_quick_pick_custom'
27
27
  export { default as DatePickerQuickPickCustomOverride } from './_date_picker_quick_pick_custom_override'
28
28
  export { default as DatePickerQuickPickDefaultDate } from './_date_picker_quick_pick_default_date'
29
- export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
29
+ export { default as DatePickerRangePattern } from './_date_picker_range_pattern'
30
+ export { default as DatePickerAndDropdownRange } from './_date_picker_and_dropdown_range.jsx'
@@ -0,0 +1,4 @@
1
+ <%= pb_rails("date_range_inline", props: { start_date: Date.new(Date.current.year, 10, 31), end_date: Date.new(Date.current.year, 12, 7), size: "xs", show_current_year: true }) %>
2
+ <%= pb_rails("date_range_inline", props: { start_date: Date.new(Date.current.year, 10, 31), end_date: Date.new(Date.current.year, 12, 7), show_current_year: true }) %>
3
+ <%= pb_rails("date_range_inline", props: { start_date: Date.new(Date.current.year, 10, 31), end_date: Date.new(Date.current.year, 12, 7), align: "center", icon: true, size: "xs", show_current_year: true }) %>
4
+ <%= pb_rails("date_range_inline", props: { start_date: Date.new(Date.current.year, 10, 31), end_date: Date.new(Date.current.year, 12, 7), align: "center", icon: true, show_current_year: true }) %>