playbook_ui_docs 15.2.0.pre.alpha.PLAY1978bugiconauto11317 → 15.2.0.pre.alpha.PLAY236711331

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 (25) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_button/docs/_button_loading.html.erb +7 -3
  3. data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +29 -0
  4. data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -1
  5. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_description.md +3 -0
  6. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.html.erb +34 -0
  7. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.jsx +52 -0
  8. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_colors.md +5 -0
  9. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.html.erb +34 -0
  10. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_default.jsx +45 -0
  11. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.html.erb +47 -0
  12. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.jsx +64 -0
  13. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_height.md +3 -0
  14. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.html.erb +24 -0
  15. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend.jsx +37 -0
  16. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.html.erb +39 -0
  17. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_nonclickable.jsx +45 -0
  18. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.html.erb +86 -0
  19. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.jsx +116 -0
  20. data/app/pb_kits/playbook/pb_pb_line_graph/docs/_pb_line_graph_legend_position.md +11 -0
  21. data/app/pb_kits/playbook/pb_pb_line_graph/docs/example.yml +20 -0
  22. data/app/pb_kits/playbook/pb_pb_line_graph/docs/index.js +6 -0
  23. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.html.erb +2 -2
  24. data/dist/playbook-doc.js +2 -2
  25. metadata +19 -1
