playbook_ui 11.11.0 → 11.12.1.pre.alpha.charts1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/index.js +2 -1
  3. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +145 -0
  4. data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +17 -1
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb +62 -0
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +86 -0
  7. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md +17 -0
  8. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
  9. data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
  10. data/app/pb_kits/playbook/pb_button/_button.scss +6 -0
  11. data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +4 -4
  12. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +18 -17
  13. data/app/pb_kits/playbook/pb_circle_chart/ChartsTypes.ts +2 -0
  14. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +216 -0
  15. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.html.erb +9 -21
  16. data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +23 -47
  17. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +86 -0
  18. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +114 -0
  19. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.md +17 -0
  20. data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +2 -0
  21. data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +1 -0
  22. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +16 -0
  23. data/app/pb_kits/playbook/pb_dashboard/{pbChartsDarkTheme.js → pbChartsDarkTheme.ts} +6 -21
  24. data/app/pb_kits/playbook/pb_dashboard/{pbChartsLightTheme.js → pbChartsLightTheme.ts} +6 -21
  25. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +16 -0
  26. data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +50 -50
  27. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_time.jsx +1 -0
  28. data/app/pb_kits/playbook/pb_date_picker/plugins/timeSelect.ts +89 -89
  29. data/app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss +15 -0
  30. data/app/pb_kits/playbook/pb_dialog/_dialog.scss +30 -1
  31. data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +28 -0
  32. data/app/pb_kits/playbook/pb_dialog/dialog.rb +7 -35
  33. data/app/pb_kits/playbook/pb_dialog/dialogHelper.js +21 -0
  34. data/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb +7 -0
  35. data/app/pb_kits/playbook/pb_dialog/dialog_body.rb +13 -0
  36. data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +13 -0
  37. data/app/pb_kits/playbook/pb_dialog/dialog_footer.rb +16 -0
  38. data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +13 -0
  39. data/app/pb_kits/playbook/pb_dialog/dialog_header.rb +3 -20
  40. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.html.erb +12 -0
  41. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.md +3 -1
  42. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.html.erb +11 -0
  43. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.md +3 -0
  44. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes.html.erb +29 -0
  45. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +3 -0
  46. data/app/pb_kits/playbook/pb_gauge/_gauge.scss +4 -0
  47. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +213 -0
  48. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.html.erb +1 -1
  49. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +8 -8
  50. data/app/pb_kits/playbook/pb_gauge/gauge.html.erb +1 -11
  51. data/app/pb_kits/playbook/pb_gauge/gauge.rb +3 -8
  52. data/app/pb_kits/playbook/pb_icon/_icon.tsx +3 -1
  53. data/app/pb_kits/playbook/pb_icon/icon.rb +8 -1
  54. data/app/pb_kits/playbook/pb_icon/icon.test.js +155 -0
  55. data/app/pb_kits/playbook/pb_legend/{_legend.jsx → _legend.tsx} +6 -6
  56. data/app/pb_kits/playbook/pb_legend/legend.test.js +29 -0
  57. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +148 -0
  58. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.html.erb +62 -0
  59. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +83 -0
  60. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.md +17 -0
  61. data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +2 -0
  62. data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
  63. data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +17 -1
  64. data/app/pb_kits/playbook/pb_radio/_radio.scss +1 -1
  65. data/app/pb_kits/playbook/pb_title/_title.scss +5 -0
  66. data/app/pb_kits/playbook/pb_title/_title.tsx +4 -1
  67. data/app/pb_kits/playbook/pb_title/docs/{_title_light.html.erb → _title_default.html.erb} +3 -3
  68. data/app/pb_kits/playbook/pb_title/docs/{_title_light.jsx → _title_default.jsx} +14 -14
  69. data/app/pb_kits/playbook/pb_title/docs/{_title_light.md → _title_default.md} +0 -0
  70. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.html.erb +1 -0
  71. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.jsx +19 -0
  72. data/app/pb_kits/playbook/pb_title/docs/_title_light_weight.md +4 -0
  73. data/app/pb_kits/playbook/pb_title/docs/example.yml +4 -2
  74. data/app/pb_kits/playbook/pb_title/docs/index.js +2 -1
  75. data/app/pb_kits/playbook/pb_title/title.rb +6 -1
  76. data/app/pb_kits/playbook/pb_title/title.test.js +13 -0
  77. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +111 -0
  78. data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx +1 -1
  79. data/app/pb_kits/playbook/playbook-rails-react-bindings.js +4 -0
  80. data/app/pb_kits/playbook/playbook-rails.js +4 -4
  81. data/app/pb_kits/playbook/tokens/_titles.scss +10 -1
  82. data/app/pb_kits/playbook/tokens/_typography.scss +2 -2
  83. data/lib/playbook/version.rb +2 -2
  84. metadata +42 -17
  85. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +0 -91
  86. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.jsx +0 -136
  87. data/app/pb_kits/playbook/pb_dialog/_dialog.html.erb +0 -10
  88. data/app/pb_kits/playbook/pb_gauge/_gauge.jsx +0 -112
  89. data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +0 -93
  90. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.jsx +0 -79
  91. data/app/pb_kits/playbook/plugins/pb_chart.js +0 -309
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01a1e3109de5059d750e0f17e5f9ead0781c6b6ad6c3729186b9c31eb3ff9a90
4
- data.tar.gz: a6daa201b636522e49e95279007ccded48567c7e1b2c8c4994f595b0b2ff1656
3
+ metadata.gz: 6ec7a56f6eea6ea55c21faa02b8a1beb8110460443353439aa5de7961024b182
4
+ data.tar.gz: 46bb11b6178da12a8e9dcdfde1af101e675283b1aa1776455e9708f98a16a21e
5
5
  SHA512:
