playbook_ui 14.21.2.pre.alpha.PLAY2241tablestickycolumnsdatanotids8357 → 14.21.2.pre.alpha.PLAY2256stickydataidreact8480

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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/CustomCell.tsx +4 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +8 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +30 -5
  6. data/app/pb_kits/playbook/pb_advanced_table/Utilities/CellRendererUtils.tsx +4 -1
  7. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +4 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +25 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/advanced_table_action_bar.js +36 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md +5 -3
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +64 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md +7 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
  16. data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +60 -84
  17. data/app/pb_kits/playbook/pb_advanced_table/index.js +114 -223
  18. data/app/pb_kits/playbook/pb_advanced_table/table_action_bar.html.erb +1 -1
  19. data/app/pb_kits/playbook/pb_contact/contact.test.js +2 -2
  20. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +1 -39
  21. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +1 -39
  22. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb +3 -3
  23. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx +7 -4
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +6 -3
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +6 -3
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +3 -3
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb +3 -3
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx +7 -4
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +3 -3
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +7 -4
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx +19 -10
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx +19 -10
  33. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb +10 -10
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb +10 -10
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb +10 -10
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx +20 -11
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb +3 -3
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx +8 -8
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb +10 -10
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx +23 -14
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +3 -3
  42. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +6 -3
  43. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx +6 -3
  44. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb +3 -3
  45. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +3 -3
  46. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +6 -3
  47. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +3 -3
  48. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +3 -3
  49. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +4 -4
  50. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.jsx +4 -4
  51. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +4 -4
  52. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +4 -4
  53. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.html.erb +52 -0
  54. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.jsx +99 -0
  55. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_rails.md +1 -0
  56. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_react.md +1 -0
  57. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +3 -3
  58. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +3 -3
  59. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +3 -3
  60. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx +3 -3
  61. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.html.erb +28 -0
  62. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +47 -0
  63. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_rails.md +1 -0
  64. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -0
  65. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +3 -3
  66. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +3 -3
  67. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx +3 -3
  68. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -3
  69. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +6 -3
  70. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +3 -3
  71. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +3 -3
  72. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +4 -0
  73. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +3 -1
  74. data/app/pb_kits/playbook/pb_filter/filter.test.js +2 -2
  75. data/app/pb_kits/playbook/pb_table/_table.tsx +4 -4
  76. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +8 -8
  77. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +1 -1
  78. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +12 -12
  79. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +3 -3
  80. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +12 -12
  81. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +3 -3
  82. data/app/pb_kits/playbook/pb_table/styles/_table-card.scss +11 -0
  83. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +4 -0
  84. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +34 -22
  85. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.jsx +25 -0
  86. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.md +1 -0
  87. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +1 -0
  88. data/app/pb_kits/playbook/pb_tooltip/docs/index.js +1 -0
  89. data/dist/chunks/_typeahead-B7FRYVtS.js +22 -0
  90. data/dist/chunks/_weekday_stacked-BOIXPXFw.js +45 -0
  91. data/dist/chunks/lib-Carqm8Ip.js +29 -0
  92. data/dist/chunks/{pb_form_validation-EyK6DbAT.js → pb_form_validation-DqRmTS8m.js} +1 -1
  93. data/dist/chunks/vendor.js +1 -1
  94. data/dist/menu.yml +0 -9
  95. data/dist/playbook-doc.js +3 -3
  96. data/dist/playbook-rails-react-bindings.js +1 -1
  97. data/dist/playbook-rails.js +1 -1
  98. data/dist/playbook.css +1 -1
  99. data/lib/playbook/version.rb +1 -1
  100. metadata +19 -29
  101. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.scss +0 -14
  102. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +0 -119
  103. data/app/pb_kits/playbook/pb_treemap_chart/docs/_description.md +0 -5
  104. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb +0 -37
  105. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx +0 -48
  106. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md +0 -2
  107. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb +0 -37
  108. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx +0 -47
  109. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md +0 -3
  110. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb +0 -79
  111. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx +0 -90
  112. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md +0 -1
  113. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb +0 -54
  114. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx +0 -65
  115. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md +0 -3
  116. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb +0 -37
  117. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx +0 -48
  118. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md +0 -3
  119. data/app/pb_kits/playbook/pb_treemap_chart/docs/example.yml +0 -15
  120. data/app/pb_kits/playbook/pb_treemap_chart/docs/index.js +0 -5
  121. data/app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js +0 -63
  122. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb +0 -1
  123. data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +0 -48
  124. data/dist/chunks/_typeahead-BmfmVMFP.js +0 -22
  125. data/dist/chunks/_weekday_stacked-DAC7yY_H.js +0 -45
  126. data/dist/chunks/lib-C2o6nu8G.js +0 -29
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.21.2"
5
- VERSION = "14.21.2.pre.alpha.PLAY2241tablestickycolumnsdatanotids8357"
5
+ VERSION = "14.21.2.pre.alpha.PLAY2256stickydataidreact8480"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.21.2.pre.alpha.PLAY2241tablestickycolumnsdatanotids8357
4
+ version: 14.21.2.pre.alpha.PLAY2256stickydataidreact8480
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-06-11 00:00:00.000000000 Z
12
+ date: 2025-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -286,6 +286,7 @@ files:
286
286
  - app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb
