playbook_ui 15.0.0.pre.alpha.play2377bargraphscaffoldnewkit10368 → 15.0.0.pre.alpha.removewebpacker10432
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.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -0
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +48 -4
- data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +5 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +6 -8
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +2 -2
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +13 -2
- data/app/pb_kits/playbook/pb_icon/icon.rb +9 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +3 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.html.erb +5 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.rb +11 -0
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.html.erb +41 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.jsx +80 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.md +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -3
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +38 -0
- data/dist/chunks/{_line_graph-BNXbOd7G.js → _line_graph-C0LUCC-Z.js} +1 -1
- data/dist/chunks/_typeahead-BGJ0eMvl.js +6 -0
- data/dist/chunks/_weekday_stacked-Dpjg2Qwg.js +37 -0
- data/dist/chunks/componentRegistry-DtWHGZb5.js +1 -0
- data/dist/chunks/{lib-CY5ZPzic.js → lib-QZuu1ltS.js} +1 -1
- data/dist/chunks/{pb_form_validation-D3b0JKHH.js → pb_form_validation-CleM960_.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +1 -9
- data/dist/playbook-doc.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/lib/playbook/engine.rb +0 -1
- data/lib/playbook/kit_base.rb +20 -2
- data/lib/playbook/version.rb +1 -1
- metadata +18 -60
- data/app/pb_kits/playbook/pb_dialog/dialogHelper.js +0 -65
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.scss +0 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +0 -62
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.html.erb +0 -35
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +0 -49
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_rails.md +0 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_react.md +0 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.html.erb +0 -38
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +0 -51
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.html.erb +0 -46
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +0 -62
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.md +0 -3
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.html.erb +0 -47
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +0 -60
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.html.erb +0 -25
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +0 -36
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +0 -44
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +0 -100
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +0 -126
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.html.erb +0 -32
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +0 -48
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.html.erb +0 -68
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +0 -81
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.html.erb +0 -31
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +0 -42
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.md +0 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.html.erb +0 -35
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +0 -51
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/example.yml +0 -27
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/index.js +0 -11
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbBarGraphTheme.ts +0 -106
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb +0 -1
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +0 -28
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +0 -31
- data/dist/chunks/_typeahead-_OUsjdM2.js +0 -6
- data/dist/chunks/_weekday_stacked-B3B3vRAT.js +0 -37
@@ -1,106 +0,0 @@
|
|
1
|
-
import colors from '../tokens/exports/_colors.module.scss'
|
2
|
-
import typography from '../tokens/exports/_typography.module.scss'
|
3
|
-
|
4
|
-
const barGraphTheme = {
|
5
|
-
title: {
|
6
|
-
text: "",
|
7
|
-
style: {
|
8
|
-
color: colors.text_lt_default,
|
9
|
-
fontFamily: typography.font_family_base,
|
10
|
-
fontWeight: typography.bold,
|
11
|
-
fontSize: typography.heading_3,
|
12
|
-
},
|
13
|
-
},
|
14
|
-
subtitle: {
|
15
|
-
text: "",
|
16
|
-
style: {
|
17
|
-
fontFamily: typography.font_family_base,
|
18
|
-
color: colors.text_lt_light,
|
19
|
-
fontWeight: typography.regular,
|
20
|
-
fontSize: typography.text_base,
|
21
|
-
},
|
22
|
-
},
|
23
|
-
chart: {
|
24
|
-
type: "column",
|
25
|
-
},
|
26
|
-
tooltip: {
|
27
|
-
backgroundColor: {
|
28
|
-
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
29
|
-
stops: [
|
30
|
-
[0, colors.bg_dark],
|
31
|
-
[1, colors.bg_dark],
|
32
|
-
],
|
33
|
-
},
|
34
|
-
style: {
|
35
|
-
fontFamily: typography.font_family_base,
|
36
|
-
color: colors.text_dk_default,
|
37
|
-
fontWeight: typography.regular,
|
38
|
-
fontSize: typography.text_smaller,
|
39
|
-
},
|
40
|
-
},
|
41
|
-
colors: [
|
42
|
-
colors.data_1,
|
43
|
-
colors.data_2,
|
44
|
-
colors.data_3,
|
45
|
-
colors.data_4,
|
46
|
-
colors.data_5,
|
47
|
-
colors.data_6,
|
48
|
-
colors.data_7,
|
49
|
-
],
|
50
|
-
credits: { enabled: false },
|
51
|
-
legend: {
|
52
|
-
enabled: false,
|
53
|
-
itemStyle: {
|
54
|
-
color: colors.text_lt_light,
|
55
|
-
fill: colors.text_lt_light,
|
56
|
-
fontSize: typography.text_smaller,
|
57
|
-
},
|
58
|
-
},
|
59
|
-
xAxis: {
|
60
|
-
gridLineWidth: 0,
|
61
|
-
lineColor: colors.border_light,
|
62
|
-
tickColor: colors.border_light,
|
63
|
-
labels: {
|
64
|
-
style: {
|
65
|
-
fontFamily: typography.font_family_base,
|
66
|
-
color: colors.text_lt_lighter,
|
67
|
-
fontWeight: typography.bold,
|
68
|
-
fontSize: typography.text_smaller,
|
69
|
-
},
|
70
|
-
},
|
71
|
-
title: {
|
72
|
-
style: {
|
73
|
-
color: colors.text_lt_default,
|
74
|
-
fontFamily: typography.font_family_base,
|
75
|
-
fontWeight: typography.regular,
|
76
|
-
fontSize: typography.heading_4,
|
77
|
-
},
|
78
|
-
},
|
79
|
-
},
|
80
|
-
yAxis: {
|
81
|
-
alternateGridColor: undefined as string | undefined,
|
82
|
-
minorTickInterval: null as number | null,
|
83
|
-
gridLineColor: colors.border_light,
|
84
|
-
minorGridLineColor: colors.border_light,
|
85
|
-
lineWidth: 0,
|
86
|
-
tickWidth: 0,
|
87
|
-
labels: {
|
88
|
-
style: {
|
89
|
-
fontFamily: typography.font_family_base,
|
90
|
-
color: colors.text_lt_lighter,
|
91
|
-
fontWeight: typography.bold,
|
92
|
-
fontSize: typography.text_smaller,
|
93
|
-
},
|
94
|
-
},
|
95
|
-
title: {
|
96
|
-
style: {
|
97
|
-
fontFamily: typography.font_family_base,
|
98
|
-
color: colors.text_lt_lighter,
|
99
|
-
fontWeight: typography.bold,
|
100
|
-
fontSize: typography.text_smaller,
|
101
|
-
},
|
102
|
-
},
|
103
|
-
},
|
104
|
-
}
|
105
|
-
|
106
|
-
export default barGraphTheme;
|
@@ -1 +0,0 @@
|
|
1
|
-
<%= react_component('PbBarGraph', object.react_props) %>
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Playbook
|
4
|
-
module PbPbBarGraph
|
5
|
-
class PbBarGraph < ::Playbook::KitBase
|
6
|
-
prop :options, default: {}
|
7
|
-
prop :container_props, default: {}
|
8
|
-
|
9
|
-
def react_props
|
10
|
-
{
|
11
|
-
options: options,
|
12
|
-
containerProps: container_props_hash,
|
13
|
-
}
|
14
|
-
end
|
15
|
-
|
16
|
-
def container_props_hash
|
17
|
-
container_props.merge({
|
18
|
-
id: id,
|
19
|
-
className: classname,
|
20
|
-
}).compact
|
21
|
-
end
|
22
|
-
|
23
|
-
def classname
|
24
|
-
generate_classname("pb_pb_bar_graph")
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import { render, screen } from '../utilities/test-utils';
|
3
|
-
import PbBarGraph from './_pb_bar_graph';
|
4
|
-
|
5
|
-
beforeEach(() => {
|
6
|
-
// Silences error logs within the test suite.
|
7
|
-
jest.spyOn(console, 'error');
|
8
|
-
jest.spyOn(console, 'warn');
|
9
|
-
console.error.mockImplementation(() => {});
|
10
|
-
console.warn.mockImplementation(() => {});
|
11
|
-
});
|
12
|
-
|
13
|
-
afterEach(() => {
|
14
|
-
console.error.mockRestore();
|
15
|
-
console.warn.mockRestore();
|
16
|
-
});
|
17
|
-
|
18
|
-
const testId = 'bargraph1';
|
19
|
-
|
20
|
-
test('bargraph uses exact classname', () => {
|
21
|
-
render(
|
22
|
-
<PbBarGraph
|
23
|
-
className='super_important_class'
|
24
|
-
data={{ testid: testId }}
|
25
|
-
id='bar-default'
|
26
|
-
/>
|
27
|
-
);
|
28
|
-
|
29
|
-
const kit = screen.getByTestId(testId);
|
30
|
-
expect(kit).toHaveClass('super_important_class');
|
31
|
-
});
|