6
- metadata.gz: 3a8decc17e61b0c22c47d0e0248418490270c9c313768b2da5c757e74997646644f089abbc8b696ad61983befb3d1836cf675868b33e6cdc730c2f31e60f6587
7
- data.tar.gz: 634d88b0f381e09676cff75ef918f4269dcdb1d0537b95fb02e8142ee7c9dace945a7825f8d6795785ad819a6f115c75f665660a8c5df99bd4e605e5b0611402
6
+ metadata.gz: 4b63642925e7f72674c589f226baa9192e76492c20bbd06a11a942c6d9b6399e55bb163959f827924f49ee2531ada84cff1ddc00b36cfee289cb08a31a927676
7
+ data.tar.gz: 696b8d6cbf319c7b0a92089b738033525cf07cfa674f723767410936d94df1f0b5d40c27596437407248dbd16b0c0592738d28f7a53818edc9af7080788b89c9
@@ -11,6 +11,7 @@ export { default as Badge } from './pb_badge/_badge'
11
11
  export { default as BarGraph } from './pb_bar_graph/_bar_graph'
12
12
  export { default as Body } from './pb_body/_body'
13
13
  export { default as BreadCrumbs } from './pb_bread_crumbs/_bread_crumbs'
14
+ export { default as BreadCrumbItem } from './pb_bread_crumbs/_bread_crumb_item'
14
15
  export { default as Button } from './pb_button/_button'
15
16
  export { default as ButtonToolbar } from './pb_button_toolbar/_button_toolbar'
16
17
  export { default as Caption } from './pb_caption/_caption'
@@ -114,10 +115,10 @@ export { default as barGraphSettings } from './pb_bar_graph/barGraphSettings'
114
115
  export { default as dashboardValueSettings } from './pb_dashboard_value/dashboardValueSettings'
115
116
 
116
117
  // Other JS/Plugins
117
- export { default as pbChart } from './plugins/pb_chart.js'
118
118
  export { default as datePickerHelper } from './pb_date_picker/date_picker_helper'
119
119
  export { default as PbPopover } from './pb_popover'
120
120
  export { default as PbTable } from './pb_table'
121
121
  export { default as PbTextarea } from './pb_textarea'
122
122
  export { default as PbTooltip } from './pb_tooltip'
123
123
  export { default as PbTypeahead } from './pb_typeahead'
