playbook_ui_docs 14.22.0.pre.alpha.popoverkittransitionpoppertofloatingui8736 → 14.22.0.pre.alpha.popoverkittransitionpoppertofloatingui8856

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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_colors.jsx +33 -15
  3. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +33 -15
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +52 -22
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.md +3 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_horizontal.jsx +12 -16
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +31 -15
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +39 -16
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +86 -38
  10. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +32 -15
  11. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +72 -22
  12. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +1 -1
  13. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx +31 -15
  14. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +37 -16
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +1 -3
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -3
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -2
  18. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +71 -26
  19. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +29 -16
  20. data/app/pb_kits/playbook/pb_circle_chart/docs/{_circle_chart_colors.md → _circle_chart_colors_rails.md} +1 -1
  21. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors_react.md +2 -0
  22. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +28 -16
  23. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.md +4 -2
  24. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +23 -15
  25. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +81 -51
  26. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +103 -75
  27. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +3 -6
  28. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +19 -13
  29. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +30 -17
  30. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +34 -20
  31. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +29 -20
  32. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +28 -20
  33. data/app/pb_kits/playbook/pb_circle_chart/docs/_description.md +1 -0
  34. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -1
  35. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +0 -1
  36. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open.html.erb +14 -0
  37. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_click_open_rails.md +1 -0
  38. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +1 -0
  39. data/dist/playbook-doc.js +1 -19
  40. metadata +9 -10
  41. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +0 -72
  42. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +0 -6
  43. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +0 -64
  44. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +0 -1
  45. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +0 -38
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +0 -1
  47. /data/app/pb_kits/playbook/pb_tooltip/docs/{_tooltip_click_open.md → _tooltip_click_open_react.md} +0 -0
@@ -1,32 +1,41 @@
1
1
  import React from 'react'
2
-
3
- import CircleChart from '../_circle_chart'
2
+ import circleChartTheme from '../circleChartTheme'
3
+ import Highcharts from "highcharts"
4
+ import HighchartsReact from "highcharts-react-official"
4
5
 
5
6
  const dataWithLegend = [{
6
7
  name: 'Bugs',
7
- value: 8,
8
-
8
+ y: 8,
9
9
  },
10
10
  {
11
11
  name: 'Chores',
12
- value: 1,
13
-
12
+ y: 1,
14
13
  },
15
14
  {
16
15
  name: 'Stories',
17
- value: 12,
18
- },
19
- ]
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)
20
30
 
21
- const CircleChartWithLegendKit = (props) => (
22
- <div>
23
- <CircleChart
24
- chartData={dataWithLegend}
25
- id="with-legend-example"
26
- legend
27
- {...props}
28
- />
29
- </div>
30
- )
31
+ return (
32
+ <div>
33
+ <HighchartsReact
34
+ highcharts={Highcharts}
35
+ options={options}
36
+ />
37
+ </div>
38
+ )
39
+ }
31
40
 
32
- export default CircleChartWithLegendKit
41
+ export default CircleChartWithLegendKit
@@ -1,47 +1,55 @@
1
1
  import React from 'react'
2
-
3
- import CircleChart from '../_circle_chart'
2
+ import circleChartTheme from '../circleChartTheme'
3
+ import Highcharts from "highcharts"
4
+ import HighchartsReact from "highcharts-react-official"
4
5
 
5
6
  const dataWithTitle = [
6
7
  {
7
8
  name: 'Facebook',
8
- value: 2498,
9
+ y: 2498,
9
10
  },
10
11
  {
11
12
  name: 'YouTube',
12
- value: 2000,
13
+ y: 2000,
13
14
  },
14
15
  {
15
16
  name: 'WhatsApp',
16
- value: 2000,
17
+ y: 2000,
17
18
  },
18
19
  {
19
20
  name: 'Facebook Messenger',
20
- value: 1300,
21
+ y: 1300,
21
22
  },
22
23
  {
23
24
  name: 'WeChat',
24
- value: 1165,
25
+ y: 1165,
25
26
  },
26
27
  {
27
28
  name: 'Instagram',
28
- value: 1000,
29
+ y: 1000,
29
30
  },
30
31
  {
31
32
  name: 'Tik Tok',
32
- value: 800,
33
+ y: 800,
33
34
  },
34
35
  ]
35
36
 
36
- const CircleChartWithLegendKit = (props) => (
37
- <div>
38
- <CircleChart
39
- chartData={dataWithTitle}
40
- id="with-title-example"
41
- title="Active Users on Social Media"
42
- {...props}
43
- />
44
- </div>
45
- )
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
+ }
46
54
 
47
- export default CircleChartWithLegendKit
55
+ export default CircleChartWithTitle
@@ -0,0 +1 @@
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.
@@ -14,7 +14,6 @@ examples:
14
14
 
15
15
  react:
16
16
  - circle_chart_default: Default Style
17
- - circle_chart_pb_styles: Playbook Styles
18
17
  - circle_chart_live_data: Live Data
19
18
  - circle_chart_rounded: Rounded Corners
20
19
  - circle_chart_block: Accepts Any Block
@@ -9,4 +9,3 @@ export { default as CircleChartLegendPosition } from './_circle_chart_legend_pos
9
9
  export { default as CircleChartWithTitle } from './_circle_chart_with_title.jsx'
10
10
  export { default as CircleChartInnerSizes } from './_circle_chart_inner_sizes.jsx'
11
11
  export { default as CircleChartCustomTooltip } from "./_circle_chart_custom_tooltip.jsx"
12
- export { default as CircleChartPbStyles } from "./_circle_chart_pb_styles.jsx"
@@ -0,0 +1,14 @@
1
+ <%= pb_rails("button", props: {
2
+ text: "Click to Open",
3
+ id: "click-tooltip-trigger-1",
4
+ variant: "primary"
5
+ }) %>
6
+
7
+ <%= pb_rails("tooltip", props: {
8
+ trigger_element_selector: "#click-tooltip-trigger-1",
9
+ tooltip_id: "click-tooltip-1",
10
+ position: "top",
11
+ use_click_to_open: true
12
+ }) do %>
13
+ Tooltip opened by click! Click trigger again to close.
14
+ <% end %>
@@ -0,0 +1 @@
1
+ Set the prop `use_click_to_open` as `true` so that the tooltip will only appear when an item is clicked rather than hovered over.
@@ -9,6 +9,7 @@ examples:
9
9
  - tooltip_with_icon_circle: Icon Circle Tooltip
10
10
  - tooltip_delay_rails: Delay
11
11
  - tooltip_show_tooltip: Show Tooltip
12
+ - tooltip_click_open: Click to Open
12
13
 
13
14
  react:
14
15
  - tooltip_default_react: Default