287
287
  - app/pb_kits/playbook/pb_advanced_table/advanced_table.rb
288
288
  - app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx
289
+ - app/pb_kits/playbook/pb_advanced_table/advanced_table_action_bar.js
289
290
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
290
291
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md
291
292
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_sort.html.erb
@@ -356,6 +357,8 @@ files:
356
357
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb
357
358
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.jsx
358
359
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.md
360
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx
361
+ - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md
359
362
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_scrollbar_none.html.erb
360
363
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_scrollbar_none.jsx
361
364
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.jsx
@@ -1387,6 +1390,10 @@ files:
1387
1390
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md
1388
1391
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb
1389
1392
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md
1393
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.html.erb
1394
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.jsx
1395
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_rails.md
1396
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_react.md
1390
1397
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx
1391
1398
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.md
1392
1399
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb
@@ -1394,6 +1401,10 @@ files:
1394
1401
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb
1395
1402
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx
1396
1403
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.md
1404
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.html.erb
1405
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx
1406
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_rails.md
1407
+ - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md
1397
1408
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx
1398
1409
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.md
1399
1410
  - app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb
@@ -3326,6 +3337,8 @@ files:
3326
3337
  - app/pb_kits/playbook/pb_toggle/toggle.test.js
3327
3338
  - app/pb_kits/playbook/pb_tooltip/_tooltip.scss
3328
3339
  - app/pb_kits/playbook/pb_tooltip/_tooltip.tsx
3340
+ - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.jsx
3341
+ - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.md
3329
3342
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb
3330
3343
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx
3331
3344
  - app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.md
@@ -3357,29 +3370,6 @@ files:
3357
3370
  - app/pb_kits/playbook/pb_tooltip/tooltip.html.erb
3358
3371
  - app/pb_kits/playbook/pb_tooltip/tooltip.rb
3359
3372
  - app/pb_kits/playbook/pb_tooltip/tooltip.test.jsx
3360
- - app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.scss
3361
- - app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx
3362
- - app/pb_kits/playbook/pb_treemap_chart/docs/_description.md
3363
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb
3364
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx
3365
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md
3366
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb
3367
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx
3368
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md
3369
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb
3370
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx
3371
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md
3372
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb
3373
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx
3374
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md
3375
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb
3376
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx
3377
- - app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md
3378
- - app/pb_kits/playbook/pb_treemap_chart/docs/example.yml
3379
- - app/pb_kits/playbook/pb_treemap_chart/docs/index.js
3380
- - app/pb_kits/playbook/pb_treemap_chart/treemapChart.test.js
3381
- - app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb
3382
- - app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb
3383
3373
  - app/pb_kits/playbook/pb_typeahead/_typeahead.scss
3384
3374
  - app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx
3385
3375
  - app/pb_kits/playbook/pb_typeahead/_typeahead.tsx
@@ -3622,11 +3612,11 @@ files:
3622
3612
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3623
3613
  - app/pb_kits/playbook/utilities/text.ts