124
+ export { default as dialogHelper } from './pb_dialog/dialogHelper'
@@ -0,0 +1,145 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import { globalProps } from "../utilities/globalProps";
3
+ import { buildAriaProps, buildDataProps } from "../utilities/props";
4
+
5
+ import HighchartsReact from "highcharts-react-official";
6
+ import Highcharts from "highcharts";
7
+ import { highchartsTheme } from "../pb_dashboard/pbChartsLightTheme";
8
+ import { highchartsDarkTheme } from "../pb_dashboard/pbChartsDarkTheme";
9
+ import mapColors from "../pb_dashboard/pbChartsColorsHelper";
10
+
11
+ import classnames from "classnames";
12
+
13
+ type BarGraphProps = {
14
+ align?: "left" | "right" | "center";
15
+ axisTitle: string;
16
+ dark?: Boolean;
17
+ xAxisCategories: [];
18
+ yAxisMin: number;
19
+ yAxisMax: number;
20
+ chartData: { name: string; data: number[] }[];
21
+ className?: string;
22
+ id: any;
23
+ pointStart: number | any;
24
+ subTitle?: string;
25
+ title: string;
26
+ type?: string;
27
+ legend?: boolean;
28
+ toggleLegendClick?: boolean;
29
+ height?: string;
30
+ colors: string[];
31
+ layout?: "horizontal" | "vertical" | "proximate";
32
+ verticalAlign?: "top" | "middle" | "bottom";
33
+ x?: number;
34
+ y?: number;
35
+ aria?: { [key: string]: string };
36
+ data?: { [key: string]: string };
37
+ };
38
+
39
+
40
+ const BarGraph = ({
41
+ aria = {},
42
+ data = {},
43
+ align = "center",
44
+ axisTitle,
45
+ dark = false,
46
+ chartData,
47
+ className = "pb_bar_graph",
48
+ colors,
49
+ id,
50
+ pointStart,
51
+ subTitle,
52
+ type = "column",
53
+ title = "Title",
54
+ xAxisCategories,
55
+ yAxisMin,
56
+ yAxisMax,
57
+ legend = false,
58
+ toggleLegendClick = true,
59
+ height,
60
+ layout = "horizontal",
61
+ verticalAlign = "bottom",
62
+ x = 0,
63
+ y = 0,
64
+ ...props
65
+ }: BarGraphProps) => {
66
+ const ariaProps = buildAriaProps(aria);
67
+ const dataProps = buildDataProps(data);
68
+ const setupTheme = () => {
69
+ dark
70
+ ? Highcharts.setOptions(highchartsDarkTheme)
71
+ : Highcharts.setOptions(highchartsTheme);
72
+ };
73
+ setupTheme();
74
+
75
+ const staticOptions = {
76
+ title: {
77
+ text: title,
78
+ },
79
+ chart: {
80
+ height: height,
81
+ type: type,
82
+ },
83
+ subtitle: {
84
+ text: subTitle,
85
+ },
86
+ yAxis: {
87
+ min: yAxisMin,
88
+ max: yAxisMax,
89
+ title: {
90
+ text: axisTitle,
91
+ },
92
+ },
93
+ xAxis: {
94
+ categories: xAxisCategories,
95
+ },
96
+ legend: {
97
+ enabled: legend,
98
+ align: align,
99
+ verticalAlign: verticalAlign,
100
+ layout: layout,
101
+ x: x,
102
+ y: y,
103
+ },
104
+ colors:
105
+ colors !== undefined && colors.length > 0
106
+ ? mapColors(colors)
107
+ : highchartsTheme.colors,
108
+ plotOptions: {
109
+ series: {
110
+ pointStart: pointStart,
111
+ events: {},
112
+ dataLabels: {
113
+ enabled: false,
114
+ },
115
+ },
116
+ },
117
+ series: chartData,
118
+ credits: false,
119
+ };
120
+
121
+ if (!toggleLegendClick) {
122
+ staticOptions.plotOptions.series.events = { legendItemClick: () => false };
123
+ }
124
+
125
+ const [options, setOptions] = useState({});
126
+
127
+ useEffect(() => {
128
+ setOptions({ ...staticOptions });
129
+ }, [chartData]);
130
+
131
+ return (
132
+ <HighchartsReact
133
+ containerProps={{
134
+ className: classnames(globalProps(props), className),
135
+ id: id,
136
+ ...ariaProps,
137
+ ...dataProps,
138
+ }}
139
+ highcharts={Highcharts}
140
+ options={options}
141
+ />
142
+ );
143
+ };
144
+
145
+ export default BarGraph;
@@ -3,6 +3,9 @@
3
3
  module Playbook
