playbook_ui_docs 15.8.0.pre.rc.0 → 16.0.0.pre.alpha.fixiconsvgdataattrspropagation13513

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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.jsx +56 -0
  3. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.md +10 -0
  4. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.html.erb +64 -0
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.md +10 -0
  6. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
  7. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  8. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
  9. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  13. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
  15. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
  16. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
  17. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
  18. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.jsx +71 -0
  19. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md +1 -0
  20. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx +71 -0
  21. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.md +1 -0
  22. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
  23. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +3 -1
  24. metadata +13 -113
  25. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
  27. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  30. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
  31. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
  32. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
  33. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
  34. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  35. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
  36. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
  37. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
  38. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
  39. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
  40. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
  44. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
  45. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
  46. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
  47. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
  48. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
  49. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
  50. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
  51. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
  52. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
  53. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
  54. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
  55. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
  56. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
  57. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
  58. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
  59. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
  60. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
  61. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
  65. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
  66. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
  67. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
  68. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
  69. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
  70. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
  71. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
  72. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
  73. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
  74. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
  75. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
  76. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
  77. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
  78. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
  79. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
  80. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
  81. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
  82. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
  83. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  84. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
  85. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
  86. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  87. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
  88. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
  89. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
  90. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  91. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
  92. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
  93. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
  94. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  95. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
  96. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
  97. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
  98. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
  99. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
  100. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
  101. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
  102. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
  103. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
  104. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
  105. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
  106. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
  107. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
  108. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
  109. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
  110. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
  111. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
  112. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
  113. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
  114. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  115. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
  116. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
  117. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
  118. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
  119. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
  120. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
  121. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  122. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
  123. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
  124. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
  125. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
  126. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  127. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
  128. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
  129. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
  130. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
  131. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
  132. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
  133. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
  134. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
  135. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1da1d6d1ef24651b4b2d68d7d6fb4d24418a93237ede041deab2386aad9590e
4
- data.tar.gz: 8bc4c34d0ed65dc094b8cf3e187a99af9a0f947df3eafd56973a9b2781a8486a
3
+ metadata.gz: 8bbf557f52e4d4578fdbf8302eaacd37df4e14e819bf2a704ceb1adba8c5b580
4
+ data.tar.gz: 37ac9fd11f5e28aef15f7d37605f0a88fc3db7742a4edde7ddb66f90e7b350c2
5
5
  SHA512:
6
- metadata.gz: b518dbb81c1684003780e9e096dccbc0bc428511d31e0a8a74dc2847a33ab84cc8283a84ae76731bfe34a622e7da2e03fe081fa421c966320734399a4ea9d902
7
- data.tar.gz: 685a9397116fbd96752f7294021be526cbcea9c12cb174f5a9579797bd28e50a08b0ce90b4947550318b2d64d153867274ad367adcdbb9154666d02fa3248d8b
6
+ metadata.gz: 9281f9b6106bbc8d58ef97c060fc96c453f816bae1143647b327c8e81ad534729af9f62eb12110ec3acc13c44b0a2188644a5d28530fe19d4b14355dfec83f9d
7
+ data.tar.gz: 8435b416dc226929bbd1febe7dce3f312b701e79ffc9f3aa7caea9e00745d6146e3296742cb4c9bb93fd1e56c917802185347cbcc85613cdc95c40846f800651
@@ -0,0 +1,56 @@
1
+ import React from "react"
2
+ import Dropdown from "../_dropdown"
3
+
4
+ const DropdownQuickpickCustom = (props) => (
5
+ <div>
6
+ <Dropdown
7
+ customQuickPickDates={{
8
+ dates: [
9
+ // Allow Playbook to handle the logic...
10
+ {
11
+ label: "Last 15 months",
12
+ value: {
13
+ timePeriod: "months",
14
+ amount: 15,
15
+ },
16
+ },
17
+ // Or, be explicit with an exact date range for more control...
18
+ {
19
+ label: "First Week of June 2022",
20
+ value: ["06/01/2022", "06/07/2022"],
21
+ },
22
+ ],
23
+ }}
24
+ label="Date Range"
25
+ marginBottom="sm"
26
+ onSelect={(selectedItem) => console.log(selectedItem)}
27
+ variant="quickpick"
28
+ {...props}
29
+ />
30
+ <Dropdown
31
+ customQuickPickDates={{
32
+ dates: [
33
+ {
34
+ label: "Last 15 months",
35
+ value: {
36
+ timePeriod: "months",
37
+ amount: 15,
38
+ },
39
+ },
40
+ {
41
+ label: "First Week of June 2022",
42
+ value: ["06/01/2022", "06/07/2022"],
43
+ },
44
+ ],
45
+ override: false,
46
+ }}
47
+ label="Date Range - Append to Defaults"
48
+ onSelect={(selectedItem) => console.log(selectedItem)}
49
+ variant="quickpick"
50
+ {...props}
51
+ />
52
+ </div>
53
+ )
54
+
55
+ export default DropdownQuickpickCustom
56
+
@@ -0,0 +1,10 @@
1
+ The `customQuickPickDates` prop allows for defining custom quick pick date options for the dropdown. The prop accepts an object with two properties: `dates` and `override`.
2
+
3
+ **The `dates` property** accepts an array of objects. Each object has `label` and `value` properties. The `label` is what will be displayed in the dropdown menu. The `value` property defines the date range that will be selected, and can be:
4
+ - An array of two date strings representing a specific range (e.g., `["06/01/2022", "06/07/2022"]`)
5
+ - An object with `timePeriod` and `amount` properties for dynamic date calculations:
6
+ - The `timePeriod` property accepts `"days"`, `"weeks"`, `"months"`, `"quarters"`, or `"years"`, representing past time periods calculated from today.
7
+ - The `amount` property accepts any number.
8
+
9
+ **The `override` property** is a boolean that controls whether custom dates replace or append to the default quick pick options. Default is `true` (replaces defaults). Set to `false` to append your custom dates to the default quick pick options.
10
+
@@ -0,0 +1,64 @@
1
+ <%= pb_rails("dropdown", props: {
2
+ custom_quick_pick_dates: {
3
+ dates: [
4
+ # Allow Playbook to handle the logic...
5
+ {
6
+ label: "Last 15 months",
7
+ value: {
8
+ time_period: "months",
9
+ amount: 15
10
+ }
11
+ },
12
+ # Or, be explicit with an exact date range for more control...
13
+ {
14
+ label: "First Week of June 2022",
15
+ value: ["06/01/2022", "06/07/2022"]
16
+ }
17
+ ]
18
+ },
19
+ id: "date-range-quickpick-custom",
20
+ label: "Date Range",
21
+ margin_bottom: "sm",
22
+ variant: "quickpick"
23
+ }) %>
24
+
25
+ <%= pb_rails("dropdown", props: {
26
+ custom_quick_pick_dates: {
27
+ override: false,
28
+ dates: [
29
+ {
30
+ label: "Last 15 months",
31
+ value: {
32
+ time_period: "months",
33
+ amount: 15
34
+ }
35
+ },
36
+ {
37
+ label: "First Week of June 2022",
38
+ value: ["06/01/2022", "06/07/2022"]
39
+ }
40
+ ]
41
+ },
42
+ id: "date-range-quickpick-custom-append-to-defaults",
43
+ label: "Date Range - Append to Defaults",
44
+ variant: "quickpick"
45
+ }) %>
46
+
47
+ <script>
48
+ const dropdown1 = document.getElementById("date-range-quickpick-custom");
49
+ if (dropdown1) {
50
+ dropdown1.addEventListener("pb:dropdown:selected", (e) => {
51
+ const option = e.detail;
52
+ console.log("Selected option:", option);
53
+ });
54
+ }
55
+
56
+ const dropdown2 = document.getElementById("date-range-quickpick-custom-append-to-defaults");
57
+ if (dropdown2) {
58
+ dropdown2.addEventListener("pb:dropdown:selected", (e) => {
59
+ const option = e.detail;
60
+ console.log("Selected option:", option);
61
+ });
62
+ }
63
+ </script>
64
+
@@ -0,0 +1,10 @@
1
+ The `custom_quick_pick_dates` prop allows for defining custom quick pick date options for the dropdown. The prop accepts an object with two properties: `dates` and `override`.
2
+
3
+ **The `dates` property** accepts an array of objects. Each object has `label` and `value` properties. The `label` is what will be displayed in the dropdown menu. The `value` property defines the date range that will be selected, and can be:
4
+ - An array of two date strings representing a specific range (e.g., `["06/01/2022", "06/07/2022"]`)
5
+ - An object with `time_period` and `amount` properties for dynamic date calculations:
6
+ - The `time_period` property accepts `"days"`, `"weeks"`, `"months"`, `"quarters"`, or `"years"`, representing past time periods calculated from today.
7
+ - The `amount` property accepts any number.
8
+
9
+ **The `override` property** is a boolean that controls whether custom dates replace or append to the default quick pick options. Default is `true` (replaces defaults). Set to `false` to append your custom dates to the default quick pick options.
10
+
@@ -25,6 +25,7 @@ examples:
25
25
  - dropdown_quickpick_rails: Quick Pick Variant
