playbook_ui 13.28.0.pre.alpha.PBNTR297gradientoverlay3029 → 13.28.0.pre.alpha.PLAY888Cardkithighlightoverflowtooltiperror2937

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +3 -3
  3. data/app/pb_kits/playbook/index.js +0 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +2 -2
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +1 -1
  8. data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +4 -14
  9. data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +2 -10
  10. data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +0 -2
  12. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +1 -4
  13. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -16
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom_rails.html.erb → _bar_graph_custom.html.erb} +3 -3
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +1 -2
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
  17. data/app/pb_kits/playbook/pb_card/_card.scss +1 -1
  18. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -2
  19. data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +2 -1
  20. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +3 -9
  21. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +1 -22
  22. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +8 -14
  23. data/app/pb_kits/playbook/pb_collapsible/collapsible.test.js +0 -24
  24. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -7
  25. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -9
  26. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -10
  27. data/app/pb_kits/playbook/pb_form_group/_form_group.scss +2 -2
  28. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -4
  29. data/app/pb_kits/playbook/pb_gauge/gauge.rb +1 -6
  30. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +2 -8
  31. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +1 -22
  32. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  33. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +0 -1
  34. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +32 -30
  35. data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +2 -0
  36. data/app/pb_kits/playbook/pb_table/_table.tsx +0 -5
  37. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +32 -33
  38. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
  39. data/app/pb_kits/playbook/pb_table/docs/{_table_outer_padding.html.erb → _table_alignment_row.html.erb} +7 -7
  40. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
  41. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
  42. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +63 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +50 -51
  44. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
  45. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +52 -0
  46. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +38 -37
  47. data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
  48. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  49. data/app/pb_kits/playbook/pb_table/styles/_all.scss +0 -1
  50. data/app/pb_kits/playbook/pb_table/table.rb +1 -14
  51. data/app/pb_kits/playbook/pb_table/table.test.js +1 -5
  52. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +9 -12
  53. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +1 -6
  54. data/app/pb_kits/playbook/playbook-doc.js +0 -4
  55. data/app/pb_kits/playbook/utilities/globalProps.ts +1 -12
  56. data/dist/menu.yml +2 -7
  57. data/dist/playbook-rails.js +6 -6
  58. data/lib/playbook/classnames.rb +0 -1
  59. data/lib/playbook/forms/builder.rb +0 -1
  60. data/lib/playbook/kit_base.rb +0 -2
  61. data/lib/playbook/version.rb +1 -1
  62. metadata +7 -51
  63. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +0 -40
  64. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +0 -3
  65. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.html.erb +0 -34
  66. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +0 -31
  67. data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
  68. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  69. data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
  70. data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +0 -53
  71. data/app/pb_kits/playbook/pb_draggable/_draggable.scss +0 -10
  72. data/app/pb_kits/playbook/pb_draggable/_draggable.tsx +0 -53
  73. data/app/pb_kits/playbook/pb_draggable/context/index.tsx +0 -92
  74. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +0 -53
  75. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +0 -159
  76. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +0 -121
  77. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -9
  78. data/app/pb_kits/playbook/pb_draggable/docs/index.js +0 -3
  79. data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +0 -65
  80. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableContainer.tsx +0 -54
  81. data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +0 -57
  82. data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
  83. data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
  84. data/app/pb_kits/playbook/pb_overlay/_overlay.scss +0 -12
  85. data/app/pb_kits/playbook/pb_overlay/_overlay.tsx +0 -93
  86. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +0 -40
  87. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +0 -7
  88. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +0 -36
  89. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +0 -5
  90. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
  91. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -2
  92. data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +0 -66
  93. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +0 -2
  94. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +0 -34
  95. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +0 -2
  96. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +0 -54
  97. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +0 -2
  98. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +0 -1
  99. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +0 -53
  100. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +0 -1
  101. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +0 -76
  102. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +0 -1
  103. data/app/pb_kits/playbook/pb_table/styles/_outer_padding.scss +0 -21
  104. data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +0 -61
  105. data/app/pb_kits/playbook/tokens/_vertical_align.scss +0 -18
  106. data/app/pb_kits/playbook/utilities/_vertical_align.scss +0 -16
  107. data/lib/playbook/forms/builder/dropdown_field.rb +0 -14
  108. data/lib/playbook/vertical_align.rb +0 -37
  109. /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column_rails.html.erb → _table_alignment_column.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ebcd8e418a573194d60fc898d411fad574f050ac38957d6d73674a503ed522d