4
4
  module PbBarGraph
5
5
  class BarGraph < Playbook::KitBase
6
+ prop :align, type: Playbook::Props::Enum,
7
+ values: %w[left right center],
8
+ default: "center"
6
9
  prop :axis_title
7
10
  prop :chart_data, type: Playbook::Props::Array,
8
11
  default: []
@@ -23,6 +26,14 @@ module Playbook
23
26
  prop :height
24
27
  prop :colors, type: Playbook::Props::Array,
25
28
  default: []
29
+ prop :layout, type: Playbook::Props::Enum,
30
+ values: %w[horizontal vertical proximate],
31
+ default: "horizontal"
32
+ prop :vertical_align, type: Playbook::Props::Enum,
33
+ values: %w[top middle bottom],
34
+ default: "bottom"
35
+ prop :x, type: Playbook::Props::Numeric
36
+ prop :y, type: Playbook::Props::Numeric
26
37
 
27
38
  def chart_type
28
39
  orientation == "horizontal" ? "bar" : "column"
@@ -30,13 +41,14 @@ module Playbook
30
41
 
31
42
  def chart_options
32
43
  {
44
+ align: align,
33
45
  id: id,
34
46
  className: classname,
35
47
  chartData: chart_data,
36
48
  dark: dark ? "dark" : "",
37
49
  type: chart_type,
38
50
  title: title,
39
- subtitle: subtitle,
51
+ subTitle: subtitle,
40
52
  axisTitle: axis_title,
41
53
  pointStart: point_start,
42
54
  xAxisCategories: x_axis_categories,
@@ -46,6 +58,10 @@ module Playbook
46
58
  toggleLegendClick: toggle_legend_click,
47
59
  height: height,
48
60
  colors: colors,
61
+ layout: layout,
62
+ verticalAlign: vertical_align,
63
+ x: x,
64
+ y: y,
49
65
  }
50
66
  end
51
67
 