26
26
  - dropdown_quickpick_range_end_rails: Quick Pick Variant (Range Ends Today)
27
27
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
28
+ - dropdown_quickpick_custom_rails: Quick Pick Variant (Custom Quick Pick Dates)
28
29
  - dropdown_quickpick_with_date_pickers_rails: Quick Pick with Date Pickers
29
30
  - dropdown_quickpick_with_date_pickers_default_rails: Quick Pick with Date Pickers (Default Value)
30
31
 
@@ -57,6 +58,7 @@ examples:
57
58
  - dropdown_quickpick: Quick Pick Variant
58
59
  - dropdown_quickpick_range_end: Quick Pick Variant (Range Ends Today)
59
60
  - dropdown_quickpick_default_dates: Quick Pick Variant (Default Dates)
61
+ - dropdown_quickpick_custom: Quick Pick Variant (Custom Quick Pick Dates)
60
62
  - dropdown_quickpick_with_date_pickers: Quick Pick Variant with Date Pickers
61
63
 
62
64
 
@@ -26,4 +26,5 @@ export {default as DropdownWithCustomActiveStyleOptions} from './_dropdown_with_
26
26
  export { default as DropdownQuickpick } from './_dropdown_quickpick.jsx'
27
27
  export { default as DropdownQuickpickRangeEnd } from './_dropdown_quickpick_range_end.jsx'
28
28
  export { default as DropdownQuickpickDefaultDates } from './_dropdown_quickpick_default_dates.jsx'