3624
3614
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3625
- - dist/chunks/_typeahead-BmfmVMFP.js
3626
- - dist/chunks/_weekday_stacked-DAC7yY_H.js
3615
+ - dist/chunks/_typeahead-B7FRYVtS.js
3616
+ - dist/chunks/_weekday_stacked-BOIXPXFw.js
3627
3617
  - dist/chunks/lazysizes-B7xYodB-.js
3628
- - dist/chunks/lib-C2o6nu8G.js
3629
- - dist/chunks/pb_form_validation-EyK6DbAT.js
3618
+ - dist/chunks/lib-Carqm8Ip.js
3619
+ - dist/chunks/pb_form_validation-DqRmTS8m.js
3630
3620
  - dist/chunks/vendor.js
3631
3621
  - dist/menu.yml
3632
3622
  - dist/playbook-doc.js
@@ -1,14 +0,0 @@
1
- .pb_treemap_chart {
2
- .highcharts-drillup-button {
3
- .highcharts-button-box {
4
- fill: $primary;
5
- &:hover {
6
- fill: #004ebb;
7
- }
8
- }
9
- text {
10
- transform: translateX(25px);
11
- fill: $white;
12
- }
13
- }
14
- }
@@ -1,119 +0,0 @@
1
- import React, { useState, useEffect } from "react";
2
- import classnames from "classnames";
3
-
4
- import { globalProps } from "../utilities/globalProps";
5
- import { buildAriaProps, buildDataProps, buildHtmlProps } from "../utilities/props";
6
-
7
- import HighchartsReact from "highcharts-react-official";
8
- import Highcharts from "highcharts";
9
- import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
10
- import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
11
- import mapColors from "../pb_dashboard/pbChartsColorsHelper";
12
- import treemap from 'highcharts/modules/treemap'
13
- import { merge } from '../utilities/object'
14
-
15
- type TreemapChartProps = {
16
- chartData: {
17
- name: string;
18
- parent?: string | number;
19
- value: number;
20
- color?: string;
21
- id?: string | number;
22
- }[];
23
- className?: string;
24
- colors: string[];
25
- customOptions?: Partial<Highcharts.Options>;
26
- dark?: boolean;
27
- drillable: boolean;
28
- grouped: boolean;
29
- height?: string;
30
- htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
31
- id: number | string;
32
- title?: string;
33
- tooltipHtml: string;
34
- type?: string;
35
- aria?: { [key: string]: string };
36
- data?: { [key: string]: string };
37
- };
38
-
39
- const TreemapChart = ({
40
- aria = {},
41
- data = {},
42
- chartData,
43
- colors,
44
- customOptions = {},
45
- dark = false,
46
- drillable = false,
47
- grouped = false,
48
- height,
49
- htmlOptions = {},
50
- id,
51
- title = "",
52
- tooltipHtml = '<span style="font-weight: bold; color:{point.color};">●</span>{point.name}: <b>{point.value}</b>',
53
- type = "treemap",
54
- ...props
55
- }: TreemapChartProps): React.ReactElement => {
56
-
57
- const ariaProps = buildAriaProps(aria)
58
- const dataProps = buildDataProps(data)
59
- const htmlProps = buildHtmlProps(htmlOptions)
60
-
61
- const setupTheme = () => {
62
- dark
63
- ? Highcharts.setOptions(highchartsDarkTheme)
64
- : Highcharts.setOptions(highchartsTheme);
65
- };
66
- treemap(Highcharts)
67
- setupTheme();
68
-
69
- const staticOptions = {
70
- title: {
71
- text: title,
72
- },
73
- chart: {
74
- height: height,
75
- type: type,
76
- },
77
- credits: false,
78
- series: [
79
- {
80
- data: chartData,
81
- },
82
- ],
83
- plotOptions: {
84
- treemap: {
85
- tooltip: {
86
- pointFormat: tooltipHtml,
87
- },
88
- allowTraversingTree: drillable,
89
- colorByPoint: !grouped,
90
- colors:
91
- colors !== undefined && colors.length > 0
92
- ? mapColors(colors)
93
- : highchartsTheme.colors,
94
- },
95
- },
96
- };
97
-
98
- const [options, setOptions] = useState({});
99
-
100
- useEffect(() => {
101
- setOptions(merge(staticOptions, customOptions));
102
- }, [chartData]);
103
-
104
- return (
105
- <HighchartsReact
106
- containerProps={{
107
- className: classnames(globalProps(props), "pb_treemap_chart"),
108
- id: id,
109
- ...ariaProps,
110
- ...dataProps,
111
- ...htmlProps
112
- }}
113
- highcharts={Highcharts}
114
- options={options}
115
- />
116
- );
117
- };
118
-
119
- export default TreemapChart;
@@ -1,5 +0,0 @@
1
- Treemap charts are used to compare the relative size of groups of data. They can also use a nested data structure, allowing a user to drill down into a group to see its constituent data points.
2
-
3
- The default height of treemap is 400px and can be changed. The default height is in pixel units, but can also use percentage string (percentage would be that of the width. For example, `height:"50%"` would mean that the height is 50% of the width). This allows for preserving the aspect ratio across responsive sizes.
4
-
5
- For more information, see: <a href="https://api.highcharts.com/highcharts/chart.height" target="_blank"> highcharts/chart.height</a>.
@@ -1,37 +0,0 @@
1
- <% data = [
2
- {
3
- name: "Pepperoni",
4
- parent: "Toppings",
5
- value: 600,
6
- }, {
7
- name: "Cheese",
8
- parent: "Toppings",
9
- value: 510,
10
- }, {
11
- name: "Mushroom",
12
- parent: "Toppings",
13
- value: 330,
14
- },{
15
- name: "Onions",
16
- parent: "Toppings",
17
- value: 250,
18
- }, {
19
- name: "Olives",
20
- parent: "Toppings",
21
- value: 204,
22
- }, {
23
- name: "Pineapple",
24
- parent: "Toppings",
25
- value: 90,
26
- }, {
27
- name: "Pizza Toppings",
28
- id: "Toppings",
29
- },
30
- ] %>
31
-
32
- <%= pb_rails("treemap_chart", props: {
33
- chart_data: data,
34
- colors: ["data-4", "data-7", "#8E6E53", "#124732"],
35
- id: "treemap-colors",
36
- title: "Favored Pizza Toppings",
37
- }) %>
@@ -1,48 +0,0 @@
1
- import React from 'react'
2
-
3
- import TreemapChart from '../_treemap_chart'
4
-
5
- const chartData = [
6
- {
7
- name: "Pepperoni",
8
- parent: "Toppings",
9
- value: 600,
10
- }, {
11
- name: "Cheese",
12
- parent: "Toppings",
13
- value: 510,
14
- }, {
15
- name: "Mushroom",
16
- parent: "Toppings",
17
- value: 330,
18
- },{
19
- name: "Onions",
20
- parent: "Toppings",
21
- value: 250,
22
- }, {
23
- name: "Olives",
24
- parent: "Toppings",
25
- value: 204,
26
- }, {
27
- name: "Pineapple",
28
- parent: "Toppings",
29
- value: 90,
30
- }, {
31
- name: "Pizza Toppings",
32
- id: "Toppings",
33
- },
34
- ]
35
-
36
- const TreemapChartColors = (props) => (
37
- <div>
38
- <TreemapChart
39
- chartData={chartData}
40
- colors={["data-4", "data-7", "#8E6E53", "#124732"]}
41
- id="treemap-colors"
42
- title="Favored Pizza Toppings"
43
- {...props}
44
- />
45
- </div>
46
- )
47
-
48
- export default TreemapChartColors
@@ -1,2 +0,0 @@
1
- Custom data colors allow for color customization to match the needs of business requirements.
2
- Pass the prop `colors` and use desired values `data-1 | data-2 | data-3 | data-4 | data-5 | data-6 | data-7 | data-8` in an array. Hex colors are also available `eg: #CA0095`
@@ -1,37 +0,0 @@
1
- <% data = [
2
- {
3
- name: "Pepperoni",
4
- parent: "Toppings",
5
- value: 600,
6
- }, {
7
- name: "Cheese",
8
- parent: "Toppings",
9
- value: 510,
10
- }, {
11
- name: "Mushroom",
12
- parent: "Toppings",
13
- value: 330,
14
- },{
15
- name: "Onions",
16
- parent: "Toppings",
17
- value: 250,
18
- }, {
19
- name: "Olives",
20
- parent: "Toppings",
21
- value: 204,
22
- }, {
23
- name: "Pineapple",
24
- parent: "Toppings",
25
- value: 90,
26
- }, {
27
- name: "Pizza Toppings",
28
- id: "Toppings",
29
- },
30
- ] %>
31
-
32
-
33
- <%= pb_rails("treemap_chart", props: {
34
- chart_data: data,
35
- id: "treemap-default",
36
- title: "Favored Pizza Toppings",
37
- }) %>
@@ -1,47 +0,0 @@
1
- import React from 'react'
2
-
3
- import TreemapChart from '../_treemap_chart'
4
-
5
- const chartData = [
6
- {
7
- name: "Pepperoni",
8
- parent: "Toppings",
9
- value: 600,
10
- }, {
11
- name: "Cheese",
12
- parent: "Toppings",
13
- value: 510,
14
- }, {
15
- name: "Mushroom",
16
- parent: "Toppings",
17
- value: 330,
18
- },{
19
- name: "Onions",
20
- parent: "Toppings",
21
- value: 250,
22
- }, {
23
- name: "Olives",
24
- parent: "Toppings",
25
- value: 204,
26
- }, {
27
- name: "Pineapple",
28
- parent: "Toppings",
29
- value: 90,
30
- }, {
31
- name: "Pizza Toppings",
32
- id: "Toppings",
33
- },
34
- ]
35
-
36
- const TreemapChartDefault = (props) => (
37
- <div>
38
- <TreemapChart
39
- chartData={chartData}
40
- id="treemap-default"
41
- title="Favored Pizza Toppings"
42
- {...props}
43
- />
44
- </div>
45
- )
46
-
47
- export default TreemapChartDefault
@@ -1,3 +0,0 @@
1
- Points are automatically arranged by their `value` size.
2
-
3
- By default, point colors are assigned sequentially from the global `data` colors. Note that data points without a value (such as parent nodes) will still take on the next available color.
@@ -1,79 +0,0 @@
1
- <% data = [
2
- {
3
- name: "Evergreen",
4
- id: "Evergreen",
5
- color: "#0056CF",
6
- }, {
7
- name: "Pine",
8
- id: "Pine",
9
- parent: "Evergreen",
10
- value: 300,
11
- color: "#477BC4",
12
- }, {
13
- name: "Ponderosa Pine",
14
- parent: "Pine",
15
- value: 50,
16
- }, {
17
- name: "Scots Pine",
18
- parent: "Pine",
19
- value: 150,
20
- }, {
21
- name: "White Pine",
22
- parent: "Pine",
23
- value: 100,
24
- }, {
25
- name: "Douglas Fir",
26
- parent: "Evergreen",
27
- value: 150,
28
- }, {
29
- name: "Juniper",
30
- parent: "Evergreen",
31
- value: 80,
32
- }, {
33
- name: "Hemlock",
34
- parent: "Evergreen",
35
- value: 30,
36
- }, {
37
- name: "Deciduous",
38
- id: "Deciduous",
39
- color: "#F9BB00",
40
- }, {
41
- name: "Oak",
42
- parent: "Deciduous",
43
- value: 80,
44
- }, {
45
- name: "Maple",
46
- id: "Maple",
47
- parent: "Deciduous",
48
- value: 180,
49
- color: "#F7CE52",
50
- }, {
51
- name: "Red Maple",
52
- parent: "Maple",
53
- value: 80,
54
- }, {
55
- name: "Sugar Maple",
56
- parent: "Maple",
57
- value: 100,
58
- }, {
59
- name: "Beech",
60
- parent: "Deciduous",
61
- value: 50,
62
- }, {
63
- name: "Willow",
64
- parent: "Deciduous",
65
- value: 100,
66
- }, {
67
- name: "Juniper",
68
- parent: "Deciduous",
69
- value: 90,
70
- },
71
- ] %>
72
-
73
- <%= pb_rails("treemap_chart", props: {
74
- chart_data: data,
75
- drillable: true,
76
- grouped: true,
77
- id: "treemap-drillable",
78
- title: "Drillable Grouped Tree Species",
79
- }) %>
@@ -1,90 +0,0 @@
1
- import React from 'react'
2
-
3
- import TreemapChart from '../_treemap_chart'
4
-
5
- const chartData = [
6
- {
7
- name: "Evergreen",
8
- id: "Evergreen",
9
- color: "#0056CF",
10
- }, {
11
- name: "Pine",
12
- id: "Pine",
13
- parent: "Evergreen",
14
- value: 300,
15
- color: "#477BC4",
16
- }, {
17
- name: "Ponderosa Pine",
18
- parent: "Pine",
19
- value: 50,
20
- }, {
21
- name: "Scots Pine",
22
- parent: "Pine",
23
- value: 150,
24
- }, {
25
- name: "White Pine",
26
- parent: "Pine",
27
- value: 100,
28
- }, {
29
- name: "Douglas Fir",
30
- parent: "Evergreen",
31
- value: 150,
32
- }, {
33
- name: "Juniper",
34
- parent: "Evergreen",
35
- value: 80,
36
- }, {
37
- name: "Hemlock",
38
- parent: "Evergreen",
39
- value: 30,
40
- }, {
41
- name: "Deciduous",
42
- id: "Deciduous",
43
- color: "#F9BB00",
44
- }, {
45
- name: "Oak",
46
- parent: "Deciduous",
47
- value: 80,
48
- }, {
49
- name: "Maple",
50
- id: "Maple",
51
- parent: "Deciduous",
52
- value: 180,
53
- color: "#F7CE52",
54
- }, {
55
- name: "Red Maple",
56
- parent: "Maple",
57
- value: 80,
58
- }, {
59
- name: "Sugar Maple",
60
- parent: "Maple",
61
- value: 100,
62
- }, {
63
- name: "Beech",
64
- parent: "Deciduous",
65
- value: 50,
66
- }, {
67
- name: "Willow",
68
- parent: "Deciduous",
69
- value: 100,
70
- }, {
71
- name: "Juniper",
72
- parent: "Deciduous",
73
- value: 90,
74
- },
75
- ]
76
-
77
- const TreemapChartDrillable = (props) => (
78
- <div>
79
- <TreemapChart
80
- chartData={chartData}
81
- drillable
82
- grouped
83
- id="treemap-drillable"
84
- title="Drillable Grouped Tree Species"
85
- {...props}
86
- />
87
- </div>
88
- )
89
-
90
- export default TreemapChartDrillable
@@ -1 +0,0 @@
1
- Adding the `drillable` prop allows the tree to be traversed up and down by clicking into each box. Relationships are established through the `chartData`, detailed in the <a href="#treemap-grouped-data">Grouped Data section above</a>.
@@ -1,54 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Meat',
4
- id: 'Meat',
5
- color: "#0056CF",
6
- }, {
7
- name: 'Pepperoni',
8
- parent: 'Meat',
9
- value: 250,
10
- }, {
11
- name: 'Meatball',
12
- parent: 'Meat',
13
- value: 400,
14
- }, {
15
- name: "Anchovy",
16
- parent: 'Meat',
17
- value: 40,
18
- }, {
19
- name: 'Vegetarian',
20
- id: 'Vegetarian',
21
- color: "#F9BB00",
22
- }, {
23
- name: 'Onions',
24
- parent: 'Vegetarian',
25
- value: 300,
26
- }, {
27
- name: 'Pineapple',
28
- parent: 'Vegetarian',
29
- value: 90,
30
- }, {
31
- name: "Peppers",
32
- parent: 'Vegetarian',
33
- value: 80,
34
- }, {
35
- name: "Specialty",
36
- id: "Specialty",
37
- color: "#9E64E9",
38
- },{
39
- name: "Buffalo Chicken",
40
- parent: "Specialty",
41
- value: 400,
42
- }, {
43
- name: "Supreme",
44
- parent: "Specialty",
45
- value: 150,
46
- }
47
- ] %>
48
-
49
- <%= pb_rails("treemap_chart", props: {
50
- chart_data: data,
51
- grouped: true,
52
- id: "treemap-grouped",
53
- title: "Grouped Toppings",
54
- }) %>