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,11 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Name',
4
- value: 45,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-default",
10
- chart_data: data,
11
- }) %>
@@ -1,30 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
-
8
- HighchartsMore(Highcharts);
9
- SolidGauge(Highcharts);
10
-
11
- const data = [{ name: "Name", y: 45 }]
12
-
13
- const baseOptions = {
14
- series: [{ data: data }],
15
- };
16
-
17
- const GaugeDefault = () => {
18
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
19
-
20
- return (
21
- <div>
22
- <HighchartsReact
23
- highcharts={Highcharts}
24
- options={options}
25
- />
26
- </div>
27
- );
28
- };
29
-
30
- export default GaugeDefault;
@@ -1,12 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Participants',
4
- value: 84,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-disable-animation",
10
- chart_data: data,
11
- disable_animation: true,
12
- }) %>
@@ -1,36 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
-
8
- HighchartsMore(Highcharts);
9
- SolidGauge(Highcharts);
10
-
11
- const data = [{ name: "Participants", y: 84 }]
12
-
13
- const baseOptions = {
14
- series: [{ data: data }],
15
- plotOptions: {
16
- series: {
17
- animation: false,
18
- },
19
- },
20
- };
21
-
22
- const GaugeDisableAnimation = () => {
23
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
24
-
25
- return (
26
- <div>
27
- <HighchartsReact
28
- disableAnimation
29
- highcharts={Highcharts}
30
- options={options}
31
- />
32
- </div>
33
- );
34
- };
35
-
36
- export default GaugeDisableAnimation;
@@ -1,14 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Capacity',
4
- value: 75,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "full-circle",
10
- chart_data: data,
11
- full_circle: true,
12
- title: "Seating Capacity",
13
- suffix: "%"
14
- }) %>
@@ -1,49 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
- import colors from '../../tokens/exports/_colors.module.scss'
8
- import typography from '../../tokens/exports/_typography.module.scss'
9
-
10
- HighchartsMore(Highcharts);
11
- SolidGauge(Highcharts);
12
-
13
- const data = [{ name: "Capacity", y: 75 }]
14
-
15
- const baseOptions = {
16
- title: {
17
- text: "Seating Capacity",
18
- },
19
- series: [{ data: data }],
20
- pane: {
21
- startAngle: 0,
22
- endAngle: 360,
23
- },
24
- plotOptions: {
25
- solidgauge: {
26
- dataLabels: {
27
- format:
28
- `<span class="fix">{y:,f}</span>` +
29
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">%</span>`,
30
- },
31
- },
32
- },
33
- };
34
-
35
- const GaugeFullCircle = () => {
36
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
37
-
38
- return (
39
- <div>
40
- <HighchartsReact
41
- highcharts={Highcharts}
42
- id="gauge-full-circle"
43
- options={options}
44
- />
45
- </div>
46
- );
47
- };
48
-
49
- export default GaugeFullCircle;
@@ -1,15 +0,0 @@
1
- <%= pb_rails("gauge", props: {
2
- id: "gauge-height-px",
3
- chart_data: [{ name: "Pixels", value: 400 }],
4
- height: '400',
5
- title: "Fixed Height in Pixels",
6
- suffix: "px"
7
- }) %>
8
-
9
- <%= pb_rails("gauge", props: {
10
- id: "gauge-height-percent",
11
- chart_data: [{ name: "Percentage", value: 45 }],
12
- height: '45%',
13
- title: "Height as Percentage of Width",
14
- suffix: "%"
15
- }) %>
@@ -1,62 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
- import colors from '../../tokens/exports/_colors.module.scss'
8
- import typography from '../../tokens/exports/_typography.module.scss'
9
-
10
- HighchartsMore(Highcharts);
11
- SolidGauge(Highcharts);
12
-
13
- const GaugeHeight = () => {
14
- return (
15
- <div>
16
- <HighchartsReact
17
- highcharts={Highcharts}
18
- options={Highcharts.merge({}, gaugeTheme, {
19
- title: {
20
- text: "Fixed Height in Pixels",
21
- },
22
- chart: {
23
- height: "400",
24
- },
25
- series: [{ data: [{ name: "Pixels", y: 400 }] }],
26
- plotOptions: {
27
- solidgauge: {
28
- dataLabels: {
29
- format:
30
- `<span class="fix">{y:,f}</span>` +
31
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">px</span>`,
32
- },
33
- },
34
- },
35
- })}
36
- />
37
- <HighchartsReact
38
- highcharts={Highcharts}
39
- options={Highcharts.merge({}, gaugeTheme, {
40
- title: {
41
- text: "Height as Percentage of Width",
42
- },
43
- chart: {
44
- height: "45%",
45
- },
46
- series: [{ data: [{ name: "Percentage", y: 45 }] }],
47
- plotOptions: {
48
- solidgauge: {
49
- dataLabels: {
50
- format:
51
- `<span class="fix">{y:,f}</span>` +
52
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">%</span>`,
53
- },
54
- },
55
- },
56
- })}
57
- />
58
- </div>
59
- );
60
- };
61
-
62
- export default GaugeHeight;
@@ -1,76 +0,0 @@
1
- import React, { useState, useRef } from 'react'
2
- import Button from '../../pb_button/_button'
3
- import gaugeTheme from '../gaugeTheme'
4
- import Highcharts from "highcharts"
5
- import HighchartsReact from "highcharts-react-official"
6
- import HighchartsMore from "highcharts/highcharts-more"
7
- import SolidGauge from "highcharts/modules/solid-gauge"
8
-
9
- HighchartsMore(Highcharts);
10
- SolidGauge(Highcharts);
11
-
12
- const GaugeLiveData = (props) => {
13
- const [value, setValue] = useState(50)
14
- const [name, setName] = useState('Name')
15
- const chartRef = useRef(null)
16
-
17
- const namesArray = ['Name', 'Windows', 'Doors', 'Roofing', 'Siding', 'Gutters']
18
-
19
- const updateValue = () => {
20
- const newValue = Math.floor(Math.random() * 100)
21
- setValue(newValue)
22
-
23
- const chart = chartRef.current?.chart
24
- if (chart) {
25
- chart.series[0].points[0].update(newValue)
26
- }
27
- }
28
-
29
- const updateName = () => {
30
- let index = namesArray.indexOf(name)
31
- if (namesArray.indexOf(name) == 5) {
32
- index = 0
33
- } else {
34
- index += 1
35
- }
36
- setName(namesArray[index])
37
-
38
- const chart = chartRef.current?.chart
39
- if (chart) {
40
- chart.series[0].points[0].update({ name: namesArray[index] })
41
- }
42
- }
43
-
44
- const options = Highcharts.merge({}, gaugeTheme,
45
- {
46
- title: {
47
- text: name,
48
- },
49
- series: [{
50
- data: [{ name: name, y: value }]
51
- }]
52
- }
53
- )
54
-
55
- return (
56
- <div>
57
- <Button
58
- onClick={updateValue}
59
- text="Update Value"
60
- {...props}
61
- />
62
- <Button
63
- onClick={updateName}
64
- text="Update Name"
65
- {...props}
66
- />
67
- <HighchartsReact
68
- highcharts={Highcharts}
69
- options={options}
70
- ref={chartRef}
71
- />
72
- </div>
73
- )
74
- }
75
-
76
- export default GaugeLiveData
@@ -1,15 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Rating',
4
- value: 4.5,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-min-max",
10
- chart_data: data,
11
- min: 0,
12
- max: 5,
13
- show_labels: true,
14
- title: "Product Rating"
15
- }) %>
@@ -1,54 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
- import colors from '../../tokens/exports/_colors.module.scss'
8
- import typography from '../../tokens/exports/_typography.module.scss'
9
-
10
- HighchartsMore(Highcharts);
11
- SolidGauge(Highcharts);
12
-
13
- const data = [{ name: "Rating", y: 4.5 }]
14
-
15
- const baseOptions = {
16
- title: {
17
- text: "Product Rating",
18
- },
19
- yAxis: {
20
- min: 0,
21
- max: 5,
22
- lineWidth: 0,
23
- tickWidth: 0,
24
- minorTickInterval: null,
25
- tickAmount: 2,
26
- tickPositions: [0, 5],
27
- labels: {
28
- y: 26,
29
- enabled: true,
30
- style: {
31
- color: colors.neutral,
32
- fontFamily: typography.font_family_base,
33
- fontWeight: typography.bold,
34
- }
35
- },
36
- },
37
- series: [{ data: data }],
38
- };
39
-
40
- const GaugeMinMax = () => {
41
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
42
-
43
- return (
44
- <div>
45
- <HighchartsReact
46
- highcharts={Highcharts}
47
- id="gauge-min-max"
48
- options={options}
49
- />
50
- </div>
51
- );
52
- };
53
-
54
- export default GaugeMinMax;
@@ -1 +0,0 @@
1
- ### Min defaults to 0, Max to 100.
@@ -1,27 +0,0 @@
1
- <%= pb_rails("flex", props: {wrap: true, align: "center"}) do %>
2
- <%= pb_rails("flex/flex_item", props: {fixed_size: "400px", overflow: "hidden", shrink: true }) do %>
3
- <%= pb_rails("gauge", props: {
4
- id: "gauge-sizing4",
5
- chart_data: [{ name: "Point 1", value: 100 }],
6
- }) %>
7
- <% end %>
8
- <%= pb_rails("flex/flex_item", props: {fixed_size: "300px", overflow: "hidden", shrink: true }) do %>
9
- <%= pb_rails("gauge", props: {
10
- id: "gauge-sizing3",
11
- chart_data: [{ name: "Point 2", value: 75 }],
12
- }) %>
13
- <% end %>
14
- <%= pb_rails("flex/flex_item", props: {fixed_size: "200px", overflow: "hidden", shrink: true }) do %>
15
- <%= pb_rails("gauge", props: {
16
- id: "gauge-sizing2",
17
- chart_data: [{ name: "Point 3", value: 50 }],
18
- }) %>
19
- <% end %>
20
- <%= pb_rails("flex/flex_item", props: {fixed_size: "125px", overflow: "hidden", shrink: true }) do %>
21
- <%= pb_rails("gauge", props: {
22
- id: "gauge-sizing1",
23
- height: '100%',
24
- chart_data: [{ name: "Point 4", value: 25 }],
25
- }) %>
26
- <% end %>
27
- <% end %>
@@ -1,80 +0,0 @@
1
- import React from 'react'
2
-
3
- import Flex from '../../pb_flex/_flex'
4
- import FlexItem from '../../pb_flex/_flex_item'
5
- import gaugeTheme from '../gaugeTheme'
6
- import Highcharts from "highcharts"
7
- import HighchartsReact from "highcharts-react-official"
8
- import HighchartsMore from "highcharts/highcharts-more"
9
- import SolidGauge from "highcharts/modules/solid-gauge"
10
-
11
- HighchartsMore(Highcharts);
12
- SolidGauge(Highcharts);
13
-
14
- const GaugeSizing = (props) => (
15
- <div>
16
- <Flex
17
- align="center"
18
- wrap
19
- {...props}
20
- >
21
- <FlexItem
22
- fixedSize="400px"
23
- overflow="hidden"
24
- shrink
25
- {...props}
26
- >
27
- <HighchartsReact
28
- highcharts={Highcharts}
29
- options={Highcharts.merge({}, gaugeTheme, {
30
- series: [{ data: [{ name: "Point 1", y: 100 }] }],
31
- })}
32
- />
33
- </FlexItem>
34
- <FlexItem
35
- fixedSize="300px"
36
- overflow="hidden"
37
- shrink
38
- {...props}
39
- >
40
- <HighchartsReact
41
- highcharts={Highcharts}
42
- options={Highcharts.merge({}, gaugeTheme, {
43
- series: [{ data: [{ name: "Point 2", y: 75 }] }],
44
- })}
45
- />
46
- </FlexItem>
47
- <FlexItem
48
- fixedSize="200px"
49
- overflow="hidden"
50
- shrink
51
- {...props}
52
- >
53
- <HighchartsReact
54
- highcharts={Highcharts}
55
- options={Highcharts.merge({}, gaugeTheme, {
56
- series: [{ data: [{ name: "Point 3", y: 50 }] }],
57
- })}
58
- />
59
- </FlexItem>
60
- <FlexItem
61
- fixedSize="125px"
62
- overflow="hidden"
63
- shrink
64
- {...props}
65
- >
66
- <HighchartsReact
67
- highcharts={Highcharts}
68
- options={Highcharts.merge({}, gaugeTheme, {
69
- chart: {
70
- height: "100%",
71
- },
72
- series: [{ data: [{ name: "Point 4", y: 25 }] }],
73
- })}
74
- />
75
- </FlexItem>
76
- </Flex>
77
- </div>
78
- )
79
-
80
- export default GaugeSizing
@@ -1,2 +0,0 @@
1
- ### Gauge resizes dynamically to fit whatever element it's placed within.
2
- #### Note: set `overflow` to hidden on the parent element when nesting gauges inside of a flex items to best respond to shrinking screens.
@@ -1,14 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Score',
4
- value: 780,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-title",
10
- chart_data: data,
11
- min: 300,
12
- max: 850,
13
- title: "Credit Score",
14
- }) %>
@@ -1,38 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
-
8
- HighchartsMore(Highcharts);
9
- SolidGauge(Highcharts);
10
-
11
- const data = [{ name: "Score", y: 780 }]
12
-
13
- const baseOptions = {
14
- title: {
15
- text: "Credit Score",
16
- },
17
- yAxis: {
18
- min: 300,
19
- max: 850,
20
- },
21
- series: [{ data: data }],
22
- };
23
-
24
- const GaugeTitle = () => {
25
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
26
-
27
- return (
28
- <div>
29
- <HighchartsReact
30
- highcharts={Highcharts}
31
- id="gauge-title"
32
- options={options}
33
- />
34
- </div>
35
- );
36
- };
37
-
38
- export default GaugeTitle;
@@ -1,29 +0,0 @@
1
- <% data1 = [
2
- {
3
- name: 'Data Used',
4
- value: 32,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-units1",
10
- chart_data: data1,
11
- title: "Data Usage",
12
- suffix: "GB"
13
- }) %>
14
-
15
- <% data2 = [
16
- {
17
- name: 'Sales to Date',
18
- value: 65,
19
- }
20
- ]%>
21
-
22
- <%= pb_rails("gauge", props: {
23
- id: "gauge-units2",
24
- chart_data: data2,
25
- title: "Sales Goal",
26
- prefix: "$",
27
- suffix: "k",
28
-
29
- }) %>
@@ -1,72 +0,0 @@
1
- import React from 'react'
2
- import gaugeTheme from '../gaugeTheme'
3
- import Highcharts from "highcharts"
4
- import HighchartsReact from "highcharts-react-official"
5
- import HighchartsMore from "highcharts/highcharts-more"
6
- import SolidGauge from "highcharts/modules/solid-gauge"
7
- import colors from '../../tokens/exports/_colors.module.scss'
8
- import typography from '../../tokens/exports/_typography.module.scss'
9
-
10
- HighchartsMore(Highcharts);
11
- SolidGauge(Highcharts);
12
-
13
- const data1 = [
14
- { name: 'Data Used', y: 32 },
15
- ]
16
- const data2 = [
17
- { name: 'Sales to Date', y: 65 },
18
- ]
19
-
20
- const baseOptions1 = {
21
- title: {
22
- text: "Data Usage",
23
- },
24
- series: [{ data: data1 }],
25
- plotOptions: {
26
- solidgauge: {
27
- dataLabels: {
28
- format:
29
- `<span class="fix">{y:,f}</span>` +
30
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">GB</span>`,
31
- },
32
- },
33
- },
34
- };
35
- const baseOptions2 = {
36
- title: {
37
- text: "Sales Goal",
38
- },
39
- series: [{ data: data2 }],
40
- plotOptions: {
41
- solidgauge: {
42
- dataLabels: {
43
- format:
44
- `<span y="28" style="fill: ${colors.text_lt_light}; font-size: ${typography.text_base};">$</span>` +
45
- `<span class="fix" y="38">{y:,f}</span>` +
46
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">k</span>`,
47
- },
48
- },
49
- },
50
- };
51
-
52
- const GaugeUnits = () => {
53
- const options1 = Highcharts.merge({}, gaugeTheme, baseOptions1);
54
- const options2 = Highcharts.merge({}, gaugeTheme, baseOptions2);
55
-
56
- return (
57
- <div>
58
- <HighchartsReact
59
- highcharts={Highcharts}
60
- id="gauge-units1"
61
- options={options1}
62
- />
63
- <HighchartsReact
64
- highcharts={Highcharts}
65
- id="gauge-units2"
66
- options={options2}
67
- />
68
- </div>
69
- );
70
- };
71
-
72
- export default GaugeUnits;
@@ -1 +0,0 @@
1
- Use custom CSS with classes or inline styles (as shown in these docs) to customize the appearance of prefix and suffix units.
@@ -1,27 +0,0 @@
1
- examples:
2
-
3
- rails:
4
- - gauge_default: Default
5
- - gauge_disable_animation: Disable Animation
6
- - gauge_title: Title
7
- - gauge_units: Units
8
- - gauge_full_circle: Full Circle
9
- - gauge_min_max: Min Max Labels
10
- - gauge_sizing: Sizing
11
- - gauge_height: Height
12
- - gauge_colors: Color Overrides
13
- - gauge_complex: Complex
14
-
15
-
16
- react:
17
- - gauge_default: Default
18
- - gauge_disable_animation: Disable Animation
19
- - gauge_title: Title
20
- - gauge_units: Units
21
- - gauge_full_circle: Full Circle
22
- - gauge_min_max: Min Max Labels
23
- - gauge_sizing: Sizing
24
- - gauge_height: Height
25
- - gauge_live_data: Live Data
26
- - gauge_colors: Color Overrides
27
- - gauge_complex: Complex