29
- export { default as DropdownQuickpickWithDatePickers } from './_dropdown_quickpick_with_date_pickers.jsx'
29
+ export { default as DropdownQuickpickWithDatePickers } from './_dropdown_quickpick_with_date_pickers.jsx'
30
+ export { default as DropdownQuickpickCustom } from './_dropdown_quickpick_custom.jsx'
@@ -1 +1 @@
1
- individual items can also be disabled by including the `disabled:true` within the object on the treeData for the `returnAllSelected`/`return_all_selected` variant. As noted above, this variant will return data on all checked nodes from the dropdown, irrespective of whether it is a parent or child node.
1
+ Individual items can also be disabled by including the `disabled:true` within the object on the treeData for the `returnAllSelected`/`return_all_selected` variant. As noted above, this variant will return data on all checked nodes from the dropdown, irrespective of whether it is a parent or child node.
@@ -0,0 +1,135 @@
1
+ <% treeData = [
2
+ {
3
+ label: "HQ",
4
+ value: "hQ",
5
+ id: "hq2",
6
+ },
7
+ {
8
+ label: "Philadelphia",
9
+ value: "philadelphia",
10
+ id: "phl2",
11
+ disabled: true,
12
+ children: [
13
+ {
14
+ label: "Marketing & Sales PHL",
15
+ value: "marketingAndSalesPhl",
16
+ id: "marketingPHL2",
17
+ },
18
+ {
19
+ label: "Installation Office PHL",
20
+ value: "installationOfficePhl",
21
+ id: "installationPHL2",
22
+ },
23
+ {
24
+ label: "Warehouse PHL",
25
+ value: "warehousePhl",
26
+ id: "warehousePHL2",
27
+ },
28
+ ]
29
+ },
30
+ {
31
+ label: "New Jersey",
32
+ value: "newJersey",
33
+ id: "nj2",
34
+ children: [
35
+ {
36
+ label: "New Jersey",
37
+ value: "newJersey",
38
+ id: "nj12",
39
+ children: [
40
+ {
41
+ label: "Marketing & Sales NJ",
42
+ value: "marketingAndSalesNj",
43
+ id: "marketingNJ2",
44
+ disabled: true,
45
+ },
46
+ {
47
+ label: "Installation Office NJ",
48
+ value: "installationOfficeNj",
49
+ id: "installationNJ2",
50
+ },
51
+ {
52
+ label: "Warehouse NJ",
53
+ value: "warehouseNj",
54
+ id: "warehouseNJ2",
55
+ },
56
+ ],
57
+ },
58
+ {
59
+ label: "Princeton",
60
+ value: "princeton",
61
+ id: "princeton2",
62
+ children: [
63
+ {
64
+ label: "Marketing & Sales Princeton",
65
+ value: "marketingAndSalesPrinceton",
66
+ id: "marketingPR2",
67
+ },
68
+ {
69
+ label: "Installation Office Princeton",
70
+ value: "installationOfficePrinceton",
71
+ id: "installationPR2",
72
+ disabled: true,
73
+ },
74
+ {
75
+ label: "Warehouse Princeton",
76
+ value: "warehousePrinceton",
77
+ id: "warehousePR2",
78
+ },
79
+ ]
80
+ },
81
+ ]
82
+ },
83
+ {
84
+ label: "Maryland",
85
+ value: "maryland",
86
+ id: "MD2",
87
+ children: [
88
+ {
89
+ label: "Marketing & Sales MD",
90
+ value: "marketingAndSalesMd",
91
+ id: "marketingMD2",
92
+ },
93
+ {
94
+ label: "Installation Office MD",
95
+ value: "installationOfficeMd",
96
+ id: "installationMD2",
97
+ },
98
+ {
99
+ label: "Warehouse MD",
100
+ value: "warehouseMd",
101
+ id: "warehouseMD2",
102
+ },
103
+ ]
104
+ },
105
+ {
106
+ label: "Connecticut",
107
+ value: "connecticut",
108
+ id: "CT2",
109
+ children: [
110
+ {
111
+ label: "Marketing & Sales CT",
112
+ value: "marketingAndSalesCt",
113
+ id: "marketingCT2",
114
+ },
115
+ {
116
+ label: "Installation Office CT",
117
+ value: "installationOfficeCt",
118
+ id: "installationCT2",
119
+ },
120
+ {
121
+ label: "Warehouse CT",
122
+ value: "warehouseCt",
123
+ id: "warehouseCT2",
124
+ },
125
+ ]
126
+ },
127
+ ] %>
128
+
129
+ <%= pb_rails("multi_level_select", props: {
130
+ id: "multi-level-select-single-disabled-rails",
131
+ name: "single_disabled",
132
+ tree_data: treeData,
133
+ input_name: "Power",
134
+ variant: "single"
135
+ }) %>
@@ -0,0 +1,147 @@
1
+ import React from "react";
2
+ import MultiLevelSelect from "../_multi_level_select";
3
+
4
+ const treeData = [
5
+ {
6
+ label: "HQ",
7
+ value: "hQ",
8
+ id: "hq2",
9
+ },
10
+ {
11
+ label: "Philadelphia",
12
+ value: "philadelphia",
13
+ id: "phl2",
14
+ disabled: true,
15
+ children: [
16
+ {
17
+ label: "Marketing & Sales PHL",
18
+ value: "marketingAndSalesPhl",
19
+ id: "marketingPHL2",
20
+ },
21
+ {
22
+ label: "Installation Office PHL",
23
+ value: "installationOfficePhl",
24
+ id: "installationPHL2",
25
+ },
26
+ {
27
+ label: "Warehouse PHL",
28
+ value: "warehousePhl",
29
+ id: "warehousePHL2",
30
+ },
31
+ ]
32
+ },
33
+ {
34
+ label: "New Jersey",
35
+ value: "newJersey",
36
+ id: "nj2",
37
+ children: [
38
+ {
39
+ label: "New Jersey",
40
+ value: "newJersey",
41
+ id: "nj12",
42
+ children: [
43
+ {
44
+ label: "Marketing & Sales NJ",
45
+ value: "marketingAndSalesNj",
46
+ id: "marketingNJ2",
47
+ disabled: true,
48
+ },
49
+ {
50
+ label: "Installation Office NJ",
51
+ value: "installationOfficeNj",
52
+ id: "installationNJ2",
53
+ },
54
+ {
55
+ label: "Warehouse NJ",
56
+ value: "warehouseNj",
57
+ id: "warehouseNJ2",
58
+ },
59
+ ],
60
+ },
61
+ {
62
+ label: "Princeton",
63
+ value: "princeton",
64
+ id: "princeton2",
65
+ children: [
66
+ {
67
+ label: "Marketing & Sales Princeton",
68
+ value: "marketingAndSalesPrinceton",
69
+ id: "marketingPR2",
70
+ },
71
+ {
72
+ label: "Installation Office Princeton",
73
+ value: "installationOfficePrinceton",
74
+ id: "installationPR2",
75
+ disabled: true,
76
+ },
77
+ {
78
+ label: "Warehouse Princeton",
79
+ value: "warehousePrinceton",
80
+ id: "warehousePR2",
81
+ },
82
+ ]
83
+ },
84
+ ]
85
+ },
86
+ {
87
+ label: "Maryland",
88
+ value: "maryland",
89
+ id: "MD2",
90
+ children: [
91
+ {
92
+ label: "Marketing & Sales MD",
93
+ value: "marketingAndSalesMd",
94
+ id: "marketingMD2",
95
+ },
96
+ {
97
+ label: "Installation Office MD",
98
+ value: "installationOfficeMd",
99
+ id: "installationMD2",
100
+ },
101
+ {
102
+ label: "Warehouse MD",
103
+ value: "warehouseMd",
104
+ id: "warehouseMD2",
105
+ },
106
+ ]
107
+ },
108
+ {
109
+ label: "Connecticut",
110
+ value: "connecticut",
111
+ id: "CT2",
112
+ children: [
113
+ {
114
+ label: "Marketing & Sales CT",
115
+ value: "marketingAndSalesCt",
116
+ id: "marketingCT2",
117
+ },
118
+ {
119
+ label: "Installation Office CT",
120
+ value: "installationOfficeCt",
121
+ id: "installationCT2",
122
+ },
123
+ {
124
+ label: "Warehouse CT",
125
+ value: "warehouseCt",
126
+ id: "warehouseCT2",
127
+ },
128
+ ]
129
+ },
130
+ ];
131
+
132
+ const MultiLevelSelectSingleDisabled = (props) => {
133
+ return (
134
+ <div>
135
+ <MultiLevelSelect
136
+ id="multiselect-single-disabled"
137
+ inputName="Power"
138
+ onSelect={(selectedNode) => console.log("Selected Node", selectedNode)}
139
+ treeData={treeData}
140
+ variant="single"
141
+ {...props}
142
+ />
143
+ </div>
144
+ )
145
+ };
146
+
147
+ export default MultiLevelSelectSingleDisabled;
@@ -0,0 +1 @@
1
+ Individual items can be disabled by including `disabled: true` within the object on the treeData for the `single` variant. Disabled options are visibly disabled in the dropdown UI and cannot be selected via mouse click or keyboard navigation. When a parent node is disabled, all of its children are automatically disabled as well.
@@ -15,6 +15,7 @@ examples:
15
15
  - multi_level_select_disabled_options: Disabled Options (Return All Selected)