@@ -0,0 +1,62 @@
1
+ <% data = [{
2
+ name: 'Installation',
3
+ data: [1475]
4
+ }, {
5
+ name: 'Manufacturing',
6
+ data: [4434]
7
+ }, {
8
+ name: 'Sales & Distribution',
9
+ data: [3387]
10
+ }, {
11
+ name: 'Project Development',
12
+ data: [3227]
13
+ }, {
14
+ name: 'Other',
15
+ data: [1111]
16
+ }] %>
17
+
18
+ <%= pb_rails("title", props: {size: 4, text: "align | vertical_align", padding_top: "sm", padding_bottom: "sm"})%>
19
+
20
+ <%= pb_rails("bar_graph", props: {
21
+ axis_title: 'Number of Employees',
22
+ chart_data: data,
23
+ id:"legend-position-bar",
24
+ y_axis_min: 0,
25
+ x_axis_categories:['Jan'],
26
+ title: 'Alignment of Legend',
27
+ legend: true,
28
+ align: 'right',
29
+ vertical_align: 'top',
30
+ padding_bottom: "sm",
31
+ }) %>
32
+
33
+ <%= pb_rails("title", props: {size: 4, text: "layout", padding_top: "sm", padding_bottom: "sm"})%>
34
+
35
+ <%= pb_rails("bar_graph", props: {
36
+ axis_title: 'Number of Employees',
37
+ chart_data: data,
38
+ id:"legend-position-bar-1",
39
+ y_axis_min: 0,
40
+ x_axis_categories:['Jan'],
41
+ title: 'Layout of Legend',
42
+ legend: true,
43
+ layout: 'vertical',
44
+ padding_top: "sm",
45
+ padding_bottom: "sm",
46
+ }) %>
47
+
48
+ <%= pb_rails("title", props: {size: 4, text: "x | y", padding_top: "sm", padding_bottom: "sm"})%>
49
+
50
+ <%= pb_rails("bar_graph", props: {
51
+ axis_title: 'Number of Employees',
52
+ chart_data: data,
53
+ id:"legend-position-bar-2",
54
+ y_axis_min: 0,
55
+ x_axis_categories:['Jan'],
56
+ title: 'Offset of Legend',
57
+ legend: true,
58
+ layout: "vertical",
59
+ x: 100,
60
+ y: 10,
61
+ padding_top: "sm",
62
+ }) %>
@@ -0,0 +1,86 @@
1
+ import React from 'react'
2
+ import { BarGraph, Title } from '../..'
3
+
4
+ const chartData = [{
5
+ name: 'Installation',
6
+ data: [1475],
7
+ }, {
8
+ name: 'Manufacturing',
9
+ data: [4434],
10
+ }, {
11
+ name: 'Sales & Distribution',
12
+ data: [3387],
13
+ }, {
14
+ name: 'Project Development',
15
+ data: [3227],
16
+ }, {
17
+ name: 'Other',
18
+ data: [1111],
19
+ }]
20
+
21
+ const BarGraphLegendPosition = (props) => (
22
+ <div>
23
+ <Title
24
+ paddingBottom="sm"
25
+ paddingTop="sm"
26
+ size={4}
27
+ tag="h4"
28
+ text="align | verticalAlign"
29
+ />
30
+ <BarGraph
31
+ align='right'
32
+ axisTitle="Number of Employees"
33
+ chartData={chartData}
34
+ id="legend-position-bar"
35
+ legend
36
+ paddingBottom="sm"
37
+ title="Alignment of Legend"
38
+ verticalAlign="top"
39
+ xAxisCategories={['Jan']}
40
+ yAxisMin={0}
41
+ {...props}
42
+ />
43
+ <Title
44
+ paddingBottom="sm"
45
+ paddingTop="sm"
46
+ size={4}
47
+ tag="h4"
48
+ text="layout"
49
+ />
50
+ <BarGraph
51
+ axisTitle="Number of Employees"
52
+ chartData={chartData}
53
+ id="legend-position-bar-1"
54
+ layout="vertical"
55
+ legend
56
+ paddingBottom="sm"
57
+ paddingTop="sm"
58
+ title="Layout of Legend"
59
+ xAxisCategories={['Jan']}
60
+ yAxisMin={0}
61
+ {...props}
62
+ />
63
+ <Title
64
+ paddingBottom="sm"
65
+ paddingTop="sm"
66
+ size={4}
67
+ tag="h4"
68
+ text="x | y"
69
+ />
70
+ <BarGraph
71
+ axisTitle="Number of Employees"
72
+ chartData={chartData}
73
+ id="legend-position-bar-2"
74
+ layout="vertical"
75
+ legend
76
+ title="Offset of Legend"
77
+ x={100}
78
+ xAxisCategories={['Jan']}
79
+ y={10}
80
+ yAxisMin={0}
81
+ {...props}
82
+ />
83
+ </div>
84
+ )
85
+
86
+ export default BarGraphLegendPosition
@@ -0,0 +1,17 @@
1
+ ##### Prop
2
+
3
+ `align` **Type**: String | **Values**: left | center | right (defaults to center)
4
+ `verticalAlign` **Type**: String | **Values**: top | middle | bottom (defaults middle)
5
+ `layout` **Type**: String | **Values**: horizontal | vertical | proximate (defaults to horizontal)
6
+ `x` **Type**: Number (defaults to 0)
7
+ `y` **Type**: Number (defaults to 0)
8
+
9
+ -
10
+
11
+ - `layout` determines the position of the legend items
12
+ `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.
13
+
14
+ - `x` offsets the legend relative to its horizontal alignmnet. Negative x moves it to the left, positive x moves it to the right
15
+
16
+
17
+ - `y` offsets the legend relative to its vertical alignmnet. Negative y moves it up, positive y moves it down.
@@ -3,6 +3,7 @@ examples:
3
3
  rails:
4
4
  - bar_graph_default: Default
5
5
  - bar_graph_legend: Legend
6
+ - bar_graph_legend_position: Legend Position
6
7
  - bar_graph_legend_non_clickable: Legend Non Clickable
7
8
  - bar_graph_height: Height
8
9
  - bar_graph_spline: Spline
@@ -12,6 +13,7 @@ examples:
12
13
  react:
13
14
  - bar_graph_default: Default
14
15
  - bar_graph_legend: Legend
16
+ - bar_graph_legend_position: Legend Position
15
17
  - bar_graph_legend_non_clickable: Legend Non Clickable
16
18
  - bar_graph_height: Height
17
19
  - bar_graph_spline: Spline
@@ -1,5 +1,6 @@
1
1
  export { default as BarGraphDefault } from './_bar_graph_default.jsx'
2
2
  export { default as BarGraphLegend } from './_bar_graph_legend.jsx'
3
+ export { default as BarGraphLegendPosition } from './_bar_graph_legend_position.jsx'
3
4
  export { default as BarGraphLegendNonClickable } from './_bar_graph_legend_non_clickable.jsx'
4
5
  export { default as BarGraphHeight } from './_bar_graph_height.jsx'
5
6
  export { default as BarGraphSpline } from './_bar_graph_spline.jsx'
@@ -1,4 +1,5 @@
1
1
  @import "./button_mixins";
2
+ @import "../tokens/colors";
2
3
 
3
4
  $pb_button_sizes: (
4
5
  "sm": 0.75rem,
@@ -28,6 +29,11 @@ $pb_button_sizes: (
28
29
  }
29
30
  &[class*=_link] {
30
31
  @include pb_button_link;
32
+ @media (hover:hover) {
33
+ &:hover {
34
+ color: $text_lt_default;
35
+ }
36
+ }
31
37
  }
32
38
 
33
39
  // Disabled =================
@@ -1,5 +1,5 @@
1
- <%= pb_rails("button", props: { text: "Button Primary" }) %>
2
- <%= pb_rails("button", props: { text: "Button Secondary", variant: "secondary" }) %>
3
- <%= pb_rails("button", props: { text: "Button Link", variant: "link" }) %>
4
- <%= pb_rails("button", props: { text: "Button Disabled", disabled: true }) %>
1
+ <%= pb_rails("button", props: { text: "Button Primary", margin_right: "lg" }) %>
2
+ <%= pb_rails("button", props: { text: "Button Secondary", variant: "secondary", margin_right: "lg" }) %>
3
+ <%= pb_rails("button", props: { text: "Button Link", variant: "link", margin_right: "lg" }) %>
4
+ <%= pb_rails("button", props: { text: "Button Disabled", disabled: true, margin_right: "lg" }) %>
5
5
 
@@ -1,32 +1,33 @@
1
- import React from 'react'
2
- import { Button } from '../../'
1
+ import React from "react"
2
+ import { Button } from "../../"
3
3
 
4
4
  const ButtonDefault = (props) => (
5
5
  <div>
6
6
  <Button
7
- marginRight="xl"
8
- onClick={() => alert('button clicked!')}
9
- text="Button Primary"
7
+ marginRight='lg'
8
+ onClick={() => alert("button clicked!")}
9
+ text='Button Primary'
10
10
  {...props}
11
- />
12
- {' '}
11
+ />{" "}
13
12
  <Button
14
- onClick={() => alert('button clicked!')}
15
- text="Button Secondary"
16
- variant="secondary"
13
+ marginRight='lg'
14
+ onClick={() => alert("button clicked!")}
15
+ text='Button Secondary'
16
+ variant='secondary'
17
17
  {...props}
18
- />
19
- {' '}
18
+ />{" "}
20
19
  <Button
21
- onClick={() => alert('button clicked!')}
22
- text="Button Link"
23
- variant="link"
20
+ marginRight='lg'
21
+ onClick={() => alert("button clicked!")}
22
+ text='Button Link'
23
+ variant='link'
24
24
  {...props}
25
25
  />
26
26
  <Button
27
27
  disabled
28
- onClick={() => alert('button clicked!')}
29
- text="Button Disabled"
28
+ marginRight='lg'
29
+ onClick={() => alert("button clicked!")}
30
+ text='Button Disabled'
30
31
  {...props}
31
32
  />
32
33
  </div>
@@ -0,0 +1,2 @@
1
+ declare module "*.scss"
2
+ declare module "highcharts-react-official"