4
- data.tar.gz: 9948ad7024a45406a248a22e02c40226f0b080ad09f85ca7f4169226b8368297
3
+ metadata.gz: ac256e747a7a85969b72e1ba3c785d4885eaecd054c3e8e4698fae0e595a59e5
4
+ data.tar.gz: 85179c09b79f2076dbe64a59838a75e7e3f1bf56c9501dec55042e347b8f8882
5
5
  SHA512:
6
- metadata.gz: 42c48a5990278c4c6b384d379c8b26b102beba5de1a420eb6f3678672cf0ff3de85eff4429d52ad85b8cfefd291faa325f01f6f07786680c04331b361e935fa2
7
- data.tar.gz: 71c1b18be5c1883201ab005f05babbcdd92c1215c0a9839bffd1c633bbcbdccee7c6d46a1d2f712858a5ca53098fdd93d099d79bf2cf76f78bbe19019db6d30a
6
+ metadata.gz: 5a36ff1b732e310cf3e563b3faf6d07e61465bec2e6a5bac3f99ec708b6b66d730b92cbc32cd1b1cf13fa84c4047562ef9a9ded14d3ed5a148f6e8f2095ac1b3
7
+ data.tar.gz: def70dafe2cda9be8704bc3250457a45ccaf9a214d667ce05f1c078aae82f823339c75b861de33a392c70d9afcaa2cd57d574b7b2f5051713805f4dcd68cbdbb
@@ -1,3 +1,6 @@
1
+
2
+
3
+
1
4
  @import 'pb_advanced_table/advanced_table';
2
5
  @import 'pb_avatar/avatar';
3
6
  @import 'pb_avatar_action_button/avatar_action_button';
@@ -28,7 +31,6 @@
28
31
  @import 'pb_detail/detail';
29
32
  @import 'pb_dialog/dialog';
30
33
  @import 'pb_distribution_bar/distribution_bar';
31
- @import 'pb_draggable/draggable';
32
34
  @import 'pb_dropdown/dropdown';
33
35
  @import 'pb_file_upload/file_upload';
34
36
  @import 'pb_filter/filter';
@@ -62,7 +64,6 @@
62
64
  @import 'pb_multiple_users_stacked/multiple_users_stacked';
63
65
  @import 'pb_nav/nav';
64
66
  @import 'pb_online_status/online_status';
65
- @import 'pb_overlay/overlay';
66
67
  @import 'pb_pagination/pagination';
67
68
  @import 'pb_passphrase/passphrase';
68
69
  @import 'pb_person/person';
@@ -120,4 +121,3 @@
120
121
  @import './utilities/text_align';
121
122
  @import './utilities/overflow';
122
123
  @import './utilities/truncate';
123
- @import './utilities/vertical_align';
@@ -35,8 +35,6 @@ export { default as DateYearStacked } from './pb_date_year_stacked/_date_year_st
35
35
  export { default as Detail} from './pb_detail/_detail'
36
36
  export { default as Dialog } from './pb_dialog/_dialog'
37
37
  export { default as DistributionBar } from './pb_distribution_bar/_distribution_bar'
38
- export { default as Draggable} from './pb_draggable/_draggable'
39
- export { DraggableProvider} from './pb_draggable/context'
40
38
  export { default as Dropdown} from './pb_dropdown/_dropdown'
41
39
  export { default as FileUpload } from './pb_file_upload/_file_upload'
42
40
  export { default as Filter } from './pb_filter/_filter'
@@ -72,7 +70,6 @@ export { default as MultipleUsersStacked } from './pb_multiple_users_stacked/_mu
72
70
  export { default as Nav } from './pb_nav/_nav'
73
71
  export { default as NavItem } from './pb_nav/_item'
