playbook_ui 15.8.0.pre.rc.1 → 16.0.0

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 (180) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +0 -4
  3. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
  4. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
  5. data/app/pb_kits/playbook/pb_pb_circle_chart/pb_circle_chart.test.jsx +1 -1
  6. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
  7. data/app/pb_kits/playbook/pb_pb_gauge_chart/pb_gauge_chart.test.jsx +1 -1
  8. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
  9. data/app/pb_kits/playbook/pb_pb_line_graph/pb_line_graph.test.jsx +1 -1
  10. data/app/pb_kits/playbook/utilities/test/globalProps/alignContent.test.js +37 -50
  11. data/app/pb_kits/playbook/utilities/test/globalProps/alignItems.test.js +38 -50
  12. data/app/pb_kits/playbook/utilities/test/globalProps/alignSelf.test.js +37 -50
  13. data/app/pb_kits/playbook/utilities/test/globalProps/display.test.js +37 -51
  14. data/app/pb_kits/playbook/utilities/test/globalProps/flex.test.js +44 -76
  15. data/app/pb_kits/playbook/utilities/test/globalProps/flexDirection.test.js +37 -50
  16. data/app/pb_kits/playbook/utilities/test/globalProps/flexGrow.test.js +35 -48
  17. data/app/pb_kits/playbook/utilities/test/globalProps/flexShrink.test.js +35 -48
  18. data/app/pb_kits/playbook/utilities/test/globalProps/flexWrap.test.js +37 -50
  19. data/app/pb_kits/playbook/utilities/test/globalProps/globalPropsTestHelper.js +373 -0
  20. data/app/pb_kits/playbook/utilities/test/globalProps/justifyContent.test.js +37 -50
  21. data/app/pb_kits/playbook/utilities/test/globalProps/justifySelf.test.js +37 -50
  22. data/app/pb_kits/playbook/utilities/test/globalProps/order.test.js +36 -48
  23. data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +30 -18
  24. data/dist/chunks/_pb_line_graph-ByQFYuFO.js +1 -0
  25. data/dist/chunks/_typeahead-Bl8_gWmz.js +1 -0
  26. data/dist/chunks/componentRegistry-DzmmLR2x.js +1 -0
  27. data/dist/chunks/globalProps-D6R2eJnp.js +6 -0
  28. data/dist/chunks/lib-C8h70OzX.js +29 -0
  29. data/dist/chunks/vendor.js +4 -4
  30. data/dist/menu.yml +0 -29
  31. data/dist/playbook-rails-react-bindings.js +1 -1
  32. data/dist/playbook-rails.js +1 -1
  33. data/dist/playbook.css +1 -1
  34. data/lib/playbook/version.rb +1 -1
  35. metadata +8 -147
  36. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.scss +0 -6
  37. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +0 -196
  38. data/app/pb_kits/playbook/pb_bar_graph/barGraph.test.js +0 -31
  39. data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +0 -32
  40. data/app/pb_kits/playbook/pb_bar_graph/barGraphTheme.ts +0 -106
  41. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.html.erb +0 -1
  42. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -98
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
  44. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
  45. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
  46. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
  47. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  48. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
  49. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
  50. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
  51. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
  52. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  53. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
  54. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
  55. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
  56. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
  57. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
  58. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
  59. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
  60. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
  61. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
  62. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
  63. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
  64. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
  65. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
  66. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
  67. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
  68. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
  69. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
  70. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
  71. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
  72. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
  73. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
  74. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
  75. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
  76. data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts +0 -2
  77. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +0 -16
  78. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +0 -228
  79. data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +0 -45
  80. data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +0 -88
  81. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +0 -10
  82. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -99
  83. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
  84. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
  85. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
  86. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
  87. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
  88. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  89. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
  90. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
  91. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
  92. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
  93. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
  94. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
  95. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
  96. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
  97. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
  98. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
  99. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
  100. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
  101. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
  102. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
  103. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
  104. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
  105. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
  106. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
  107. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
  108. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  109. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
  110. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
  111. data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +0 -104
  112. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +0 -16
  113. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +0 -174
  114. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +0 -173
  115. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +0 -20
  116. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +0 -49
  117. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +0 -215
  118. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  119. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
  120. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
  121. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
  122. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  123. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
  124. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
  125. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
  126. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  127. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
  128. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
  129. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
  130. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
  131. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
  132. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
  133. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
  134. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
  135. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
  136. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
  137. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
  138. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
  139. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
  140. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
  141. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
  142. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
  143. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
  144. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
  145. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
  146. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  147. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
  148. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
  149. data/app/pb_kits/playbook/pb_gauge/gauge.html.erb +0 -2
  150. data/app/pb_kits/playbook/pb_gauge/gauge.rb +0 -56
  151. data/app/pb_kits/playbook/pb_gauge/gauge.test.js +0 -35
  152. data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +0 -91
  153. data/app/pb_kits/playbook/pb_line_graph/_line_graph.scss +0 -3
  154. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +0 -166
  155. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
  156. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
  157. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
  158. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
  159. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  160. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
  161. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
  162. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
  163. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
  164. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  165. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
  166. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
  167. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
  168. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
  169. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
  170. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
  171. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
  172. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
  173. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
  174. data/app/pb_kits/playbook/pb_line_graph/lineGraph.test.js +0 -52
  175. data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +0 -30
  176. data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +0 -125
  177. data/app/pb_kits/playbook/pb_line_graph/line_graph.html.erb +0 -1
  178. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +0 -93
  179. data/dist/chunks/_typeahead-D0GNUBXn.js +0 -6
  180. data/dist/chunks/lib-DxCgrqqG.js +0 -29
