playbook_ui_docs 15.2.0 → 15.3.0.pre.alpha.PLAY2012currencyallownonstring11930

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 (122) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +39 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +3 -1
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb +3 -3
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +3 -3
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +2 -2
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb +2 -2
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +2 -2
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +1 -1
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +28 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +11 -2
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.html.erb +51 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row_rails.md +1 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.html.erb +40 -0
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_rails.md +1 -0
  18. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +4 -1
  19. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +3 -2
  20. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_rails.md +1 -1
  21. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling_react.md +1 -1
  22. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.html.erb +2 -2
  23. data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +42 -0
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -0
  25. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.html.erb +4 -4
  26. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +4 -0
  27. data/app/pb_kits/playbook/pb_button/docs/_button_loading.html.erb +7 -3
  28. data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +29 -0
  29. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
  30. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
  31. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +1 -0
  32. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +1 -1
  33. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_description.md +2 -0
  34. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_loading.html.erb +1 -1
  35. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  36. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.md +1 -1
  37. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.html.erb +7 -14
  38. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +6 -15
  39. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +3 -0
  40. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +3 -0
  41. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +3 -0
  42. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.html.erb +12 -0
  43. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.jsx +24 -0
  44. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_color.md +5 -0
  45. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.html.erb +45 -0
  46. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.jsx +119 -0
  47. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_complex.md +1 -0
  48. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.html.erb +5 -0
  49. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_default.jsx +17 -0
  50. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.html.erb +12 -0
  51. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_disable_animation.jsx +24 -0
  52. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.html.erb +23 -0
  53. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_full_circle.jsx +37 -0
  54. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.html.erb +40 -0
  55. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_height.jsx +56 -0
  56. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_live_data.jsx +64 -0
  57. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.html.erb +27 -0
  58. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.jsx +40 -0
  59. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_min_max.md +1 -0
  60. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.html.erb +19 -0
  61. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.jsx +65 -0
  62. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_sizing.md +3 -0
  63. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.html.erb +14 -0
  64. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_title.jsx +27 -0
  65. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.html.erb +39 -0
  66. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.jsx +58 -0
  67. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_pb_gauge_chart_units.md +1 -0
  68. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/example.yml +29 -0
  69. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/index.js +11 -0
  70. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -0
  71. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +34 -0
  72. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +52 -0
  73. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +5 -0
  74. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +34 -0
  75. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +45 -0
  76. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +47 -0
  77. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +64 -0
  78. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +3 -0
  79. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +24 -0
  80. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +37 -0
  81. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +39 -0
  82. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +45 -0
  83. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +86 -0
  84. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +116 -0
  85. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +11 -0
  86. data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +20 -0
  87. data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +6 -0
  88. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.jsx +68 -0
  89. data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to_react.md +1 -0
  90. data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
  91. data/app/pb_kits/playbook/pb_popover/docs/index.js +1 -0
  92. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.jsx +38 -0
  93. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_attributes.md +1 -0
  94. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.jsx +34 -0
  95. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_focus.md +1 -0
  96. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.jsx +37 -0
  97. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_inline.md +1 -0
  98. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_simple.jsx +37 -0
  99. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.jsx +38 -0
  100. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_sticky.md +1 -0
  101. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +69 -0
  102. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.md +1 -0
  103. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +8 -2
  104. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +6 -0
  105. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.html.erb +63 -0
  106. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx +89 -0
  107. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md +4 -0
  108. data/app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md +3 -0
  109. data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
  110. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  111. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.html.erb +64 -0
  112. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.jsx +70 -0
  113. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_options.md +1 -0
  114. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.html.erb +102 -0
  115. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_options.md +1 -0
  116. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.jsx +103 -0
  117. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default_value.md +1 -0
  118. data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +4 -0
  119. data/app/pb_kits/playbook/pb_typeahead/docs/index.js +2 -0
  120. data/dist/playbook-doc.js +2 -2
  121. metadata +84 -3
  122. /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: b4d87af756f39febd60c3466e551a5e7c811c1db773c555a86416817d0376dcd