74
72
  export { default as OnlineStatus } from './pb_online_status/_online_status'
75
- export { default as Overlay} from './pb_overlay/_overlay'
76
73
  export { default as Passphrase } from './pb_passphrase/_passphrase'
77
74
  export { default as PbReactPopover } from './pb_popover/_popover'
78
75
  export { default as Person } from './pb_person/_person'
@@ -3,8 +3,8 @@
3
3
  <% if content.present? %>
4
4
  <% content.presence %>
5
5
  <% else %>
6
- <%= pb_rails("advanced_table/table_header", props: { column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion }) %>
7
- <%= pb_rails("advanced_table/table_body", props: { id: object.id, table_data: object.table_data, column_definitions: object.column_definitions }) %>
6
+ <%= pb_rails("advanced_table/table_header", props: {column_definitions: object.column_definitions, enable_toggle_expansion: object.enable_toggle_expansion }) %>
7
+ <%= pb_rails("advanced_table/table_body", props: {table_data: object.table_data, column_definitions: object.column_definitions}) %>
8
8
  <% end %>
9
9
  <% end %>
10
10
  <% end %>
@@ -1,3 +1,3 @@
1
1
  `subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
2
 
3
- `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
3
+ `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all', 'header" or "none". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'header' by default.
@@ -1,7 +1,6 @@
1
1
  examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
- - advanced_table_beta_subrow_headers: SubRow Headers
5
4
  react:
6
5
  - advanced_table_default: Default (Required Props)
7
6
  - advanced_table_loading: Loading State
@@ -13,3 +12,4 @@ examples:
13
12
  - advanced_table_table_options: Table Options
14
13
  - advanced_table_table_props: Table Props
15
14
  - advanced_table_inline_row_loading: inline Row Loading
15
+
@@ -1,5 +1,5 @@
1
1
  <%= pb_content_tag do %>
2
2
  <% object.table_data.each do |row| %>
3
- <%= render_row_and_children(row, object.column_definitions, 0, false) %>
3
+ <%= render_row_and_children(row, object.column_definitions) %>
4
4
  <% end %>
5
5
  <% end %>
@@ -3,30 +3,20 @@
3
3
  module Playbook
4
4
  module PbAdvancedTable
5
5
  class TableBody < Playbook::KitBase
6
- prop :id, type: Playbook::Props::String,
7
- default: ""
8
6
  prop :table_data, type: Playbook::Props::Array,
9
7
  default: []
10
8
  prop :column_definitions, type: Playbook::Props::Array,
11
9
  default: []
12
- prop :enable_toggle_expansion, type: Playbook::Props::Enum,
13
- values: %w[all header none],
14
- default: "header"
15
- prop :subrow_headers, type: Playbook::Props::Array,
16
- default: []
17
10
 
18
- def render_row_and_children(row, column_definitions, current_depth, first_parent_child)
11
+ def render_row_and_children(row, column_definitions, current_depth = 0)
19
12
  output = ActiveSupport::SafeBuffer.new
20
- is_first_child_of_subrow = current_depth.positive? && first_parent_child && subrow_headers[current_depth - 1].present?
21
13
 
22
- output << pb_rails("advanced_table/table_subrow_header", props: { row: row, column_definitions: column_definitions, depth: current_depth, subrow_header: subrow_headers[current_depth - 1] }) if is_first_child_of_subrow && enable_toggle_expansion == "all"
23
-
24
- output << pb_rails("advanced_table/table_row", props: { id: id, row: row, column_definitions: column_definitions, depth: current_depth })
14
+ output << pb_rails("advanced_table/table_row", props: { row: row, column_definitions: column_definitions, depth: current_depth })
25
15
 
26
16
  if row[:children].present?
27
- output << content_tag(:div, class: "toggle-content", data: { advanced_table_content: row.object_id.to_s + id }) do
17
+ output << content_tag(:div, class: "toggle-content", data: { advanced_table_content: row.object_id }) do
28
18
  row[:children].map do |child_row|
29
- render_row_and_children(child_row, column_definitions, current_depth + 1, row.children.first == child_row)
19
+ render_row_and_children(child_row, column_definitions, current_depth + 1)
30
20
  end.join.html_safe
31
21
  end
32
22
  end
@@ -4,7 +4,7 @@
4
4
  <%= pb_rails("table/table_header", props: { tag:"div", id:item[:accessor], classname:object.th_classname}) do %>
5
5
  <%= pb_rails("flex", props:{ align: "center", justify: index.zero? ? "start" : "end", text_align:"end" }) do %>
6
6
  <% if index.zero? && (object.enable_toggle_expansion == "header" || object.enable_toggle_expansion == "all") %>
7
- <button class="gray-icon toggle-all-icon" onclick="expandAllRows(this)">
7
+ <button class="gray-icon toggle-all-icon">
8
8
  <%= pb_rails("icon", props: { icon: "arrows-from-line", cursor: "pointer", fixed_width: true, padding_right:"xs" }) %>
9
9
  </button>
10
10
  <% end %>
@@ -13,12 +13,4 @@
13
13
  <% end %>
14
14
  <% end %>
15
15
  <% end %>
16
- <% end %>
17
-
18
- <script type="text/javascript">
19
- var expandAllRows = (element) => {
20
- element.closest('.pb_table').querySelectorAll('.pb_advanced_table_body > .pb_table_tr [data-advanced-table]').forEach((button) => {
21
- button.dispatchEvent(new Event('click'));
22
- });
23
- };
24
- </script>
16
+ <% end %>
@@ -5,7 +5,7 @@
5
5
  <div style="padding-left: <%= depth * 1.25 %>em">
6
6
  <%= pb_rails("flex", props:{align: "center", column_gap: "xs"}) do %>
7
7
  <% if index.zero? && object.row[:children].present? %>
8
- <button id="<%= object.row.object_id.to_s + object.id %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
8
+ <button id="<%= object.row.object_id %>" class="gray-icon expand-toggle-icon" data-advanced-table="true" >
9
9
  <%= pb_rails("icon", props: { id: "advanced-table_open_icon", icon: "circle-play", cursor: "pointer" }) %>
10
10
  <%= pb_rails("icon", props: { id: "advanced-table_close_icon", display: "none", icon: "circle-play", cursor: "pointer", rotation: 90 }) %>
11
11
  </button>
@@ -3,8 +3,6 @@
3
3
  module Playbook
4
4
  module PbAdvancedTable
5
5
  class TableRow < Playbook::KitBase
6
- prop :id, type: Playbook::Props::String,
7
- default: ""
8
6
  prop :column_definitions, type: Playbook::Props::Array,
9
7
  default: []
10
8
  prop :row
@@ -163,9 +163,6 @@ if (Array.isArray(axisTitle) && axisTitle.length > 1 && axisTitle[1].name) {
163
163
  staticOptions.plotOptions.series.events = { legendItemClick: () => false };
164
164
  }
165
165
 
166
- const filteredProps: any = {...props};
167
- delete filteredProps.verticalAlign;
168
-
169
166
  const [options, setOptions] = useState({});
170
167
 
171
168
  useEffect(() => {
@@ -175,7 +172,7 @@ if (Array.isArray(axisTitle) && axisTitle.length > 1 && axisTitle[1].name) {
175
172
  return (
176
173
  <HighchartsReact
177
174
  containerProps={{
178
- className: classnames(globalProps(filteredProps), className),
175
+ className: classnames(globalProps(props), className),
179
176
  id: id,
180
177
  ...ariaProps,
181
178
  ...dataProps,
@@ -74,22 +74,6 @@ module Playbook
74
74
  standard_options.deep_merge(custom_options)
75
75
  end
76
76
 
77
- def vertical_align_props
78
- if vertical_align
79
- if object.vertical_align
80
- original_result = super
81
- class_to_remove = "vertical_align_#{object.vertical_align}"
82
-
83
- modified_result = original_result.gsub(class_to_remove, "").strip
84
- modified_result.empty? ? nil : modified_result
85
- else
86
- super
87
- end
88
- else
89
- super
90
- end
91
- end
92
-
93
77
  def classname
94
78
  generate_classname("pb_bar_graph")
95
79
  end
@@ -15,7 +15,7 @@
15
15
  data: [1111,677,3245,500,200]
16
16
  }] %>
17
17
 
18
- <% bar_graph_options = {
18
+ <% custom_options = {
19
19
  customOptions: {
20
20
  subtitle: {
21
21
  text: "Overwritten subtitle",
@@ -45,5 +45,5 @@
45
45
  y_axis_min: 0,
46
46
  subtitle: 'Subtitle to replace',
47
47
  title: 'Bar Graph with Custom Overrides',
48
- custom_options: bar_graph_options
49
- }) %>
48
+ custom_options: custom_options
49
+ }) %>
@@ -1,2 +1 @@
1
- The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
- It's important to note that certain options may require specific script imports to function properly.
1
+ See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
@@ -8,7 +8,7 @@ examples:
8
8
  - bar_graph_height: Height
9
9
  - bar_graph_spline: Spline
10
10
  - bar_graph_colors: Color Overrides
11
- - bar_graph_custom_rails: Custom Overrides
11
+ - bar_graph_custom: Custom Overrides
12
12
  - bar_graph_stacked: Stacked
13
13
  - bar_graph_negative_numbers: Negative Numbers
14
14
  - bar_graph_secondary_y_axis: Secondary Y-Axis
@@ -81,4 +81,4 @@
81
81
  }
82
82
  }
83
83
  }
84
- }
84
+ }
@@ -28,8 +28,7 @@ $pb_card_header_colors: map-merge(map-merge($product_colors, $additional_colors)
28
28
 
29
29
  @mixin pb_card_selected($border_color: $primary) {
30
30
  border-color: $border_color;
31
- border-width: $pb_card_border_width;
32
- outline: 1px solid $border_color;
31
+ border-width: $pb_card_border_width * 2;
33
32
  }
34
33
 
35
34
  @mixin pb_card_selected_dark {
@@ -20,6 +20,7 @@ $transition: $transition_cubic;
20
20
  border: solid $border_light 2px;
21
21
  border-radius: $border_rad_light;
22
22
  height: 22px;
23
+ position: relative;
23
24
  transition: background $transition_default ease, box-shadow $transition_default ease;
24
25
  width: 22px;
25
26
  .check_icon,
@@ -27,8 +28,8 @@ $transition: $transition_cubic;
27
28
  color: $white;
28
29
  height: 16px;
29
30
  left: 1px;
31
+ position: relative;
30
32
  display: flex;
31
- margin: auto;
32
33
  opacity: 0;
33
34
  width: 16px;
34
35
  &.hidden {
@@ -10,7 +10,6 @@ import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
10
10
  import mapColors from "../pb_dashboard/pbChartsColorsHelper";
11
11
  import { globalProps } from "../utilities/globalProps";
12
12
  import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
13
- import { merge } from 'lodash'
14
13
 
15
14
  type CircleChartProps = {
16
15
  align?: "left" | "right" | "center";
@@ -19,7 +18,6 @@ type CircleChartProps = {
19
18
  children?: Node;
20
19
  className?: string;
21
20
  colors?: string[];
22
- customOptions?: Partial<Highcharts.Options>;
23
21
  dark?: boolean;
24
22
  data?: {[key: string]: string},
25
23
  dataLabelHtml?: string;
@@ -69,7 +67,6 @@ const CircleChart = ({
69
67
  children,
70
68
  className,
71
69
  colors = [],
72
- customOptions = {},
73
70
  dark = false,
74
71
  data = {},
75
72
  dataLabelHtml = "<div>{point.name}</div>",
@@ -118,9 +115,6 @@ const CircleChart = ({
118
115
  innerSizes[size];
119
116
 
120
117
 
121
- const filteredProps: any = {...props};
122
- delete filteredProps.verticalAlign;
123
-
124
118
  const [options, setOptions] = useState({});
125
119
 
126
120
  useEffect(() => {
@@ -177,7 +171,7 @@ const CircleChart = ({
177
171
  ],
178
172
  credits: false,
179
173
  };
180
- setOptions(merge(staticOptions, customOptions));
174
+ setOptions({ ...staticOptions });
181
175
  }, [chartData]);
182
176
 
183
177
 
@@ -187,7 +181,7 @@ const CircleChart = ({
187
181
  <div id={`wrapper-circle-chart-${id}`}>
188
182
  <HighchartsReact
189
183
  containerProps={{
190
- className: classnames("pb_circle_chart", globalProps(filteredProps)),
184
+ className: classnames("pb_circle_chart", globalProps(props)),
191
185
  id: id,
192
186
  ...ariaProps,
193
187
  ...dataProps,
@@ -201,7 +195,7 @@ const CircleChart = ({
201
195
  ) : (
202
196
  <HighchartsReact
203
197
  containerProps={{
204
- className: classnames("pb_circle_chart", globalProps(filteredProps)),
198
+ className: classnames("pb_circle_chart", globalProps(props)),
205
199
  id: id,
206
200
  ...ariaProps,
207
201
  ...dataProps,
@@ -8,7 +8,6 @@ module Playbook
8
8
  default: "center"
9
9
  prop :chart_data, type: Playbook::Props::Array,
10
10
  default: []
11
- prop :custom_options, default: {}
12
11
  prop :style, type: Playbook::Props::Enum,
13
12
  values: %w[pie],
14
13
  default: "pie"
@@ -41,7 +40,7 @@ module Playbook
41
40
  prop :x, type: Playbook::Props::Numeric
42
41
  prop :y, type: Playbook::Props::Numeric
43
42
 
44
- def standard_options
43
+ def chart_options
45
44
  {
46
45
  align: align,
47
46
  id: id,
@@ -69,26 +68,6 @@ module Playbook
69
68
  }
70
69
  end
71
70
 
72
- def chart_options
73
- standard_options.deep_merge(custom_options)
74
- end
75
-
76
- def vertical_align_props
77
- if vertical_align
78
- if object.vertical_align
79
- original_result = super
80
- class_to_remove = "vertical_align_#{object.vertical_align}"
81
-
82
- modified_result = original_result.gsub(class_to_remove, "").strip
83
- modified_result.empty? ? nil : modified_result
84
- else
85
- super
86
- end
87
- else
88
- super
89
- end
90
- end
91
-
92
71
  def classname
93
72
  generate_classname("pb_circle_chart")
94
73
  end
@@ -1,4 +1,4 @@
1
- import React, { useEffect, ReactElement } from 'react'
1
+ import React, { useEffect } from 'react'
2
2
  import classnames from 'classnames'
3
3
  import useCollapsible from './useCollapsible'
4
4
 
@@ -11,16 +11,9 @@ import CollapsibleContext from './context'
11
11
  import { IconSizes } from "../pb_icon/_icon"
12
12
  import CollapsibleIcon from './child_kits/CollapsibleIcon'
13
13
 
14
- type CollapsibleMainProps = {
15
- children: React.ReactNode
16
- }
17
-
18
- type CollapsibleContentProps = {
19
- children: React.ReactNode
20
- }
21
14
 
22
15
  type CollapsibleProps = {
23
- children?: [ReactElement<CollapsibleMainProps>, ReactElement<CollapsibleContentProps>],
16
+ children?: React.ReactElement | [] | any,
24
17
  aria?: {[key: string]: string},
25
18
  className?: string,
26
19
  collapsed?: boolean,
@@ -37,7 +30,7 @@ type CollapsibleProps = {
37
30
  const Collapsible = ({
38
31
  aria = {},
39
32
  className,
40
- children,
33
+ children = [],
41
34
  collapsed = true,
42
35
  data = {},
43
36
  htmlOptions = {},
@@ -55,12 +48,13 @@ const Collapsible = ({
55
48
  setIsCollapsed(collapsed)
56
49
  },[collapsed])
57
50
 
58
- if (children.length !== 2) {
51
+ const CollapsibleParent = React.Children.toArray(children) as React.ReactElement[]
52
+
53
+ if (CollapsibleParent.length !== 2) {
59
54
  throw new Error('Collapsible requires <CollapsibleMain> and <CollapsibleContent> to function properly.')
60
55
  }
61
-
62
- const FirstChild = children[0]
63
- const SecondChild = children[1]
56
+ const FirstChild = CollapsibleParent[0]
57
+ const SecondChild = CollapsibleParent[1]
64
58
 
65
59
  const Main = FirstChild.type === CollapsibleMain ? FirstChild : null
66
60
  const Content = SecondChild.type === CollapsibleContent ? SecondChild : null
@@ -48,27 +48,3 @@ test('returns namespaced additional_class class name', () => {
48
48
  const kit = screen.getByTestId(testId)
49
49
  expect(kit).toHaveClass(`${kitClass} additional_class`)
50
50
  })
51
-
52
- test('html structure is correct', () => {
53
- const { container } = render(
54
- <Collapsible
55
- className="additional_class"
56
- data={{ testid: testId }}
57
- iconColor='lighter'
58
- iconSize="lg"
59
- >
60
- <Collapsible.Main>
61
- <div>{'Main Section'}</div>
62
- </Collapsible.Main>
63
- <Collapsible.Content>
64
- <div>
65
- {
66
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. In vel erat sed purus hendrerit viverra. Duis et vestibulum metus. Sed consequat ut ante non vehicula. Etiam nunc massa, pharetra vel quam id, posuere rhoncus quam. Quisque imperdiet arcu enim, nec aliquet justo auctor eget. Curabitur in metus nec nunc rhoncus faucibus vitae ac elit. Nulla facilisi. Vestibulum quis pretium nulla. Nulla ut accumsan velit. Duis varius urna sed sem tempor, sit amet fermentum nibh auctor. Praesent lorem arcu, egestas non ante quis, placerat pellentesque lectus.Vestibulum lacinia ipsum quis venenatis tristique. Vivamus suscipit, libero eu fringilla egestas, orci urna commodo arcu, vel gravida turpis ipsum molestie nibh. Donec cursus eu ante sagittis ultrices. Phasellus id sagittis risus. Mauris dapibus neque faucibus, tempor ligula vel, cursus ante. Donec faucibus gravida porta. Nullam egestas est quis aliquam feugiat. Sed eget metus diam. Cras eget placerat libero.'
67
- }
68
- </div>
69
- </Collapsible.Content>
70
- </Collapsible>
71
- )
72
-
73
- expect(container).toMatchSnapshot()
74
- })
@@ -3,12 +3,6 @@ import typography from '../tokens/exports/_typography.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
- interface CustomTreemapOptions extends Highcharts.SeriesTreemapOptions {
7
- traverseUpButton?: {
8
- position: { y: number };
9
- };
10
- }
11
-
12
6
  const highchartsDarkTheme: ThemeProps = {
13
7
  lang: {
14
8
  thousandsSep: ',',
@@ -206,7 +200,7 @@ const highchartsDarkTheme: ThemeProps = {
206
200
  traverseUpButton: {
207
201
  position: { y: -50 },
208
202
  },
209
- } as CustomTreemapOptions,
203
+ },
210
204
  },
211
205
  credits: {
212
206
  enabled: false
@@ -3,13 +3,6 @@ import typography from '../tokens/exports/_typography.scss'
3
3
 
4
4
  import { ThemeProps } from './themeTypes'
5
5
 
6
- interface CustomTreemapOptions extends Highcharts.SeriesTreemapOptions {
7
- traverseUpButton?: {
8
- position: { y: number };
9
- };
10
- }
11
-
12
-
13
6
  const highchartsTheme: ThemeProps = {
14
7
  lang: {
15
8
  thousandsSep: ',',
@@ -157,7 +150,6 @@ const highchartsTheme: ThemeProps = {
157
150
  fontSize: typography.text_smaller,
158
151
  color: colors.text_lt_light,
159
152
  fontWeight: typography.regular,
160
- textOutline: '2px $white',
161
153
  },
162
154
  },
163
155
  },
@@ -206,7 +198,7 @@ const highchartsTheme: ThemeProps = {
206
198
  traverseUpButton: {
207
199
  position: { y: -50 },
208
200
  },
209
- } as CustomTreemapOptions,
201
+ },
210
202
  },
211
203
  credits: {
212
204
  enabled: false
@@ -13,15 +13,6 @@
13
13
  ]
14
14
  %>
15
15
 
16
- <%
17
- example_dropdown_options = [
18
- { label: 'United States', value: 'United States', id: 'us' },
19
- { label: 'Canada', value: 'Canada', id: 'ca' },
20
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
21
- ]
22
-
23
- %>
24
-
25
16
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
26
17
  <%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
27
18
  <%= form.text_field :example_text_field, props: { label: true } %>
@@ -32,7 +23,6 @@
32
23
  <%= form.password_field :example_password_field, props: { label: true } %>
33
24
  <%= form.url_field :example_url_field, props: { label: true } %>
34
25
  <%= form.text_area :example_text_area, props: { label: true } %>
35
- <%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options } %>
36
26
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true } %>
37
27
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
38
28
  <%= form.check_box :example_checkbox,
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  & > [class^=pb_date_picker_kit]:not(:last-child) {
110
- .input_wrapper input, [class^=pb_text_input_kit] .date_picker_input_wrapper .flatpickr-wrapper {
110
+ .text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .flatpickr-wrapper {
111
111
  border-bottom-right-radius: 0;
112
112
  border-top-right-radius: 0;
113
113
  border-right-width: 0;
@@ -115,7 +115,7 @@
115
115
  }
116
116
 
117
117
  & > [class^=pb_date_picker_kit]:not(:first-child) {
118
- .input_wrapper input, [class^=pb_text_input_kit] .date_picker_input_wrapper .flatpickr-wrapper {
118
+ .text_input_wrapper input, [class^=pb_text_input_kit] .text_input_wrapper .flatpickr-wrapper {
119
119
  border-bottom-left-radius: 0;
120
120
  border-top-left-radius: 0;
121
121
  }
@@ -13,13 +13,11 @@ import typography from "../tokens/exports/_typography.scss";
13
13
  import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from "../utilities/props";
14
14
  import { globalProps } from "../utilities/globalProps";
15
15
  import { GenericObject } from "../types";
16
- import { merge } from 'lodash'
17
16
 
18
17
  type GaugeProps = {
19
18
  aria: { [key: string]: string };
20
19
  className?: string;
21
20
  chartData?: { name: string; value: number[] | number }[];
22
- customOptions?: Partial<Highcharts.Options>;
23
21
  dark?: boolean;
24
22
  data?: { [key: string]: string };
25
23
  disableAnimation?: boolean;
@@ -43,7 +41,6 @@ type GaugeProps = {
43
41
  const Gauge = ({
44
42
  aria = {},
45
43
  chartData,
46
- customOptions = {},
47
44
  dark = false,
48
45
  data = {},
49
46
  disableAnimation = false,
@@ -178,7 +175,7 @@ const Gauge = ({
178
175
  },
179
176
  };
180
177
 
181
- setOptions(merge(staticOptions, customOptions));
178
+ setOptions({ ...staticOptions });
182
179
 
183
180
  if (document.querySelector(".prefix")) {
184
181
  document.querySelectorAll(".prefix").forEach((prefix) => {
@@ -5,7 +5,6 @@ module Playbook
5
5
  class Gauge < Playbook::KitBase
6
6
  prop :chart_data, type: Playbook::Props::Array,
7
7
  default: [{ name: "Name", value: 0 }]
8
- prop :custom_options, default: {}
9
8
  prop :style, type: Playbook::Props::Enum,
10
9
  values: %w[solidgauge],
11
10
  default: "solidgauge"
@@ -23,7 +22,7 @@ module Playbook
23
22
  prop :max, type: Playbook::Props::Numeric, default: 100
24
23
  prop :colors, type: Playbook::Props::Array, default: []
25
24
 
26
- def standard_options
25
+ def chart_options
27
26
  {
28
27
  id: id,
29
28
  chartData: chart_data,
@@ -44,10 +43,6 @@ module Playbook
44
43
  }
45
44
  end
46
45
 
47
- def chart_options
48
- standard_options.deep_merge(custom_options)
49
- end
50
-
51
46
  def classname
52
47
  generate_classname("pb_gauge_kit")
53
48
  end