@@ -0,0 +1,116 @@
1
+ import React from 'react'
2
+ import PbLineGraph from '../../pb_pb_line_graph/_pb_line_graph'
3
+ import Title from '../../pb_title/_title'
4
+
5
+ const data = [{
6
+ name: 'Installation',
7
+ data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
8
+ }, {
9
+ name: 'Manufacturing',
10
+ data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
11
+ }, {
12
+ name: 'Sales & Distribution',
13
+ data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
14
+ }, {
15
+ name: 'Project Development',
16
+ data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
17
+ }, {
18
+ name: 'Other',
19
+ data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
20
+ }]
21
+
22
+ const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']
23
+
24
+ const chartOptionsFirst = {
25
+ title: { text: "Alignment of Legend" },
26
+ series: data,
27
+ xAxis: {
28
+ categories: categories,
29
+ },
30
+ yAxis: {
31
+ min: 0,
32
+ title: {
33
+ text: "Number of Employees",
34
+ },
35
+ },
36
+ legend: {
37
+ enabled: true,
38
+ align: 'right',
39
+ verticalAlign: 'top'
40
+ },
41
+ }
42
+
43
+ const chartOptionsSecond = {
44
+ title: { text: "Layout of Legend" },
45
+ series: data,
46
+ xAxis: {
47
+ categories: categories,
48
+ },
49
+ yAxis: {
50
+ min: 0,
51
+ title: {
52
+ text: "Number of Employees",
53
+ },
54
+ },
55
+ legend: {
56
+ enabled: true,
57
+ layout: 'vertical'
58
+ },
59
+ }
60
+
61
+ const chartOptionsThird = {
62
+ title: { text: "Offset of Legend" },
63
+ series: data,
64
+ xAxis: {
65
+ categories: categories,
66
+ },
67
+ yAxis: {
68
+ min: 0,
69
+ title: {
70
+ text: "Number of Employees",
71
+ },
72
+ },
73
+ legend: {
74
+ enabled: true,
75
+ layout: 'vertical',
76
+ x: 100,
77
+ y: 10
78
+ },
79
+ }
80
+
81
+ const PbLineGraphLegendPosition = (props) => (
82
+ <div>
83
+ <Title
84
+ paddingY="sm"
85
+ size={4}
86
+ tag="h4"
87
+ text="align | verticalAlign"
88
+ />
89
+ <PbLineGraph
90
+ options={chartOptionsFirst}
91
+ {...props}
92
+ />
93
+ <Title
94
+ paddingY="sm"
95
+ size={4}
96
+ tag="h4"
97
+ text="layout"
98
+ />
99
+ <PbLineGraph
100
+ options={chartOptionsSecond}
101
+ {...props}
102
+ />
103
+ <Title
104
+ paddingY="sm"
105
+ size={4}
106
+ tag="h4"
107
+ text="x | y"
108
+ />
109
+ <PbLineGraph
110
+ options={chartOptionsThird}
111
+ {...props}
112
+ />
113
+ </div>
114
+ )
115
+
116
+ export default PbLineGraphLegendPosition
@@ -0,0 +1,11 @@
1
+ Highcharts provides many options for customizing the legend display. This example showcases the following:
2
+
3
+ `align` can be used to align the legend left, right or center (defaults to center)
4
+
5
+ `verticalAlign` can be used to place the legend above the graph. Options are top, middle, bottom with default set to bottom
6
+
7
+ `layout` determines the position of the legend items. Options are horizontal, vertical or proximate with default set to horizontal `layout: proximate` will place the legend items as close as possible to the graphs they're representing. It will also determine whether to place the legend above/below or on the side of the plot area, if the legend is in a corner.
8
+
9
+ `x` offsets the legend relative to its horizontal alignment. Negative x moves it to the left, positive x moves it to the right (defaults to 0)
10
+
11
+ `y` offsets the legend relative to its vertical alignment. Negative y moves it up, positive y moves it down (defaults to 0)
@@ -0,0 +1,20 @@
1
+ examples:
2
+
3
+ rails:
4
+ - pb_line_graph_default: Default
5
+ - pb_line_graph_legend: Legend
6
+ - pb_line_graph_legend_position: Legend Position
7
+ - pb_line_graph_legend_nonclickable: Legend NonClickable
8
+ - pb_line_graph_height: Height
9
+ - pb_line_graph_colors: Color Overrides
10
+
11
+
12
+ react:
13
+ - pb_line_graph_default: Default
14
+ - pb_line_graph_legend: Legend
15
+ - pb_line_graph_legend_position: Legend Position
16
+ - pb_line_graph_legend_nonclickable: Legend NonClickable
17
+ - pb_line_graph_height: Height
18
+ - pb_line_graph_colors: Color Overrides
19
+
20
+
@@ -0,0 +1,6 @@
1
+ export { default as PbLineGraphDefault } from './_pb_line_graph_default.jsx'
2
+ export { default as PbLineGraphLegend } from './_pb_line_graph_legend.jsx'
3
+ export { default as PbLineGraphLegendPosition } from './_pb_line_graph_legend_position.jsx'
4
+ export { default as PbLineGraphLegendNonclickable } from './_pb_line_graph_legend_nonclickable.jsx'
5
+ export { default as PbLineGraphHeight } from './_pb_line_graph_height.jsx'
6
+ export { default as PbLineGraphColors } from './_pb_line_graph_colors.jsx'
@@ -28,9 +28,9 @@
28
28
  popoverButton.onclick = () => {
29
29
  buttonClicked = !buttonClicked
30
30
  if (buttonClicked) {
31
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 5.70312C14.625 5.28125 15.3281 5.28125 15.75 5.70312L24.7969 14.7031C25.2188 15.1719 25.2188 15.875 24.7969 16.2969C24.3281 16.7656 23.625 16.7656 23.2031 16.2969L15 8.09375L6.79688 16.2969C6.32812 16.7656 5.625 16.7656 5.20312 16.2969C4.73438 15.875 4.73438 15.1719 5.20312 14.75L14.2031 5.70312Z" fill="currentColor"/></svg>'
31
+ arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 5.70312C14.625 5.28125 15.3281 5.28125 15.75 5.70312L24.7969 14.7031C25.2188 15.1719 25.2188 15.875 24.7969 16.2969C24.3281 16.7656 23.625 16.7656 23.2031 16.2969L15 8.09375L6.79688 16.2969C6.32812 16.7656 5.625 16.7656 5.20312 16.2969C4.73438 15.875 4.73438 15.1719 5.20312 14.75L14.2031 5.70312Z" fill="currentColor"/></svg>'
32
32
  } else {
33
- arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="1em" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 19.2969L5.20312 10.2969C4.73438 9.875 4.73438 9.17188 5.20312 8.70312C5.625 8.28125 6.32812 8.28125 6.79688 8.70312L15 16.9531L23.2031 8.75C23.625 8.28125 24.3281 8.28125 24.7969 8.75C25.2188 9.17188 25.2188 9.875 24.7969 10.2969L15.75 19.2969C15.3281 19.7656 14.625 19.7656 14.2031 19.2969Z" fill="currentColor"/></svg>'
33
+ arrowDiv.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="auto" height="auto" viewBox="0 0 31 25" fill="none" class="pb_custom_icon svg-inline--fa pb_icon_kit svg_fw" id="" data="{}" aria="{}" tabindex=""><path d="M14.2031 19.2969L5.20312 10.2969C4.73438 9.875 4.73438 9.17188 5.20312 8.70312C5.625 8.28125 6.32812 8.28125 6.79688 8.70312L15 16.9531L23.2031 8.75C23.625 8.28125 24.3281 8.28125 24.7969 8.75C25.2188 9.17188 25.2188 9.875 24.7969 10.2969L15.75 19.2969C15.3281 19.7656 14.625 19.7656 14.2031 19.2969Z" fill="currentColor"/></svg>'
34
34
  }
35
35
  }
36
36
  </script>