4
- data.tar.gz: f1e5a3e5b79805495822ca07710d3a7dc8f01396bab75d6a445a61458613f36f
3
+ metadata.gz: a3ec2c47f42c76e57d1500c3294b2d3c3ce3582903f0afc6bfeae02dedc9a974
4
+ data.tar.gz: 0227afdc2c430bdb12321e788726892f077e7dc27d34a7eed15e44bac6a46bba
5
5
  SHA512:
6
- metadata.gz: 3e036ffb75feeae023b92f3fa343129fc9a9266a34f1a35f7106ffcb72b084e2f6063678602c0d4c307fe5a6557b986f4922ce3cf6d12e7dd8dab3afe77180f8
7
- data.tar.gz: 16365bd30dd640c1c1ec04ce52d163510a3a86fb8b47d38c9168282360d021d0f29a1eb10d6edd77de130e65c102e2e8569c23e93ad95766c1bbdf9176d3cdac
6
+ metadata.gz: 171a8acb560136a92fc92a8e0a0b22b9049e6c1deccfcec01c5ac5958a492ebe6a3a507e950983b76baef5ef8ab8cd7f13136c3c686bc79604193dd9b7c5a4a4
7
+ data.tar.gz: 3774708b93d98eaf064c01422258d699444f8ed84ab7f5dd599d2dc6bc9fa5fc1898ed95b01feecb873bd14c1de3e88161982b3cf1dffdb170ef1306e6c71590
@@ -0,0 +1,39 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ column_styling: {
11
+ cell_background_color: ->(row) { row[:newEnrollments].to_i > 20 ? "success_secondary" : "warning_secondary" }
12
+ }
13
+ },
14
+ {
15
+ accessor: "scheduledMeetings",
16
+ label: "Scheduled Meetings",
17
+ },
18
+ {
19
+ accessor: "attendanceRate",
20
+ label: "Attendance Rate",
21
+ },
22
+ {
23
+ accessor: "completedClasses",
24
+ label: "Completed Classes",
25
+ },
26
+ {
27
+ accessor: "classCompletionRate",
28
+ label: "Class Completion Rate",
29
+ },
30
+ {
31
+ accessor: "graduatedStudents",
32
+ label: "Graduated Students",
33
+ }
34
+ ] %>
35
+
36
+ <%= pb_rails("advanced_table", props: { id: "background-control", table_data: @table_data, column_definitions: column_definitions }) do %>
37
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "background-control", column_definitions: column_definitions }) %>
38
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "background-control", table_data: @table_data, column_definitions: column_definitions }) %>
39
+ <% end %>
@@ -0,0 +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.
@@ -2,7 +2,9 @@ The AdvancedTable kit accepts tree data and automatically renders expansion cont
2
2
 
3
3
  ### id
4
4
 
5
- A unique `id` is required to allow the table functionality to work properly. Without it, certain functions like the action bar will not be able to properly reference the correct table.
5
+ A unique `id` is required to allow the table functionality to work properly. Without it, certain functions like the action bar, expand/collapse caching, or selectable rows will not be able to properly reference the correct table.
6
+
7
+ You must also set `table_id` when using subcomponents like `table_header` or `table_body`.
6
8
 
7
9
  ### table_data
8
10
 
@@ -51,7 +51,7 @@
51
51
  ]
52
52
  %>
53
53
 
54
- <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "beta_sort" }) do %>
55
- <%= 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" }) %>
54
+ <%= pb_rails("advanced_table", props: { id: "sort", table_data: @table_data, column_definitions: column_definitions, id: "beta_sort" }) do %>
55
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "sort", column_definitions: column_definitions }) %>
56
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "sort", table_data: @table_data, column_definitions: column_definitions, enable_toggle_expansion: "all" }) %>
57
57
  <% end %>
@@ -34,7 +34,7 @@
34
34
  subrow_headers = ["Quarter", "Month", "Day"]
35
35
  %>
36
36
 