16
16
  - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
17
17
  - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
18
+ - multi_level_select_single_disabled: Disabled Options (Single Select)
18
19
 
19
20
  react:
20
21
  - multi_level_select_default: Default
@@ -33,3 +34,4 @@ examples:
33
34
  - multi_level_select_disabled_options: Disabled Options (Return All Selected)
34
35
  - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
35
36
  - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
37
+ - multi_level_select_single_disabled: Disabled Options (Single Select)
@@ -14,3 +14,4 @@ export { default as MultiLevelSelectDisabledOptionsParent } from './_multi_level
14
14
  export { default as MultiLevelSelectDisabledOptionsParentDefault } from './_multi_level_select_disabled_options_parent_default.jsx'
15
15
  export { default as MultiLevelSelectDisabledOptionsDefault } from './_multi_level_select_disabled_options_default.jsx'
16
16
  export { default as MultiLevelSelectLabel } from './_multi_level_select_label.jsx'
17
+ export { default as MultiLevelSelectSingleDisabled } from './_multi_level_select_single_disabled.jsx'
@@ -2,4 +2,9 @@
2
2
 
3
3
  This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
4
4
 
5
- See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
5
+ See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
6
+
7
+ **NOTE**: All chart kits are available through a separate entrypoint to keep Highcharts optional. Import them using:
8
+ ```javascript
9
+ import { PbBarGraph } from 'playbook-ui/charts'
10
+ ```
@@ -2,4 +2,9 @@
2
2
 
