playbook_ui 13.24.0.pre.alpha.play1305drycontenttag2689 → 13.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.html.erb +14 -10
- data/app/pb_kits/playbook/pb_advanced_table/table_body.html.erb +9 -5
- data/app/pb_kits/playbook/pb_advanced_table/table_header.html.erb +6 -2
- data/app/pb_kits/playbook/pb_advanced_table/table_row.html.erb +6 -2
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +6 -1
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_background/background.html.erb +10 -2
- data/app/pb_kits/playbook/pb_badge/badge.html.erb +6 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +6 -41
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -4
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -6
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_body/_body.scss +3 -3
- data/app/pb_kits/playbook/pb_body/body.html.erb +6 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +6 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +7 -2
- data/app/pb_kits/playbook/pb_button/button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.html.erb +7 -2
- data/app/pb_kits/playbook/pb_caption/caption.html.erb +6 -1
- data/app/pb_kits/playbook/pb_card/card.html.erb +7 -1
- data/app/pb_kits/playbook/pb_card/card_body.html.erb +6 -1
- data/app/pb_kits/playbook/pb_card/card_header.html.erb +6 -1
- data/app/pb_kits/playbook/pb_checkbox/checkbox.html.erb +6 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_content.html.erb +6 -1
- data/app/pb_kits/playbook/pb_collapsible/collapsible_main.html.erb +6 -1
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_currency/currency.html.erb +6 -1
- data/app/pb_kits/playbook/pb_dashboard_value/dashboard_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date/date.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +4 -1
- data/app/pb_kits/playbook/pb_date_range_inline/date_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_date_time/date_time.html.erb +6 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.html.erb +7 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_detail/detail.html.erb +6 -1
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +6 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb +7 -2
- data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +5 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +4 -1
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +6 -1
- data/app/pb_kits/playbook/pb_filter/filter.html.erb +5 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +6 -1
- data/app/pb_kits/playbook/pb_flex/flex.html.erb +5 -1
- data/app/pb_kits/playbook/pb_flex/flex_item.html.erb +4 -1
- data/app/pb_kits/playbook/pb_form_group/form_group.html.erb +6 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +1 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +6 -1
- data/app/pb_kits/playbook/pb_highlight/highlight.html.erb +5 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.html.erb +5 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +7 -2
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_icon_value/icon_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_pill/label_pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_label_value/label_value.html.erb +6 -1
- data/app/pb_kits/playbook/pb_layout/body.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/footer.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/header.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/layout.html.erb +5 -1
- data/app/pb_kits/playbook/pb_layout/sidebar.html.erb +5 -1
- data/app/pb_kits/playbook/pb_list/item.html.erb +8 -3
- data/app/pb_kits/playbook/pb_list/list.html.erb +5 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +6 -1
- data/app/pb_kits/playbook/pb_message/message.html.erb +6 -1
- data/app/pb_kits/playbook/pb_message/message_mention.html.erb +6 -1
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.html.erb +6 -1
- data/app/pb_kits/playbook/pb_multiple_users/multiple_users.html.erb +6 -1
- data/app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/pb_nav/item.html.erb +10 -2
- data/app/pb_kits/playbook/pb_nav/nav.html.erb +6 -1
- data/app/pb_kits/playbook/pb_online_status/online_status.html.erb +4 -1
- data/app/pb_kits/playbook/pb_pagination/pagination.html.erb +6 -1
- data/app/pb_kits/playbook/pb_person/person.html.erb +12 -7
- data/app/pb_kits/playbook/pb_person_contact/person_contact.html.erb +6 -1
- data/app/pb_kits/playbook/pb_pill/pill.html.erb +6 -1
- data/app/pb_kits/playbook/pb_popover/popover.html.erb +6 -1
- data/app/pb_kits/playbook/pb_progress_pills/progress_pills.html.erb +4 -1
- data/app/pb_kits/playbook/pb_progress_simple/progress_simple.html.erb +6 -4
- data/app/pb_kits/playbook/pb_progress_step/progress_step.html.erb +5 -1
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.html.erb +5 -1
- data/app/pb_kits/playbook/pb_radio/radio.html.erb +6 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.html.erb +6 -1
- data/app/pb_kits/playbook/pb_select/select.html.erb +5 -1
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.html.erb +5 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.html.erb +4 -1
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.html.erb +5 -1
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.html.erb +6 -1
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +6 -1
- data/app/pb_kits/playbook/pb_source/source.html.erb +5 -1
- data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_change/stat_change.html.erb +5 -1
- data/app/pb_kits/playbook/pb_stat_value/stat_value.html.erb +5 -1
- data/app/pb_kits/playbook/pb_table/table.html.erb +5 -1
- data/app/pb_kits/playbook/pb_table/table_body.html.erb +16 -6
- data/app/pb_kits/playbook/pb_table/table_cell.html.erb +16 -6
- data/app/pb_kits/playbook/pb_table/table_head.html.erb +16 -6
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +11 -3
- data/app/pb_kits/playbook/pb_table/table_row.html.erb +16 -6
- data/app/pb_kits/playbook/pb_text_input/text_input.html.erb +5 -1
- data/app/pb_kits/playbook/pb_textarea/textarea.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time/time.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_time_stacked/time_stacked.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timeline/item.html.erb +7 -3
- data/app/pb_kits/playbook/pb_timeline/timeline.html.erb +5 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title/title.html.erb +6 -3
- data/app/pb_kits/playbook/pb_title_count/title_count.html.erb +6 -1
- data/app/pb_kits/playbook/pb_title_detail/title_detail.html.erb +5 -1
- data/app/pb_kits/playbook/pb_toggle/toggle.html.erb +6 -1
- data/app/pb_kits/playbook/pb_tooltip/tooltip.html.erb +5 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +19 -27
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +2 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_user/user.html.erb +6 -1
- data/app/pb_kits/playbook/pb_user_badge/user_badge.html.erb +6 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.html.erb +6 -1
- data/app/pb_kits/playbook/tokens/_colors.scss +1 -1
- data/dist/playbook-rails.js +6 -6
- data/lib/playbook/kit_base.rb +1 -21
- data/lib/playbook/version.rb +2 -2
- metadata +5 -15
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb +0 -23
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx +0 -35
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -36
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb +0 -22
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx +0 -34
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md +0 -1
- data/app/pb_kits/playbook/pb_typeahead/components/index.tsx +0 -19
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +0 -51
data/lib/playbook/kit_base.rb
CHANGED
@@ -31,8 +31,6 @@ require "playbook/right"
|
|
31
31
|
require "playbook/bottom"
|
32
32
|
|
33
33
|
module Playbook
|
34
|
-
include ActionView::Helpers
|
35
|
-
|
36
34
|
class KitBase < ViewComponent::Base
|
37
35
|
include Playbook::PbKitHelper
|
38
36
|
include Playbook::Props
|
@@ -80,26 +78,8 @@ module Playbook
|
|
80
78
|
default_html_options.merge(html_options.deep_merge(data_attributes))
|
81
79
|
end
|
82
80
|
|
83
|
-
# rubocop:disable Style/OptionalBooleanParameter
|
84
|
-
def pb_content_tag(name, content_or_options_with_block = nil, options = {}, escape = true, &block)
|
85
|
-
combined_options = options
|
86
|
-
.merge(combined_html_options)
|
87
|
-
.merge(default_options.merge(content_or_options_with_block))
|
88
|
-
content_tag(name, combined_options, options, escape, &block)
|
89
|
-
end
|
90
|
-
# rubocop:enable Style/OptionalBooleanParameter
|
91
|
-
|
92
81
|
private
|
93
82
|
|
94
|
-
def default_options
|
95
|
-
{
|
96
|
-
id: id,
|
97
|
-
data: data,
|
98
|
-
class: classname,
|
99
|
-
aria: aria,
|
100
|
-
}
|
101
|
-
end
|
102
|
-
|
103
83
|
def default_html_options
|
104
84
|
{}
|
105
85
|
end
|
@@ -108,7 +88,7 @@ module Playbook
|
|
108
88
|
{
|
109
89
|
data: data,
|
110
90
|
aria: aria,
|
111
|
-
}.transform_keys { |key| key.to_s.tr("_", "-")
|
91
|
+
}.transform_keys { |key| key.to_s.tr("_", "-") }
|
112
92
|
end
|
113
93
|
end
|
114
94
|
end
|
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 13.24.0
|
4
|
+
version: 13.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Power UX
|
8
8
|
- Power Devs
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-04-
|
12
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -406,17 +406,9 @@ files:
|
|
406
406
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb
|
407
407
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx
|
408
408
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md
|
409
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.html.erb
|
410
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_negative_numbers.jsx
|
411
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb
|
412
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx
|
413
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md
|
414
409
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb
|
415
410
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx
|
416
411
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md
|
417
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.html.erb
|
418
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.jsx
|
419
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_stacked.md
|
420
412
|
- app/pb_kits/playbook/pb_bar_graph/docs/_description.md
|
421
413
|
- app/pb_kits/playbook/pb_bar_graph/docs/example.yml
|
422
414
|
- app/pb_kits/playbook/pb_bar_graph/docs/index.js
|
@@ -2610,12 +2602,10 @@ files:
|
|
2610
2602
|
- app/pb_kits/playbook/pb_typeahead/components/Option.tsx
|
2611
2603
|
- app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx
|
2612
2604
|
- app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx
|
2613
|
-
- app/pb_kits/playbook/pb_typeahead/components/index.tsx
|
2614
2605
|
- app/pb_kits/playbook/pb_typeahead/docs/_description.md
|
2615
2606
|
- app/pb_kits/playbook/pb_typeahead/docs/_footer.md
|
2616
2607
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_async_createable.jsx
|
2617
2608
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx
|
2618
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx
|
2619
2609
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
|
2620
2610
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
|
2621
2611
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb
|
@@ -2871,7 +2861,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2871
2861
|
licenses:
|
2872
2862
|
- ISC
|
2873
2863
|
metadata: {}
|
2874
|
-
post_install_message:
|
2864
|
+
post_install_message:
|
2875
2865
|
rdoc_options: []
|
2876
2866
|
require_paths:
|
2877
2867
|
- lib
|
@@ -2887,7 +2877,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2887
2877
|
version: '0'
|
2888
2878
|
requirements: []
|
2889
2879
|
rubygems_version: 3.5.3
|
2890
|
-
signing_key:
|
2880
|
+
signing_key:
|
2891
2881
|
specification_version: 4
|
2892
2882
|
summary: Playbook Design System
|
2893
2883
|
test_files: []
|
@@ -1,23 +0,0 @@
|
|
1
|
-
<% data = [{
|
2
|
-
name: 'Installation',
|
3
|
-
data: [-475, 400, -1000, 354, -856],
|
4
|
-
threshold: 0
|
5
|
-
}, {
|
6
|
-
name: 'Manufacturing',
|
7
|
-
data: [1475, 200, 1000, 654, -656],
|
8
|
-
threshold: 0
|
9
|
-
},
|
10
|
-
{
|
11
|
-
name: 'Sales & Distribution',
|
12
|
-
data: [1270, 100, -1200, 554, 756],
|
13
|
-
threshold: 0
|
14
|
-
}] %>
|
15
|
-
|
16
|
-
<%= pb_rails("bar_graph", props: {
|
17
|
-
axis_title: 'Number of Employees',
|
18
|
-
chart_data: data,
|
19
|
-
id: "bar-default",
|
20
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
21
|
-
title: 'Bar Graph with Negative Numbers',
|
22
|
-
legend: true,
|
23
|
-
}) %>
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import BarGraph from '../_bar_graph'
|
4
|
-
|
5
|
-
const chartData = [{
|
6
|
-
name: 'Installation',
|
7
|
-
data: [-475, 400, -1000, 354, -856],
|
8
|
-
threshold: 0
|
9
|
-
}, {
|
10
|
-
name: 'Manufacturing',
|
11
|
-
data: [1475, 200, 1000, 654, -656],
|
12
|
-
threshold: 0
|
13
|
-
},
|
14
|
-
{
|
15
|
-
name: 'Sales & Distribution',
|
16
|
-
data: [1270, 100, -1200, 554, 756],
|
17
|
-
threshold: 0
|
18
|
-
}]
|
19
|
-
|
20
|
-
|
21
|
-
const BarGraphStacked = (props) => (
|
22
|
-
<div>
|
23
|
-
<BarGraph
|
24
|
-
axisTitle="Number of Employees"
|
25
|
-
chartData={chartData}
|
26
|
-
id="bar-default"
|
27
|
-
legend
|
28
|
-
title="Bar Graph with Negative Numbers"
|
29
|
-
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
30
|
-
{...props}
|
31
|
-
/>
|
32
|
-
</div>
|
33
|
-
)
|
34
|
-
|
35
|
-
export default BarGraphStacked
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<% data = [{
|
2
|
-
name: 'Number of Installations',
|
3
|
-
data: [1475,200,3000,654,656]
|
4
|
-
}, {
|
5
|
-
type: 'spline',
|
6
|
-
name: 'Percentage',
|
7
|
-
data: [48, 70, 25, 55, 72],
|
8
|
-
color: '#F9BB00',
|
9
|
-
yAxis: 1
|
10
|
-
}] %>
|
11
|
-
|
12
|
-
<% axis_titles = [{name: "Number of Installations"}, {name: "Percentage"}] %>
|
13
|
-
|
14
|
-
<% axis_formats = [{format: ""}, {format: "{value}%"}] %>
|
15
|
-
|
16
|
-
<%= pb_rails("bar_graph", props: {
|
17
|
-
axis_format: axis_formats,
|
18
|
-
axis_title: axis_titles,
|
19
|
-
chart_data: data,
|
20
|
-
id: "bar-spline",
|
21
|
-
y_axis_min: 0,
|
22
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
23
|
-
subtitle: 'Source: thesolarfoundation.com',
|
24
|
-
title: 'Bar Graph with Secondary Y-axis',
|
25
|
-
legend: true,
|
26
|
-
}) %>
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import BarGraph from '../_bar_graph'
|
4
|
-
|
5
|
-
const chartData = [{
|
6
|
-
name: 'Number of Installations',
|
7
|
-
data: [1475, 200, 3000, 654, 656],
|
8
|
-
}, {
|
9
|
-
type: 'spline',
|
10
|
-
name: 'Percentage',
|
11
|
-
data: [48, 70, 25, 55, 72],
|
12
|
-
color: '#F9BB00',
|
13
|
-
yAxis: 1
|
14
|
-
}]
|
15
|
-
|
16
|
-
const axisTitles = [ {name: "Number of Installations"}, {name: "Percentage"}]
|
17
|
-
|
18
|
-
const axisFormats = [{format: ""}, {format: "{value}%"}]
|
19
|
-
|
20
|
-
const BarGraphSecondaryYAxis= (props) => (
|
21
|
-
<div>
|
22
|
-
<BarGraph
|
23
|
-
axisFormat={axisFormats}
|
24
|
-
axisTitle={axisTitles}
|
25
|
-
chartData={chartData}
|
26
|
-
id="bar-spline"
|
27
|
-
legend
|
28
|
-
title="Bar Graph with Secondary Y-axis"
|
29
|
-
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
30
|
-
yAxisMin={0}
|
31
|
-
{...props}
|
32
|
-
/>
|
33
|
-
</div>
|
34
|
-
)
|
35
|
-
|
36
|
-
export default BarGraphSecondaryYAxis
|
@@ -1,3 +0,0 @@
|
|
1
|
-
Optionally add a second yAxis to support secondary datasets (e.x., a spline) by passing` yAxis: 1` to the second node of your `chartData` array.
|
2
|
-
|
3
|
-
To customize the format and/or title of your secondary yAxis, pass your desired values as arrays through the `axisFormat` and `axisTitle` props, respectively.
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<% data = [{
|
2
|
-
name: 'Installation',
|
3
|
-
data: [1475, 200, 3000, 654, 656],
|
4
|
-
},
|
5
|
-
{
|
6
|
-
name: 'Manufacturing',
|
7
|
-
data: [1270, 800, 200, 454, 956],
|
8
|
-
}, {
|
9
|
-
name: 'Sales & Distribution',
|
10
|
-
data: [975, 1600, 1500, 924, 500],
|
11
|
-
}] %>
|
12
|
-
|
13
|
-
<%= pb_rails("bar_graph", props: {
|
14
|
-
axis_title: 'Number of Employees',
|
15
|
-
chart_data: data,
|
16
|
-
id: "bar-default",
|
17
|
-
y_axis_min: 0,
|
18
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
19
|
-
stacking: "normal",
|
20
|
-
title: 'Bar Graph with Stacked Columns',
|
21
|
-
legend: true,
|
22
|
-
}) %>
|
@@ -1,34 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import BarGraph from '../_bar_graph'
|
4
|
-
|
5
|
-
const chartData = [{
|
6
|
-
name: 'Installation',
|
7
|
-
data: [1475, 200, 3000, 654, 656],
|
8
|
-
},
|
9
|
-
{
|
10
|
-
name: 'Manufacturing',
|
11
|
-
data: [1270, 800, 200, 454, 956],
|
12
|
-
}, {
|
13
|
-
name: 'Sales & Distribution',
|
14
|
-
data: [975, 1600, 1500, 924, 500],
|
15
|
-
}]
|
16
|
-
|
17
|
-
|
18
|
-
const BarGraphStacked = (props) => (
|
19
|
-
<div>
|
20
|
-
<BarGraph
|
21
|
-
axisTitle="Number Of Employees"
|
22
|
-
chartData={chartData}
|
23
|
-
id="bar-default"
|
24
|
-
legend
|
25
|
-
stacking="normal"
|
26
|
-
title="Bar Graph with Stacked Columns"
|
27
|
-
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
28
|
-
yAxisMin={0}
|
29
|
-
{...props}
|
30
|
-
/>
|
31
|
-
</div>
|
32
|
-
)
|
33
|
-
|
34
|
-
export default BarGraphStacked
|
@@ -1 +0,0 @@
|
|
1
|
-
The `stacking` prop can be used for a stacked bar graph. The prop allows for `normal` or `percent` as options.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import Control from './Control'
|
2
|
-
import ClearIndicator from './ClearIndicator'
|
3
|
-
import IndicatorsContainer from './IndicatorsContainer'
|
4
|
-
import MenuList from './MenuList'
|
5
|
-
import MultiValue from './MultiValue'
|
6
|
-
import Option from './Option'
|
7
|
-
import Placeholder from './Placeholder'
|
8
|
-
import ValueContainer from './ValueContainer'
|
9
|
-
|
10
|
-
export {
|
11
|
-
Control,
|
12
|
-
ClearIndicator,
|
13
|
-
IndicatorsContainer,
|
14
|
-
MenuList,
|
15
|
-
MultiValue,
|
16
|
-
Option,
|
17
|
-
Placeholder,
|
18
|
-
ValueContainer,
|
19
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
|
3
|
-
import {
|
4
|
-
Button,
|
5
|
-
} from '../..'
|
6
|
-
|
7
|
-
import Typeahead from '../_typeahead'
|
8
|
-
|
9
|
-
const options = [
|
10
|
-
{ label: 'Orange', value: '#FFA500' },
|
11
|
-
{ label: 'Red', value: '#FF0000' },
|
12
|
-
{ label: 'Green', value: '#00FF00' },
|
13
|
-
{ label: 'Blue', value: '#0000FF' },
|
14
|
-
{ label: 'Amaranth', value: '#9F2B68' },
|
15
|
-
{ label: 'Key Lime', value: '#DAF7A6' },
|
16
|
-
{ label: 'Turquois', value: '#00FFD0' },
|
17
|
-
]
|
18
|
-
|
19
|
-
const TypeaheadCustomMenuList = (props) => {
|
20
|
-
const defaultColorOptions = options.slice(0, 3)
|
21
|
-
const [colorOptions, setColorOptions] = useState(defaultColorOptions)
|
22
|
-
|
23
|
-
const moreToLoad = colorOptions.length == defaultColorOptions.length
|
24
|
-
const loadColors = moreToLoad ? () => setColorOptions(options) : () => setColorOptions(defaultColorOptions)
|
25
|
-
|
26
|
-
const menuListProps = {
|
27
|
-
footer: (<Button
|
28
|
-
margin="sm"
|
29
|
-
onClick={loadColors}
|
30
|
-
text={`Load ${moreToLoad ? "More" : "Less"}`}
|
31
|
-
/>)
|
32
|
-
}
|
33
|
-
|
34
|
-
const MenuList = (props) => (
|
35
|
-
<Typeahead.MenuList
|
36
|
-
{...menuListProps}
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
)
|
40
|
-
|
41
|
-
return (
|
42
|
-
<Typeahead
|
43
|
-
components={{ MenuList }}
|
44
|
-
label="Colors"
|
45
|
-
options={colorOptions}
|
46
|
-
{...props}
|
47
|
-
/>
|
48
|
-
)
|
49
|
-
}
|
50
|
-
|
51
|
-
export default TypeaheadCustomMenuList
|