37
- <%= pb_rails("advanced_table", props: { table_data: @table_data, column_definitions: column_definitions, id: "test_table" }) do %>
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" }) %>
37
+ <%= pb_rails("advanced_table", props: { id: "subrow-headers", table_data: @table_data, column_definitions: column_definitions, id: "test_table" }) do %>
38
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "subrow-headers", column_definitions: column_definitions }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "subrow-headers", table_data: @table_data, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all" }) %>
40
40
  <% end %>
@@ -31,6 +31,6 @@
31
31
  ] %>
32
32
 
33
33
  <%= pb_rails("advanced_table", props: { id: "collapsible_trail", table_data: @table_data, column_definitions: column_definitions }) do %>
34
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
35
- <%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions, collapsible_trail: false }) %>
34
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "collapsible_trail", column_definitions: column_definitions }) %>
35
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "collapsible_trail", table_data: @table_data, column_definitions: column_definitions, collapsible_trail: false }) %>
36
36
  <% end %>
@@ -1,4 +1,4 @@
1
- The `columnStyling` prop is an optional item that can be used within `columnDefinitions` as shown in the code snippet below. It is an object that has 2 optional key/value pairs:
1
+ The `columnStyling` prop is an optional item that can be used within `columnDefinitions` as shown in the code snippet below. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
3
  1) `headerAlignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
4
4
 
@@ -58,6 +58,6 @@
58
58
  ] %>
59
59
 
60
60
  <%= pb_rails("advanced_table", props: { id: "column-styling-multi", table_data: @table_data, column_definitions: column_definitions }) do %>
61
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
62
- <%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions }) %>
61
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "column-styling-multi", column_definitions: column_definitions }) %>
62
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "column-styling-multi", table_data: @table_data, column_definitions: column_definitions }) %>
63
63
  <% end %>
@@ -33,6 +33,6 @@
33
33
  ] %>
34
34
 
35
35
  <%= pb_rails("advanced_table", props: { id: "column-styling", table_data: @table_data, column_definitions: column_definitions }) do %>
36
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
37
- <%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions }) %>
36
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "column-styling", column_definitions: column_definitions }) %>
37
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "column-styling", table_data: @table_data, column_definitions: column_definitions }) %>
38
38
  <% end %>
@@ -1,4 +1,4 @@
1
- The `column_styling` prop is an optional item that can be used within `column_definitions` as shown in the code snippet below. It is an object that has 2 optional key/value pairs:
1
+ The `column_styling` prop is an optional item that can be used within `column_definitions` as shown in the code snippet below. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
3
  1) `header_alignment`: This will allow you to control alignment of header content which is set to right aligned by default. you can set this to `left`, `right` or `center`.
4
4
 
@@ -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`.
@@ -0,0 +1,51 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <% row_styling = [
34
+ {
35
+ row_id: "1",
36
+ cell_padding: "md"
37
+ },
38
+ {
39
+ row_id: "3",
40
+ cell_padding: "lg"
41
+ },
42
+ {
43
+ row_id: "5",
44
+ cell_padding: "none"
45
+ },
46
+ ] %>
47
+
48
+ <%= pb_rails("advanced_table", props: { id: "padding-control-per-row", table_data: @table_data_with_id, column_definitions: column_definitions, row_styling: row_styling }) do %>
49
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "padding-control-per-row", column_definitions: column_definitions }) %>
50
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "padding-control-per-row", table_data: @table_data_with_id, column_definitions: column_definitions, row_styling: row_styling }) %>
51
+ <% end %>
@@ -0,0 +1 @@
1
+ `row_styling` can also be used to control padding on all cells in a given row via the use of the `cell_padding` key/value pair as shown here. `cell_padding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
@@ -0,0 +1,40 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ column_styling: {
11
+ cell_padding: "none",
12
+ }
13
+ },
14
+ {
15
+ accessor: "scheduledMeetings",
16
+ label: "Scheduled Meetings",
17
+ },
18
+ {
19
+ accessor: "attendanceRate",
20
+ label: "Attendance Rate",
21
+ column_styling: { cell_padding: "md" },
22
+ },
23
+ {
24
+ accessor: "completedClasses",
25
+ label: "Completed Classes",
26
+ },
27
+ {
28
+ accessor: "classCompletionRate",
29
+ label: "Class Completion Rate",
30
+ },
31
+ {
32
+ accessor: "graduatedStudents",
33
+ label: "Graduated Students",
34
+ }
35
+ ] %>
36
+
37
+ <%= pb_rails("advanced_table", props: { id: "padding-control", table_data: @table_data, column_definitions: column_definitions }) do %>
38
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "padding-control", column_definitions: column_definitions }) %>
39
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "padding-control", table_data: @table_data, column_definitions: column_definitions }) %>
40
+ <% end %>
@@ -0,0 +1 @@
1
+ `column_styling` can also be used to control padding on all cells in a given column via the use of the `cell_padding` key/value pair. `cell_padding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
@@ -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,4 +1,4 @@
1
- The `row_styling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `row_styling` gives you 3 optional controls:
1
+ The `row_styling` prop can be used in conjunction with row ids to control certain styling options on individual rows. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
3
  - `background_color` : use this to control the background color of the row
4
4
  - `font_color`: use this to control font color for each row if needed, for example if using a darker background color.
@@ -1,4 +1,4 @@
1
- The `rowStyling` prop can be used in conjunction with row ids to control certain styling options on individual rows. Currently, `rowStyling` gives you 3 optional controls:
1
+ The `rowStyling` prop can be used in conjunction with row ids to control certain styling options on individual rows. It is an object that has several optional key/value pairs, this doc example highlights the following:
2
2
 
3
3
  - `backgroundColor` : use this to control the background color of the row
4
4
  - `fontColor`: use this to control font color for each row if needed, for example if using a darker background color.
@@ -34,6 +34,6 @@
34
34
  %>
35
35
 
36
36
  <%= pb_rails("advanced_table", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, selectable_rows: true }) do %>
37
- <%= pb_rails("advanced_table/table_header", props: { id: "selectable_rows", column_definitions: column_definitions, selectable_rows: true }) %>
38
- <%= pb_rails("advanced_table/table_body", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all", selectable_rows: true }) %>
37
+ <%= pb_rails("advanced_table/table_header", props: { table_id: "selectable_rows", column_definitions: column_definitions, selectable_rows: true }) %>
38
+ <%= pb_rails("advanced_table/table_body", props: { table_id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all", selectable_rows: true }) %>
39
39
  <% end %>
@@ -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
+
@@ -21,8 +21,11 @@ examples:
21
21
  - advanced_table_selectable_rows_header_rails: Selectable Rows (No Actions Bar)
22
22
  - advanced_table_scrollbar_none: Advanced Table Scrollbar None
23
23
  - advanced_table_row_styling: Row Styling
24
+ - advanced_table_padding_control_per_row_rails: Padding Control using Row Styling
24
25
  - advanced_table_column_styling_rails: Column Styling
25
26
  - advanced_table_column_styling_column_headers_rails: Column Styling with Multiple Headers
27
+ - advanced_table_padding_control_rails: Padding Control using Column Styling
28
+ - advanced_table_background_control_rails: Background Control using Column Styling
26
29
  - advanced_table_column_border_color_rails: Column Group Border Color
27
30
 
28
31
 
@@ -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,3 +1,7 @@
1
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", loading: true, margin_right: "lg" }) %>
2
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "secondary", loading: true, margin_right: "lg" }) %>
3
- <%= pb_rails("button", props: { aria: { label: "Loading" }, text: "Button Primary", variant: "link", loading: true, margin_right: "lg" }) %>
1
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Button variants with loading" }) %>
2
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, margin_right: "lg" }) %>
3
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "secondary", loading: true, margin_right: "lg" }) %>
4
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, variant: "link", loading: true, margin_right: "lg" }) %>
5
+ <%= pb_rails("caption", props: { margin_y: "md", text: "Button sizes with loading" }) %>
6
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "sm", margin_right: "lg" }) %>
7
+ <%= pb_rails("button", props: { aria: { label: "Loading" }, loading: true, size: "lg", margin_right: "lg" }) %>
@@ -1,8 +1,13 @@
1
1
  import React from 'react'
2
2
  import Button from "../../pb_button/_button"
3
+ import Caption from "../../pb_caption/_caption"
3
4
 
4
5
  const ButtonLoading = (props) => (
5
6
  <div>
7
+ <Caption
8
+ marginY="md"
9
+ text="Button variants with loading"
10
+ />
6
11
  <Button
7
12
  aria={{ label: 'Loading' }}
8
13
  loading
@@ -31,6 +36,30 @@ const ButtonLoading = (props) => (
31
36
  variant="link"
32
37
  {...props}
33
38
  />
39
+ <br/>
40
+ <Caption
41
+ marginY="md"
42
+ text="Button sizes with loading"
43
+ />
44
+ <Button
45
+ aria={{ label: 'Loading' }}
46
+ loading
47
+ marginRight='lg'
48
+ size="sm"
49
+ tabIndex={0}
50
+ text="Small Button"
51
+ {...props}
52
+ />
53
+ {' '}
54
+ <Button
55
+ aria={{ label: 'Loading' }}
56
+ loading
57
+ marginRight='lg'
58
+ size="lg"
59
+ tabIndex={0}
60
+ text="Small Button"
61
+ {...props}
62
+ />
34
63
  </div>
35
64
  )
36
65
 
@@ -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.
@@ -23,7 +23,7 @@ const DatePickerRangePattern = (props) => {
23
23
 
24
24
  <DatePicker
25
25
  pickerId="end-date-picker"
26
- placeholder="Select a End Date"
26
+ placeholder="Select an End Date"
27
27
  syncEndWith="quickpick-for-range"
28
28
  {...props}
29
29
  />
@@ -1,2 +1,4 @@
1
1
 
2
2
  Fixed Confirmation Toast is used as an alert. Success is used when a user successfully completes an action. Error is used when there is an error and the user cannot proceed. Neutral is used to display information to a user to complete a task.
3
+
4
+ **NOTE**: z index for Fixed Confirmation Toast is set to 'max' by default which has the value of `999999`. the z Index global prop can be used to override this if you want to set it to a different value.
@@ -18,7 +18,7 @@
18
18
 
19
19
  if (submitButton) {
20
20
  let currentClass = submitButton.className;
21
- let newClass = currentClass.replace("_disabled_loading", "_enabled");
21
+ let newClass = currentClass.replace("pb_button_disabled pb_button_loading", "pb_button_enabled");
22
22
 
23
23
  let cancelClass = cancelButton ? cancelButton.className : "";
24
24
  let newCancelClass = cancelClass.replace("_disabled", "_enabled");
@@ -101,7 +101,7 @@
101
101
  <%= form.typeahead :example_typeahead_validation_react, props: { options: example_typeahead_options, pills: true, label: "Example Typeahead (React Rendered)", placeholder: "Search for a user", required: true, validation: { message: "Please select a color." } } %>
102
102
  <%= form.typeahead :example_typeahead_validation_react_2, props: { options: example_typeahead_options, pills: true, label: "Example Typeahead 2 (React Rendered)", placeholder: "Search for a user", required: true } %>
103
103
  <%= form.text_field :example_text_field_validation, props: { label: true, required: true } %>
104
- <%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field", hidden_inputs: true } %>
104
+ <%= form.phone_number_field :example_phone_number_field_validation, props: { label: "Example phone field", hidden_inputs: true, required: true } %>
105
105
  <%= form.email_field :example_email_field_validation, props: { label: true, required: true } %>
106
106
  <%= form.number_field :example_number_field_validation, props: { label: true, required: true } %>
107
107
  <%= form.search_field :example_project_number_validation, props: { label: true, required: true, validation: { pattern: "[0-9]{2}-[0-9]{5}", message: "Please enter a valid project number (example: 33-12345)." } } %>
@@ -1 +1 @@
1
- Customize your icon circle by passing one of our seven base colors to the `variant` prop: `royal` `blue` `orange` `purple` `teal` `red` `yellow` `green`
1
+ Customize your icon circle by passing one of our seven base colors to the `variant` prop: `royal` `orange` `purple` `teal` `red` `yellow` `green`