3
3
  This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
4
4
 
5
- See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
5
+ See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
6
+
7
+ **NOTE**: All chart kits are available through a separate entrypoint to keep Highcharts optional. Import them using:
8
+ ```javascript
9
+ import { PbCircleChart } from 'playbook-ui/charts'
10
+ ```
@@ -2,4 +2,9 @@
2
2
 
3
3
  This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
4
4
 
5
- See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
5
+ See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
6
+
7
+ **NOTE**: All chart kits are available through a separate entrypoint to keep Highcharts optional. Import them using:
8
+ ```javascript
9
+ import { PbGaugeChart } from 'playbook-ui/charts'
10
+ ```
@@ -2,4 +2,9 @@
2
2
 
3
3
  This kit is a wrapper around the Highcharts library. It applies styling and default settings but does NOT ship Highcharts. Once 'highcharts' and 'highcharts-react-official are installed into your repo, any prop or functionality provided by Highcharts can be used with this kit without requiring specific props from Playbook. The doc examples below showcase a few common usecases but are not a comprehensive list of all the functionalities possible.
4
4
 
5
- See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
5
+ See the [highcharts API docs](https://api.highcharts.com/highcharts/) for a comprehensive look at what is possible.
6
+
7
+ **NOTE**: All chart kits are available through a separate entrypoint to keep Highcharts optional. Import them using:
8
+ ```javascript
9
+ import { PbLineGraph } from 'playbook-ui/charts'
10
+ ```
@@ -0,0 +1,71 @@
1
+ import React from 'react'
2
+ import RichTextEditor from '../_rich_text_editor'
3
+ import { useEditor, EditorContent } from "@tiptap/react"
4
+ import StarterKit from "@tiptap/starter-kit"
5
+ import Link from '@tiptap/extension-link'
6
+ import { Caption } from "playbook-ui"
7
+
8
+
9
+ const RichTextEditorAdvancedHeight = (props) => {
10
+
11
+ const editor = useEditor({
12
+ extensions: [
13
+ StarterKit,
14
+ Link
15
+ ],
16
+ content: "Add your text here. You can format your text, add links, quotes, and bullets."
17
+ })
18
+
19
+ const editor2 = useEditor({
20
+ extensions: [
21
+ StarterKit,
22
+ Link
23
+ ],
24
+ content: "Add your text here. You can format your text, add links, quotes, and bullets."
25
+ })
26
+
27
+ const editor3 = useEditor({
28
+ extensions: [
29
+ StarterKit,
30
+ Link
31
+ ],
32
+ content: "Add your text here. You can format your text, add links, quotes, and bullets."
33
+ })
34
+
35
+ return (
36
+ <div>
37
+ <Caption>sm</Caption>
38
+ <RichTextEditor
39
+ advancedEditor={editor}
40
+ inputHeight="sm"
41
+ {...props}
42
+ >
43
+ <EditorContent editor={editor} />
44
+ </RichTextEditor>
45
+
46
+ <br />
47
+
48
+ <Caption>md</Caption>
49
+ <RichTextEditor
50
+ advancedEditor={editor2}
51
+ inputHeight="md"
52
+ {...props}
53
+ >
54
+ <EditorContent editor={editor2} />
55
+ </RichTextEditor>
56
+
57
+ <br />
58
+
59
+ <Caption>lg</Caption>
60
+ <RichTextEditor
61
+ advancedEditor={editor3}
62
+ inputHeight="lg"
63
+ {...props}
64
+ >
65
+ <EditorContent editor={editor3} />
66
+ </RichTextEditor>
67
+ </div>
68
+ )
69
+ }
70
+
71
+ export default RichTextEditorAdvancedHeight
@@ -0,0 +1 @@
1
+ Use the `inputHeight` prop to keep the text area a specific height. If the text exceeds the text area, it will automatically add a scrollbar to maintain the fixed height.