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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.jsx +56 -0
  3. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom.md +10 -0
  4. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.html.erb +64 -0
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_custom_rails.md +10 -0
  6. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
  7. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  8. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.md +1 -1
  9. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.html.erb +135 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.jsx +147 -0
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_disabled.md +1 -0
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  13. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
  14. data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_description.md +6 -1
  15. data/app/pb_kits/playbook/pb_pb_circle_chart/docs/_description.md +6 -1
  16. data/app/pb_kits/playbook/pb_pb_gauge_chart/docs/_description.md +6 -1
  17. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +6 -1
  18. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.jsx +71 -0
  19. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_height.md +1 -0
  20. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.jsx +71 -0
  21. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_min_height.md +1 -0
  22. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +2 -0
  23. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +3 -1
  24. metadata +13 -113
  25. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.html.erb +0 -26
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +0 -55
  27. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.md +0 -2
  28. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +0 -42
  29. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  30. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +0 -26
  31. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +0 -55
  32. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +0 -26
  33. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +0 -69
  34. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +0 -3
  35. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.html.erb +0 -58
  36. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +0 -64
  37. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +0 -14
  38. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +0 -40
  39. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.html.erb +0 -15
  40. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +0 -48
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +0 -62
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +0 -136
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +0 -17
  44. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
  45. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -52
  46. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
  47. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -86
  48. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
  49. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb +0 -20
  50. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +0 -46
  51. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md +0 -2
  52. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
  53. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -55
  54. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
  55. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +0 -1
  56. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -28
  57. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -11
  58. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +0 -26
  59. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +0 -88
  60. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +0 -20
  61. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +0 -44
  62. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_rails.md +0 -2
  63. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +0 -2
  64. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +0 -20
  65. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +0 -43
  66. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +0 -5
  67. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
  68. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +0 -38
  69. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
  70. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +0 -152
  71. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +0 -86
  72. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +0 -142
  73. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +0 -14
  74. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +0 -63
  75. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +0 -22
  76. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +0 -45
  77. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
  78. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +0 -61
  79. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
  80. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +0 -41
  81. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
  82. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +0 -55
  83. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +0 -1
  84. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -26
  85. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -11
  86. data/app/pb_kits/playbook/pb_gauge/docs/_description.md +0 -1
  87. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.html.erb +0 -12
  88. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +0 -36
  89. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_rails.md +0 -2
  90. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors_react.md +0 -2
  91. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +0 -32
  92. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +0 -146
  93. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_rails.md +0 -1
  94. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex_react.md +0 -1
  95. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.html.erb +0 -11
  96. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +0 -30
  97. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.html.erb +0 -12
  98. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +0 -36
  99. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.html.erb +0 -14
  100. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +0 -49
  101. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.html.erb +0 -15
  102. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +0 -62
  103. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +0 -76
  104. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.html.erb +0 -15
  105. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +0 -54
  106. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.md +0 -1
  107. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.html.erb +0 -27
  108. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +0 -80
  109. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.md +0 -2
  110. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.html.erb +0 -14
  111. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +0 -38
  112. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.html.erb +0 -29
  113. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +0 -72
  114. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units_react.md +0 -1
  115. data/app/pb_kits/playbook/pb_gauge/docs/example.yml +0 -27
  116. data/app/pb_kits/playbook/pb_gauge/docs/index.js +0 -11
  117. data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +0 -1
  118. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.html.erb +0 -26
  119. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors.jsx +0 -56
  120. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_rails.md +0 -2
  121. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_colors_react.md +0 -3
  122. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +0 -26
  123. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +0 -52
  124. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +0 -26
  125. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +0 -70
  126. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.md +0 -3
  127. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +0 -15
  128. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +0 -43
  129. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.html.erb +0 -16
  130. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +0 -49
  131. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +0 -62
  132. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +0 -129
  133. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +0 -14
  134. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +0 -18
  135. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +0 -6