@@ -1,22 +0,0 @@
1
- <% data_rounded = [{
2
- name: 'Waiting for Calls',
3
- value: 20,
4
- },
5
- {
6
- name: 'On Call',
7
- value: 49,
8
- },
9
- {
10
- name: 'After Call',
11
- value: 10,
12
- }
13
- ] %>
14
-
15
-
16
- <%= pb_rails("circle_chart", props: {
17
- chart_data: data_rounded,
18
- id: "default-test-rounded",
19
- inner_size: "lg",
20
- rounded: true,
21
-
22
- }) %>
@@ -1,45 +0,0 @@
1
- import React from 'react'
2
- import circleChartTheme from '../circleChartTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const dataRounded = [
7
- {
8
- name: 'Waiting for Calls',
9
- y: 41,
10
- },
11
- {
12
- name: 'On Call',
13
- y: 49,
14
- },
15
- {
16
- name: 'After Call',
17
- y: 10,
18
- },
19
- ]
20
-
21
- const CircleChartRounded = () => {
22
- const chartOptions = {
23
- series: [{ data: dataRounded }],
24
- plotOptions: {
25
- pie: {
26
- borderColor: null,
27
- borderWidth: 20,
28
- innerSize: '100%',
29
- },
30
- },
31
- }
32
-
33
- const options = Highcharts.merge({}, circleChartTheme, chartOptions)
34
-
35
- return (
36
- <div>
37
- <HighchartsReact
38
- highcharts={Highcharts}
39
- options={options}
40
- />
41
- </div>
42
- )
43
- }
44
-
45
- export default CircleChartRounded
@@ -1,37 +0,0 @@
1
- <% data = [{
2
- name: 'Facebook',
3
- value: 2498,
4
- },
5
- {
6
- name: 'YouTube',
7
- value: 2000,
8
- },
9
- {
10
- name: 'WhatsApp',
11
- value: 2000,
12
-
13
- },
14
- {
15
- name: 'Facebook Messenger',
16
- value: 1300,
17
- },
18
- {
19
- name: 'WeChat',
20
- value: 1165,
21
- },
22
- {
23
- name: 'Instagram',
24
- value: 1000,
25
- },
26
- {
27
- name: 'Tik Tok',
28
- value: 800,
29
- },
30
- ] %>
31
-
32
- <%= pb_rails("circle_chart", props: {
33
- style: "pie",
34
- chart_data: data,
35
- id: "with-labels-example",
36
- data_labels: true
37
- }) %>
@@ -1,61 +0,0 @@
1
- import React from 'react'
2
- import circleChartTheme from '../circleChartTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const dataWithLabels = [
7
- {
8
- name: 'Facebook',
9
- y: 2498,
10
- },
11
- {
12
- name: 'YouTube',
13
- y: 2000,
14
- },
15
- {
16
- name: 'WhatsApp',
17
- y: 2000,
18
- },
19
- {
20
- name: 'Facebook Messenger',
21
- y: 1300,
22
- },
23
- {
24
- name: 'WeChat',
25
- y: 1165,
26
- },
27
- {
28
- name: 'Instagram',
29
- y: 1000,
30
- },
31
- {
32
- name: 'Tik Tok',
33
- y: 800,
34
- },
35
- ]
36
-
37
- const CircleChartWithLabels = () => {
38
- const chartOptions = {
39
- series: [{ data: dataWithLabels }],
40
- plotOptions: {
41
- pie: {
42
- dataLabels: {
43
- enabled: true,
44
- }
45
- }
46
- }
47
- }
48
-
49
- const options = Highcharts.merge({}, circleChartTheme, chartOptions)
50
-
51
- return (
52
- <div>
53
- <HighchartsReact
54
- highcharts={Highcharts}
55
- options={options}
56
- />
57
- </div>
58
- )
59
- }
60
-
61
- export default CircleChartWithLabels
@@ -1,22 +0,0 @@
1
- <% data_1 = [{
2
- name: 'Bugs',
3
- value: 8,
4
-
5
- },
6
- {
7
- name: 'Chores',
8
- value: 1,
9
-
10
- },
11
- {
12
- name: 'Stories',
13
- value: 12,
14
- }
15
- ] %>
16
-
17
- <%= pb_rails("circle_chart", props: {
18
- style: "pie",
19
- chart_data: data_1,
20
- legend: true,
21
- id: "with-legend-example",
22
- }) %>
@@ -1,41 +0,0 @@
1
- import React from 'react'
2
- import circleChartTheme from '../circleChartTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const dataWithLegend = [{
7
- name: 'Bugs',
8
- y: 8,
9
- },
10
- {
11
- name: 'Chores',
12
- y: 1,
13
- },
14
- {
15
- name: 'Stories',
16
- y: 12,
17
- }]
18
-
19
- const CircleChartWithLegendKit = () => {
20
- const chartOptions = {
21
- series: [{ data: dataWithLegend }],
22
- plotOptions: {
23
- pie: {
24
- showInLegend: true
25
- }
26
- }
27
- }
28
-
29
- const options = Highcharts.merge({}, circleChartTheme, chartOptions)
30
-
31
- return (
32
- <div>
33
- <HighchartsReact
34
- highcharts={Highcharts}
35
- options={options}
36
- />
37
- </div>
38
- )
39
- }
40
-
41
- export default CircleChartWithLegendKit
@@ -1,38 +0,0 @@
1
- <% data_5 = [{
2
- name: 'Facebook',
3
- value: 2498,
4
- },
5
- {
6
- name: 'YouTube',
7
- value: 2000,
8
- },
9
- {
10
- name: 'WhatsApp',
11
- value: 2000,
12
-
13
- },
14
- {
15
- name: 'Facebook Messenger',
16
- value: 1300,
17
- },
18
- {
19
- name: 'WeChat',
20
- value: 1165,
21
- },
22
- {
23
- name: 'Instagram',
24
- value: 1000,
25
- },
26
- {
27
- name: 'Tik Tok',
28
- value: 800,
29
- },
30
- ] %>
31
-
32
-
33
- <%= pb_rails("circle_chart", props: {
34
- style: "pie",
35
- title: "Active Users on Social Media",
36
- chart_data: data_5,
37
- id: "with-caption-example",
38
- }) %>
@@ -1,55 +0,0 @@
1
- import React from 'react'
2
- import circleChartTheme from '../circleChartTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
-
6
- const dataWithTitle = [
7
- {
8
- name: 'Facebook',
9
- y: 2498,
10
- },
11
- {
12
- name: 'YouTube',
13
- y: 2000,
14
- },
15
- {
16
- name: 'WhatsApp',
17
- y: 2000,
18
- },
19
- {
20
- name: 'Facebook Messenger',
21
- y: 1300,
22
- },
23
- {
24
- name: 'WeChat',
25
- y: 1165,
26
- },
27
- {
28
- name: 'Instagram',
29
- y: 1000,
30
- },
31
- {
32
- name: 'Tik Tok',
33
- y: 800,
34
- },
35
- ]
36
-
37
- const CircleChartWithTitle = () => {
38
- const chartOptions = {
39
- title: { text: "Active Users on Social Media" },
40
- series: [{ data: dataWithTitle }],
41
- }
42
-
43
- const options = Highcharts.merge({}, circleChartTheme, chartOptions)
44
-
45
- return (
46
- <div>
47
- <HighchartsReact
48
- highcharts={Highcharts}
49
- options={options}
50
- />
51
- </div>
52
- )
53
- }
54
-
55
- export default CircleChartWithTitle
@@ -1 +0,0 @@
1
- **Important Note for the React Kit**: In order to leverage this kit, you must install `highcharts` and `highcharts-react-official` into your project as shown below. To then apply Playbook styles to your Highchart, import circleChartTheme.ts from playbook-ui and merge it with your Highchart options. Then, pass the merged value to the options prop. Playbook’s styling will be applied automatically. See the examples in the documentation below.
@@ -1,26 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - circle_chart_default: Default Style
5
- - circle_chart_rounded: Rounded Corners
6
- - circle_chart_block: Accepts Any Block
7
- - circle_chart_colors: Color Overrides
8
- - circle_chart_with_labels: Data Labels
9
- - circle_chart_with_legend_kit: Legend
10
- - circle_chart_legend_position: Legend Position
11
- - circle_chart_with_title: Title
12
- - circle_chart_inner_sizes: Inner Circle Size Options
13
- - circle_chart_custom_tooltip: Tooltip Customization
14
-
15
- react:
16
- - circle_chart_default: Default Style
17
- - circle_chart_live_data: Live Data
18
- - circle_chart_rounded: Rounded Corners
19
- - circle_chart_block: Accepts Any Block
20
- - circle_chart_colors: Color Overrides
21
- - circle_chart_with_labels: Data Labels
22
- - circle_chart_with_legend_kit: Legend
23
- - circle_chart_legend_position: Legend Position
24
- - circle_chart_with_title: Title
25
- - circle_chart_inner_sizes: Inner Circle Size Options
26
- - circle_chart_custom_tooltip: Tooltip Customization
@@ -1,11 +0,0 @@
1
- export { default as CircleChartDefault } from './_circle_chart_default.jsx'
2
- export { default as CircleChartLiveData } from './_circle_chart_live_data.jsx'
3
- export { default as CircleChartRounded } from './_circle_chart_rounded.jsx'
4
- export { default as CircleChartBlock } from './_circle_chart_block.jsx'
5
- export { default as CircleChartColors } from './_circle_chart_colors.jsx'
6
- export { default as CircleChartWithLabels } from './_circle_chart_with_labels.jsx'
7
- export { default as CircleChartWithLegendKit } from './_circle_chart_with_legend_kit.jsx'
8
- export { default as CircleChartLegendPosition } from './_circle_chart_legend_position.jsx'
9
- export { default as CircleChartWithTitle } from './_circle_chart_with_title.jsx'
10
- export { default as CircleChartInnerSizes } from './_circle_chart_inner_sizes.jsx'
11
- export { default as CircleChartCustomTooltip } from "./_circle_chart_custom_tooltip.jsx"
@@ -1,104 +0,0 @@
1
- import colors from '../tokens/exports/_colors.module.scss'
2
- import typography from '../tokens/exports/_typography.module.scss'
3
-
4
- const dataColors = [
5
- colors.data_1,
6
- colors.data_2,
7
- colors.data_3,
8
- colors.data_4,
9
- colors.data_5,
10
- colors.data_6,
11
- colors.data_7,
12
- colors.data_8,
13
- ]
14
-
15
- const applyCustomSeriesColors = (highchart) => {
16
- highchart.series.forEach((item, index) => {
17
- const selectedColor = dataColors[index]
18
- item.color = selectedColor
19
- item.data.forEach((dataItem) => {
20
- if (dataItem.color){
21
- dataItem.color = selectedColor
22
- }
23
-
24
- if (!dataItem.marker) return
25
-
26
- if (dataItem.marker.lineColor){
27
- dataItem.marker.lineColor = selectedColor
28
- }
29
-
30
- if (dataItem.marker.states.hover !== undefined){
31
- dataItem.marker.states.hover.lineColor = selectedColor
32
- }
33
-
34
- if (dataItem.marker.states.select.lineColor){
35
- dataItem.marker.states.select.lineColor = selectedColor
36
- }
37
- })
38
- })
39
- }
40
-
41
- const adjustAxisStyle = (axis) => {
42
- /* Styles grid */
43
- axis.minorGridLineColor = colors.slate
44
- axis.minorGridLineWidth = 0.5
45
- axis.minorGridLineDashStyle = 'Dash'
46
- axis.gridLineWidth = 0.5
47
- axis.gridLineColor = colors.slate
48
- axis.gridLineDashStyle = 'Dash'
49
-
50
- /* Change line color to $sky */
51
- axis.lineColor = colors.sky
52
-
53
- /* Change axis label styles */
54
- axis.labels.style.fontFamily = typography.font_family_base
55
- axis.labels.style.color = colors.charcoal
56
- axis.labels.style.fontWeight = typography.regular
57
- axis.labels.style.fontSize = typography.font_small
58
- }
59
-
60
- /* Remove grid from background */
61
- const styleAxis = (highchart) => {
62
- if (Array.isArray(highchart.yAxis)) {
63
- highchart.yAxis.forEach((item) => {
64
- adjustAxisStyle(item)
65
- })
66
- } else {
67
- adjustAxisStyle(highchart.yAxis)
68
- }
69
-
70
- if (Array.isArray(highchart.xAxis)) {
71
- highchart.xAxis.forEach((item) => {
72
- adjustAxisStyle(item)
73
- })
74
- } else {
75
- adjustAxisStyle(highchart.xAxis)
76
- }
77
- }
78
-
79
- const styleChartContainer = (highchart) => {
80
- highchart.chart.spacingTop = 30
81
- highchart.chart.spacingBottom = 40
82
- highchart.chart.spacingLeft = 50
83
- highchart.chart.spacingRight = 50
84
- }
85
-
86
- const styleLegend = (highchart) => {
87
- highchart.legend.itemStyle.fontFamily = typography.font_family_base
88
- highchart.legend.itemStyle.color = colors.text_lt_light
89
- highchart.legend.itemStyle.fontWeight = typography.regular
90
- highchart.legend.itemStyle.fontSize = typography.text_smaller
91
- }
92
-
93
- // Exportable Global Styles Function
94
- const commonSettings = (highchart) => {
95
- applyCustomSeriesColors(highchart)
96
- styleAxis(highchart)
97
- styleChartContainer(highchart)
98
- styleLegend(highchart)
99
- }
100
-
101
- export {
102
- commonSettings,
103
- dataColors,
104
- }
@@ -1,16 +0,0 @@
1
- import colors from "../tokens/exports/_colors.module.scss";
2
-
3
-
4
- // Map Data Color String Props to our SCSS Variables
5
- const mapColors = (array: string[]): string[] => {
6
- const regex = /(data)\-[1-8]/; //eslint-disable-line
7
-
8
- const newArray = array.map((item) => {
9
- return regex.test(item)
10
- ? `${colors[`data_${item[item.length - 1]}`]}`
11
- : item;
12
- });
13
- return newArray;
14
- };
15
-
16
- export default mapColors
@@ -1,174 +0,0 @@
1
- import colors from '../tokens/exports/_colors.module.scss'
2
- import typography from '../tokens/exports/_typography.module.scss'
3
-
4
- import { ThemeProps } from './themeTypes'
5
-
6
- const highchartsDarkTheme: ThemeProps = {
7
- lang: {
8
- thousandsSep: ',',
9
- },
10
- colors: [
11
- colors.data_1,
12
- colors.data_2,
13
- colors.data_3,
14
- colors.data_4,
15
- colors.data_5,
16
- colors.data_6,
17
- colors.data_7,
18
- ],
19
- chart: {
20
- borderWidth: 0,
21
- borderRadius: 0,
22
- plotBackgroundColor: undefined,
23
- plotShadow: false,
24
- plotBorderWidth: 0,
25
- },
26
- title: {
27
- style: {
28
- color: colors.text_dk_default,
29
- fontFamily: typography.font_family_base,
30
- fontWeight: typography.bold,
31
- fontSize: typography.heading_3,
32
- },
33
- },
34
- subtitle: {
35
- style: {
36
- fontFamily: typography.font_family_base,
37
- color: colors.text_dk_light,
38
- fontWeight: typography.regular,
39
- fontSize: typography.text_base,
40
- },
41
- },
42
- xAxis: {
43
- gridLineWidth: 0,
44
- lineColor: colors.border_dark,
45
- tickColor: colors.border_dark,
46
- labels: {
47
- style: {
48
- fontFamily: typography.font_family_base,
49
- color: colors.text_dk_lighter,
50
- fontWeight: typography.bold,
51
- fontSize: typography.text_smaller,
52
- },
53
- },
54
- title: {
55
- style: {
56
- color: colors.text_dk_default,
57
- fontFamily: typography.font_family_base,
58
- fontWeight: typography.regular,
59
- fontSize: typography.heading_4,
60
- },
61
- },
62
- },
63
- yAxis: {
64
- alternateGridColor: undefined,
65
- minorTickInterval: null,
66
- gridLineColor: colors.border_dark,
67
- minorGridLineColor: colors.border_dark,
68
- lineWidth: 0,
69
- tickWidth: 0,
70
- labels: {
71
- style: {
72
- fontFamily: typography.font_family_base,
73
- color: colors.text_dk_lighter,
74
- fontWeight: typography.bold,
75
- fontSize: typography.text_smaller,
76
- },
77
- },
78
- title: {
79
- style: {
80
- fontFamily: typography.font_family_base,
81
- color: colors.text_dk_lighter,
82
- fontWeight: typography.bold,
83
- fontSize: typography.text_smaller,
84
- },
85
- },
86
- },
87
- legend: {
88
- layout: 'horizontal',
89
- align: 'center',
90
- verticalAlign: 'bottom',
91
- itemStyle: {
92
- fontFamily: typography.font_family_base,
93
- color: colors.text_dk_light,
94
- fontWeight: typography.regular,
95
- fontSize: typography.text_smaller,
96
- },
97
- itemHoverStyle: {
98
- color: colors.text_dk_default,
99
- },
100
- itemHiddenStyle: {
101
- color: colors.text_dk_lighter,
102
- },
103
- },
104
- tooltip: {
105
- backgroundColor: {
106
- linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
107
- stops: [
108
- [0, colors.card_light],
109
- [1, colors.card_light],
110
- ],
111
- },
112
- shadow: false,
113
- borderWidth: 0,
114
- borderRadius: 10,
115
- style: {
116
- fontFamily: typography.font_family_base,
117
- color: colors.text_lt_default,
118
- fontWeight: typography.regular,
119
- fontSize: typography.text_smaller,
120
- },
121
- },
122
- // specific to gauge
123
- // unfilled gauge color
124
- pane: {
125
- background: {
126
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
127
- // @ts-ignore
128
- borderColor: colors.border_dark,
129
- },
130
- },
131
-
132
- plotOptions: {
133
- series: {
134
- borderColor: colors.bg_dark_card,
135
- borderWidth: 2,
136
- threshold: null,
137
- },
138
- // PIE STYLES
139
- pie: {
140
- colors: [
141
- colors.data_1,
142
- colors.data_2,
143
- colors.data_3,
144
- colors.data_4,
145
- colors.data_5,
146
- colors.data_6,
147
- colors.data_7,
148
- ],
149
- dataLabels: {
150
- style: {
151
- fontFamily: typography.font_family_base,
152
- fontSize: typography.text_smaller,
153
- color: colors.text_dk_light,
154
- fontWeight: typography.regular,
155
- },
156
- },
157
- },
158
-
159
- // LINE CHART STYLES
160
- line: {
161
- dataLabels: {
162
- color: colors.text_dk_light,
163
- },
164
- marker: {
165
- lineColor: colors.border_dark,
166
- },
167
- }
168
- },
169
- credits: {
170
- enabled: false
171
- },
172
- }
173
-
174
- export { highchartsDarkTheme }