@@ -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 +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 gaugeTheme.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,12 +0,0 @@
1
- <% data = [
2
- {
3
- name: 'Name',
4
- value: 67,
5
- }
6
- ]%>
7
-
8
- <%= pb_rails("gauge", props: {
9
- id: "gauge-colors",
10
- chart_data: data,
11
- colors: ['data-7']
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
- import colors from '../../tokens/exports/_colors.module.scss'
8
-
9
- HighchartsMore(Highcharts);
10
- SolidGauge(Highcharts);
11
-
12
- const data = [{ name: "Name", y: 67 }]
13
-
14
- const baseOptions = {
15
- series: [{ data: data }],
16
- plotOptions: {
17
- solidgauge: {
18
- borderColor: colors.data_7,
19
- }
20
- },
21
- };
22
-
23
- const GaugeColors = () => {
24
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
25
-
26
- return (
27
- <div>
28
- <HighchartsReact
29
- highcharts={Highcharts}
30
- options={options}
31
- />
32
- </div>
33
- );
34
- };
35
-
36
- export default GaugeColors;
@@ -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 **ONE** desired value `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,2 +0,0 @@
1
- Custom data colors allow for color customization to match the needs of business requirements.
2
- Pass the prop `plotOptions.solidgauge.borderColor` with a Playbook token like `colors.` + `data_1 | data_2 | data_3 | data_4 | data_5 | data_6 | data_7 | data_8`. Hex colors are also available `eg: #CA0095`
@@ -1,32 +0,0 @@
1
- <%= pb_rails("flex", props: {wrap: true, padding: "xl", gap: "sm"}) do %>
2
- <%= pb_rails("flex/flex_item", props: {flex: 1, grow: true }) do %>
3
- <%= pb_rails("card", props: {max_width: "xs", padding: "md", }) do %>
4
- <%= pb_rails("title", props: {padding_bottom: "sm", size: 4, text: "Abandoned Calls" })%>
5
- <%= pb_rails("flex", props: {align: "stretch"}) do %>
6
- <%= pb_rails("flex", props: {margin_right: "sm", orientation: "column"}) do %>
7
- <%= pb_rails("body", props: {color: "light", padding_bottom: "sm",text: "Total Abandoned"}) %>
8
- <%= pb_rails("flex", props: {align: "baseline", padding_bottom: "sx"}) do %>
9
- <%= pb_rails("title", props: {size: 1, text: "39"})%>
10
- <%= pb_rails("title", props: {color: "light", size: 3, text: "calls"}) %>
11
- <% end %>
12
- <%= pb_rails("caption", props: {size: "xs", text: "of 390" }) %>
13
- <%end %>
14
- <%= pb_rails("section_separator", props: {align_self: "stretch", margin_right: "sm", orientation: "vertical" }) %>
15
- <%= pb_rails("flex", props: {orientation: "column", wrap: true}) do %>
16
- <%= pb_rails("body", props: {color: "light", text: "% Abandoned"}) %>
17
- <%= pb_rails("flex", props: {wrap: true}) do %>
18
- <%= pb_rails("flex/flex_item", props: {fixed_size: "150px", overflow: "hidden", shrink: true}) do %>
19
- <%= pb_rails("gauge", props: {
20
- chart_data: [{ name: "Name", value: 10 }],
21
- disable_animation: true,
22
- height: '150',
23
- id: "gauge-complex",
24
- suffix: "%"
25
- }) %>
26
- <% end %>
27
- <% end %>
28
- <% end %>
29
- <%end %>
30
- <% end %>
31
- <% end %>
32
- <% end %>
@@ -1,146 +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 Card from '../../pb_card/_card'
6
- import Caption from '../../pb_caption/_caption'
7
- import Body from '../../pb_body/_body'
8
- import SectionSeparator from '../../pb_section_separator/_section_separator'
9
- import Title from '../../pb_title/_title'
10
- import gaugeTheme from '../gaugeTheme'
11
- import Highcharts from "highcharts"
12
- import HighchartsReact from "highcharts-react-official"
13
- import HighchartsMore from "highcharts/highcharts-more"
14
- import SolidGauge from "highcharts/modules/solid-gauge"
15
- import colors from '../../tokens/exports/_colors.module.scss'
16
- import typography from '../../tokens/exports/_typography.module.scss'
17
-
18
- HighchartsMore(Highcharts);
19
- SolidGauge(Highcharts);
20
-
21
- const data = [{ name: "Name", y: 10 }];
22
-
23
- const baseOptions = {
24
- series: [{ data: data }],
25
- chart: {
26
- height: "150",
27
- },
28
- plotOptions: {
29
- series: {
30
- animation: false,
31
- },
32
- solidgauge: {
33
- dataLabels: {
34
- format:
35
- `<span class="fix">{y:,f}</span>` +
36
- `<span style="fill: ${colors.text_lt_light}; font-size: ${typography.text_larger};">%</span>`,
37
- },
38
- },
39
- },
40
- };
41
-
42
- const options = Highcharts.merge({}, gaugeTheme, baseOptions);
43
-
44
- const GaugeComplex = (props) => (
45
- <Flex
46
- gap="sm"
47
- padding="xl"
48
- wrap
49
- {...props}
50
- >
51
- <FlexItem
52
- flex={1}
53
- grow
54
- {...props}
55
- >
56
- <Card
57
- maxWidth="xs"
58
- padding="md"
59
- {...props}
60
- >
61
- <Title
62
- paddingBottom="sm"
63
- size={4}
64
- text="Abandoned Calls"
65
- {...props}
66
- />
67
- <Flex
68
- align="stretch"
69
- {...props}
70
- >
71
- <Flex
72
- marginRight="sm"
73
- orientation="column"
74
- {...props}
75
- >
76
- <Body
77
- color="light"
78
- paddingBottom="sm"
79
- text="Total Abandoned"
80
- {...props}
81
- />
82
- <Flex
83
- align="baseline"
84
- paddingBottom="xs"
85
- {...props}
86
- >
87
- <Title
88
- size={1}
89
- text="39"
90
- {...props}
91
- />
92
- <Title
93
- color="light"
94
- size={3}
95
- text="calls"
96
- {...props}
97
- />
98
- </Flex>
99
- <Caption
100
- size="xs"
101
- text="of 390"
102
- {...props}
103
- />
104
- </Flex>
105
-
106
- <SectionSeparator
107
- alignSelf="stretch"
108
- marginRight="sm"
109
- orientation="vertical"
110
- {...props}
111
- />
112
-
113
- <Flex
114
- orientation="column"
115
- wrap
116
- {...props}
117
- >
118
- <Body
119
- color="light"
120
- text="% Abandoned"
121
- {...props}
122
- />
123
- <Flex
124
- wrap
125
- {...props}
126
- >
127
- <FlexItem
128
- fixedSize="150px"
129
- overflow="hidden"
130
- shrink
131
- {...props}
132
- >
133
- <HighchartsReact
134
- highcharts={Highcharts}
135
- options={options}
136
- />
137
- </FlexItem>
138
- </Flex>
139
- </Flex>
140
- </Flex>
141
- </Card>
142
- </FlexItem>
143
- </Flex>
144
- );
145
-
146
- export default GaugeComplex;
@@ -1 +0,0 @@
1
- We are able to wrap our Gauge kits within multiple other Flex and Card components.
@@ -1 +0,0 @@
1
- We are able to wrap the Highcharts Gauge kit within Playbook kits (such as Flex and Card components).
@@ -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;