playbook_ui 4.15.0 → 4.15.1.alpha1
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/_playbook.scss +0 -3
- data/app/pb_kits/playbook/data/menu.yml +0 -5
- data/app/pb_kits/playbook/index.js +1 -4
- data/app/pb_kits/playbook/packs/examples.js +0 -2
- data/app/pb_kits/playbook/pb_button/_button.jsx +1 -9
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +0 -1
- data/app/pb_kits/playbook/pb_contact/contact.rb +0 -2
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +0 -5
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +0 -4
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb +0 -6
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +0 -5
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +1 -26
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +2 -2
- data/app/pb_kits/playbook/pb_filter/_filter.jsx +222 -1
- data/app/pb_kits/playbook/pb_filter/_filter.scss +13 -16
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.html.erb +41 -34
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +9 -13
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.html.erb +74 -69
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +9 -12
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +35 -28
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.jsx +6 -5
- data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +41 -35
- data/app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx +10 -12
- data/app/pb_kits/playbook/pb_filter/docs/_sort_only.html.erb +18 -12
- data/app/pb_kits/playbook/pb_filter/docs/_sort_only.jsx +44 -14
- data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_layout/_body.jsx +26 -0
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +14 -66
- data/app/pb_kits/playbook/pb_layout/_sidebar.jsx +26 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_default.jsx +14 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +1 -4
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -4
- data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +14 -31
- data/app/pb_kits/playbook/pb_online_status/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_online_status/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +19 -26
- data/app/pb_kits/playbook/pb_popover/docs/_popover_portal.jsx +34 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_with_button.html.erb +4 -0
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_popover/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_stat_change/stat_change.rb +1 -1
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +14 -39
- data/app/pb_kits/playbook/pb_timestamp/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_timestamp/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +14 -47
- data/app/pb_kits/playbook/pb_title_detail/docs/example.yml +3 -3
- data/app/pb_kits/playbook/pb_title_detail/docs/index.js +0 -1
- data/app/pb_kits/playbook/plugins/pb_chart.js +1 -49
- data/app/pb_kits/playbook/tokens/_colors.scss +0 -4
- data/app/pb_kits/playbook/vendor.js +0 -3
- data/lib/playbook/version.rb +1 -1
- metadata +9 -52
- data/app/pb_kits/playbook/packs/kits/pb_progress_step.js +0 -2
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.html.erb +0 -12
- data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.scss +0 -6
- data/app/pb_kits/playbook/pb_circle_chart/circle_chart.rb +0 -81
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +0 -19
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.html.erb +0 -136
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.html.erb +0 -37
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.html.erb +0 -22
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.html.erb +0 -38
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +0 -9
- data/app/pb_kits/playbook/pb_filter/Filter/CurrentFilters.jsx +0 -56
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +0 -26
- data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.jsx +0 -58
- data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.jsx +0 -46
- data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx +0 -37
- data/app/pb_kits/playbook/pb_filter/Filter/ResultsCount.jsx +0 -34
- data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.jsx +0 -85
- data/app/pb_kits/playbook/pb_filter/Filter/index.jsx +0 -26
- data/app/pb_kits/playbook/pb_layout/docs/_layout_colors.jsx +0 -63
- data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes.jsx +0 -87
- data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes_dark.jsx +0 -92
- data/app/pb_kits/playbook/pb_layout/docs/_layout_transparent.jsx +0 -24
- data/app/pb_kits/playbook/pb_online_status/docs/_online_status_default.jsx +0 -19
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.html.erb +0 -6
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +0 -35
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +0 -388
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.html.erb +0 -23
- data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.jsx +0 -44
- data/app/pb_kits/playbook/pb_progress_step/docs/_description.md +0 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_dark.html.erb +0 -8
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_dark.jsx +0 -18
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.html.erb +0 -33
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_default.jsx +0 -39
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.html.erb +0 -33
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_vertical.jsx +0 -40
- data/app/pb_kits/playbook/pb_progress_step/docs/example.yml +0 -12
- data/app/pb_kits/playbook/pb_progress_step/docs/index.js +0 -3
- data/app/pb_kits/playbook/pb_progress_step/progress_step.rb +0 -33
- data/app/pb_kits/playbook/pb_progress_step/progress_step_item.rb +0 -19
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +0 -8
- data/app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.jsx +0 -26
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.html.erb +0 -10
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +0 -105
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_white.html.erb +0 -9
- data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +0 -5
- data/app/pb_kits/playbook/pb_tooltip/index.js +0 -80
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +0 -34
@@ -1,83 +1,88 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
],
|
8
|
-
sort_menu: [
|
9
|
-
{ item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
|
10
|
-
{ item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
|
11
|
-
{ item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
|
1
|
+
|
2
|
+
<%= pb_rails("filter", props: {
|
3
|
+
id:"3",
|
4
|
+
background: false,
|
5
|
+
filters: [
|
6
|
+
{name: "name", value: "John Wick"}
|
12
7
|
],
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
sort_menu: [
|
9
|
+
{item:"Popularity", link:"#", active: true, direction:"desc"},
|
10
|
+
{item:"Title", link:"#", active: false},
|
11
|
+
{item:"Name", link:"#", active: false},
|
12
|
+
],
|
13
|
+
results: 1,
|
14
|
+
template: "single"
|
15
|
+
}) do%>
|
17
16
|
<%
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
17
|
+
example_collection = [
|
18
|
+
OpenStruct.new(name: "Alabama", value: 1),
|
19
|
+
OpenStruct.new(name: "Alaska", value: 2),
|
20
|
+
OpenStruct.new(name: "Arizona", value: 3),
|
21
|
+
OpenStruct.new(name: "Arkansas", value: 4),
|
22
|
+
OpenStruct.new(name: "California", value: 5),
|
23
|
+
OpenStruct.new(name: "Colorado", value: 6),
|
24
|
+
OpenStruct.new(name: "Connecticut", value: 7),
|
25
|
+
OpenStruct.new(name: "Delaware", value: 8),
|
26
|
+
OpenStruct.new(name: "Florida", value: 9),
|
27
|
+
OpenStruct.new(name: "Georgia", value: 10),
|
28
|
+
]
|
29
|
+
%>
|
31
30
|
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
32
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
33
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
<% end %>
|
35
|
+
<%= form.actions do |action| %>
|
36
|
+
<%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
|
37
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
40
38
|
<% end %>
|
41
39
|
<% end %>
|
42
40
|
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<% 2.times do%>
|
43
44
|
<br>
|
45
|
+
<%end%>
|
44
46
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
],
|
52
|
-
sort_menu: [
|
53
|
-
{ item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
|
54
|
-
{ item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
|
55
|
-
{ item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
|
47
|
+
|
48
|
+
<%= pb_rails("filter", props: {
|
49
|
+
id:"4",
|
50
|
+
background: false,
|
51
|
+
filters: [
|
52
|
+
{name: "name", value: "John Wick"}
|
56
53
|
],
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
sort_menu: [
|
55
|
+
{item:"Popularity", link:"#", active: true, direction:"desc"},
|
56
|
+
{item:"Title", link:"#", active: false},
|
57
|
+
{item:"Name", link:"#", active: false},
|
58
|
+
],
|
59
|
+
results: 546,
|
60
|
+
|
61
|
+
}) do%>
|
60
62
|
<%
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
63
|
+
example_collection = [
|
64
|
+
OpenStruct.new(name: "Alabama", value: 1),
|
65
|
+
OpenStruct.new(name: "Alaska", value: 2),
|
66
|
+
OpenStruct.new(name: "Arizona", value: 3),
|
67
|
+
OpenStruct.new(name: "Arkansas", value: 4),
|
68
|
+
OpenStruct.new(name: "California", value: 5),
|
69
|
+
OpenStruct.new(name: "Colorado", value: 6),
|
70
|
+
OpenStruct.new(name: "Connecticut", value: 7),
|
71
|
+
OpenStruct.new(name: "Delaware", value: 8),
|
72
|
+
OpenStruct.new(name: "Florida", value: 9),
|
73
|
+
OpenStruct.new(name: "Georgia", value: 10),
|
74
|
+
]
|
75
|
+
%>
|
76
|
+
|
77
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
78
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
79
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
77
80
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<% end %>
|
81
|
+
<%= form.actions do |action| %>
|
82
|
+
<%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
|
83
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
82
84
|
<% end %>
|
83
85
|
<% end %>
|
86
|
+
|
87
|
+
<% end %>
|
88
|
+
|
@@ -12,19 +12,16 @@ const FilterNoBackground = () => {
|
|
12
12
|
return (
|
13
13
|
<Filter
|
14
14
|
background={false}
|
15
|
-
filters={
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
filters={[
|
16
|
+
{ name: 'Full Name', value: 'John Wick' },
|
17
|
+
{ name: 'Territory', value: 'San Francisco' },
|
18
|
+
]}
|
19
19
|
results={256}
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
manager_name: 'Manager\'s Name',
|
26
|
-
}}
|
27
|
-
sortValue={[{ name: 'popularity', dir: 'asc' }]}
|
20
|
+
sortMenu={[
|
21
|
+
{ item: 'Popularity', link: '#', active: true, direction: 'desc' },
|
22
|
+
{ item: 'Title', link: '#', active: false },
|
23
|
+
{ item: 'Name', link: '#', active: false },
|
24
|
+
]}
|
28
25
|
>
|
29
26
|
<TextInput
|
30
27
|
label="Full Name"
|
@@ -1,33 +1,40 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% 5.times do%>
|
2
|
+
<br>
|
3
|
+
<%end%>
|
4
|
+
|
5
|
+
<%= pb_rails("filter", props: {
|
6
|
+
id: "fo",
|
7
|
+
filters: [
|
8
|
+
{name: "name", value: "John Wick"}
|
6
9
|
],
|
7
|
-
|
8
|
-
}) do
|
10
|
+
template:"filter_only"
|
11
|
+
}) do%>
|
12
|
+
<%
|
13
|
+
example_collection = [
|
14
|
+
OpenStruct.new(name: "Alabama", value: 1),
|
15
|
+
OpenStruct.new(name: "Alaska", value: 2),
|
16
|
+
OpenStruct.new(name: "Arizona", value: 3),
|
17
|
+
OpenStruct.new(name: "Arkansas", value: 4),
|
18
|
+
OpenStruct.new(name: "California", value: 5),
|
19
|
+
OpenStruct.new(name: "Colorado", value: 6),
|
20
|
+
OpenStruct.new(name: "Connecticut", value: 7),
|
21
|
+
OpenStruct.new(name: "Delaware", value: 8),
|
22
|
+
OpenStruct.new(name: "Florida", value: 9),
|
23
|
+
OpenStruct.new(name: "Georgia", value: 10),
|
24
|
+
]
|
9
25
|
%>
|
10
|
-
<%
|
11
|
-
example_collection = [
|
12
|
-
OpenStruct.new(name: "Alabama", value: 1),
|
13
|
-
OpenStruct.new(name: "Alaska", value: 2),
|
14
|
-
OpenStruct.new(name: "Arizona", value: 3),
|
15
|
-
OpenStruct.new(name: "Arkansas", value: 4),
|
16
|
-
OpenStruct.new(name: "California", value: 5),
|
17
|
-
OpenStruct.new(name: "Colorado", value: 6),
|
18
|
-
OpenStruct.new(name: "Connecticut", value: 7),
|
19
|
-
OpenStruct.new(name: "Delaware", value: 8),
|
20
|
-
OpenStruct.new(name: "Florida", value: 9),
|
21
|
-
OpenStruct.new(name: "Georgia", value: 10),
|
22
|
-
]
|
23
|
-
%>
|
24
|
-
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
25
|
-
<%= form.text_field :example_text_field, props: { label: true } %>
|
26
|
-
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
28
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
29
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
30
|
+
|
31
|
+
<%= form.actions do |action| %>
|
32
|
+
<%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
|
33
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
32
34
|
<% end %>
|
33
35
|
<% end %>
|
36
|
+
|
37
|
+
<% end %>
|
38
|
+
<% 5.times do%>
|
39
|
+
<br>
|
40
|
+
<%end%>
|
@@ -12,11 +12,12 @@ const FilterOnly = () => {
|
|
12
12
|
return (
|
13
13
|
<Filter
|
14
14
|
background={false}
|
15
|
-
filters={
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
results={
|
15
|
+
filters={[
|
16
|
+
{ name: 'Full Name', value: 'John Wick' },
|
17
|
+
{ name: 'Territory', value: 'San Francisco' },
|
18
|
+
]}
|
19
|
+
results={1}
|
20
|
+
template="filter_only"
|
20
21
|
>
|
21
22
|
<TextInput
|
22
23
|
label="Full Name"
|
@@ -1,40 +1,46 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
{ item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
|
10
|
-
{ item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
|
1
|
+
<% 5.times do%>
|
2
|
+
<br>
|
3
|
+
<%end%>
|
4
|
+
|
5
|
+
<%= pb_rails("filter", props: {
|
6
|
+
id:"2",
|
7
|
+
filters: [
|
8
|
+
{name: "name", value: "John Wick"}
|
11
9
|
],
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
sort_menu: [
|
11
|
+
{item:"Popularity", link:"#", active: true, direction:"desc"},
|
12
|
+
{item:"Title", link:"#", active: false},
|
13
|
+
{item:"Name", link:"#", active: false},
|
14
|
+
],
|
15
|
+
results: 546,
|
16
|
+
template: "single"
|
17
|
+
}) do%>
|
18
|
+
<%
|
19
|
+
example_collection = [
|
20
|
+
OpenStruct.new(name: "Alabama", value: 1),
|
21
|
+
OpenStruct.new(name: "Alaska", value: 2),
|
22
|
+
OpenStruct.new(name: "Arizona", value: 3),
|
23
|
+
OpenStruct.new(name: "Arkansas", value: 4),
|
24
|
+
OpenStruct.new(name: "California", value: 5),
|
25
|
+
OpenStruct.new(name: "Colorado", value: 6),
|
26
|
+
OpenStruct.new(name: "Connecticut", value: 7),
|
27
|
+
OpenStruct.new(name: "Delaware", value: 8),
|
28
|
+
OpenStruct.new(name: "Florida", value: 9),
|
29
|
+
OpenStruct.new(name: "Georgia", value: 10),
|
30
|
+
]
|
15
31
|
%>
|
16
|
-
<%
|
17
|
-
example_collection = [
|
18
|
-
OpenStruct.new(name: "Alabama", value: 1),
|
19
|
-
OpenStruct.new(name: "Alaska", value: 2),
|
20
|
-
OpenStruct.new(name: "Arizona", value: 3),
|
21
|
-
OpenStruct.new(name: "Arkansas", value: 4),
|
22
|
-
OpenStruct.new(name: "California", value: 5),
|
23
|
-
OpenStruct.new(name: "Colorado", value: 6),
|
24
|
-
OpenStruct.new(name: "Connecticut", value: 7),
|
25
|
-
OpenStruct.new(name: "Delaware", value: 8),
|
26
|
-
OpenStruct.new(name: "Florida", value: 9),
|
27
|
-
OpenStruct.new(name: "Georgia", value: 10),
|
28
|
-
]
|
29
|
-
%>
|
30
32
|
|
31
|
-
|
32
|
-
|
33
|
-
|
33
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
34
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
35
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
<% end %>
|
37
|
+
<%= form.actions do |action| %>
|
38
|
+
<%= action.submit props: { text: "Apply", data: { disable_with: "<i class='far fa-spinner fa-spin mr-3'></i>Searching...".html_safe },}%>
|
39
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
39
40
|
<% end %>
|
40
|
-
<% end %>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<% end %>
|
44
|
+
<% 5.times do%>
|
45
|
+
<br>
|
46
|
+
<%end%>
|
@@ -11,18 +11,16 @@ const FilterSingle = () => {
|
|
11
11
|
]
|
12
12
|
return (
|
13
13
|
<Filter
|
14
|
-
filters={
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}}
|
25
|
-
sortValue={[{ name: 'popularity', dir: 'asc' }]}
|
14
|
+
filters={[
|
15
|
+
{ name: 'Full Name', value: 'John Wick' },
|
16
|
+
{ name: 'Territory', value: 'San Francisco' },
|
17
|
+
]}
|
18
|
+
sortMenu={[
|
19
|
+
{ item: 'Popularity', link: '#', active: true, direction: 'desc' },
|
20
|
+
{ item: 'Title', link: '#', active: false },
|
21
|
+
{ item: 'Name', link: '#', active: false },
|
22
|
+
]}
|
23
|
+
template="single"
|
26
24
|
>
|
27
25
|
<TextInput
|
28
26
|
label="Full Name"
|
@@ -1,12 +1,18 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
<% 5.times do%>
|
2
|
+
<br>
|
3
|
+
<%end%>
|
4
|
+
|
5
|
+
<%= pb_rails("filter", props: {
|
6
|
+
id: "so",
|
7
|
+
sort_menu: [
|
8
|
+
{item:"Popularity", link:"#", active: true, direction:"desc"},
|
9
|
+
{item:"Title", link:"#", active: false},
|
10
|
+
{item:"Name", link:"#", active: false},
|
11
|
+
],
|
12
|
+
template:"sort_only",
|
13
|
+
background: false,
|
14
|
+
}) do%>
|
15
|
+
<% end %>
|
16
|
+
<% 5.times do%>
|
17
|
+
<br>
|
18
|
+
<%end%>
|
@@ -1,18 +1,48 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
import { Filter } from '../../'
|
2
|
+
import { Button, Filter, Flex, Select, TextInput } from '../../'
|
3
3
|
|
4
|
-
const SortOnly = () =>
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
4
|
+
const SortOnly = () => {
|
5
|
+
const options = [
|
6
|
+
{ value: 'USA' },
|
7
|
+
{ value: 'Canada' },
|
8
|
+
{ value: 'Brazil' },
|
9
|
+
{ value: 'Philippines' },
|
10
|
+
{ value: 'A Galaxy Far Far Away Like Really Far Away' },
|
11
|
+
]
|
12
|
+
return (
|
13
|
+
<Filter
|
14
|
+
background={false}
|
15
|
+
sortMenu={[
|
16
|
+
{ item: 'Popularity', link: '#', active: true, direction: 'desc' },
|
17
|
+
{ item: 'Title', link: '#', active: false },
|
18
|
+
{ item: 'Name', link: '#', active: false },
|
19
|
+
]}
|
20
|
+
template="sort_only"
|
21
|
+
>
|
22
|
+
<TextInput
|
23
|
+
label="Full Name"
|
24
|
+
placeholder="Enter name"
|
25
|
+
/>
|
26
|
+
|
27
|
+
<Select
|
28
|
+
blankSelection="Select One..."
|
29
|
+
label="Territory"
|
30
|
+
name="location"
|
31
|
+
options={options}
|
32
|
+
/>
|
33
|
+
<Flex
|
34
|
+
spacing="between"
|
35
|
+
>
|
36
|
+
<Button
|
37
|
+
text="Apply"
|
38
|
+
/>
|
39
|
+
<Button
|
40
|
+
text="Clear"
|
41
|
+
variant="secondary"
|
42
|
+
/>
|
43
|
+
</Flex>
|
44
|
+
</Filter>
|
45
|
+
)
|
46
|
+
}
|
17
47
|
|
18
48
|
export default SortOnly
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%end%>
|
14
14
|
|
15
15
|
<% if object.template != "filter_only"%>
|
16
|
-
<%= pb_rails("popover", props: {
|
16
|
+
<%= pb_rails("popover", props: { close_on_click: "outside", trigger_element_id: "sort-button#{object.id}", tooltip_id: "sort-filter-btn-tooltip#{object.id}", position: 'bottom'}) do %>
|
17
17
|
<%= pb_rails("list") do %>
|
18
18
|
<% object.sort_menu.each do |item| %>
|
19
19
|
<%= pb_rails("list/item") do%> <%= pb_rails("button", props: {variant: "link" ,classname: "p-0", text: item[:item], link: item[:link]}) %><% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import React, { Component } from 'react'
|
2
|
+
import PropTypes from 'prop-types'
|
3
|
+
|
4
|
+
const propTypes = {
|
5
|
+
children: PropTypes.oneOfType([
|
6
|
+
PropTypes.arrayOf(PropTypes.node),
|
7
|
+
PropTypes.node,
|
8
|
+
]),
|
9
|
+
}
|
10
|
+
|
11
|
+
class Body extends Component {
|
12
|
+
render() {
|
13
|
+
const {
|
14
|
+
children,
|
15
|
+
} = this.props
|
16
|
+
return (
|
17
|
+
<div className="layout_body">
|
18
|
+
{children}
|
19
|
+
</div>
|
20
|
+
)
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
Body.propTypes = propTypes
|
25
|
+
|
26
|
+
export default Body
|
@@ -2,108 +2,56 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
+
|
5
6
|
import {
|
6
7
|
buildAriaProps,
|
7
8
|
buildCss,
|
8
9
|
buildDataProps,
|
9
10
|
} from '../utilities/props'
|
10
11
|
|
11
|
-
type
|
12
|
+
type LayoutProps = {
|
12
13
|
aria?: object,
|
13
|
-
children?: Array<React.
|
14
|
-
className?: String,
|
14
|
+
children?: Array<React.ReactChild>,
|
15
15
|
collapse?: 'xs' | 'sm' | 'md' | 'lg' | 'xl',
|
16
16
|
dark?: Boolean,
|
17
17
|
data?: object,
|
18
18
|
full?: Boolean,
|
19
19
|
position?: 'left' | 'right',
|
20
20
|
size?: 'xs' | 'sm' | 'md' | 'base' | 'lg' | 'xl',
|
21
|
-
variant?: 'light' | 'dark' | 'gradient',
|
22
21
|
transparent?: Boolean
|
23
22
|
}
|
24
23
|
|
25
|
-
type LayoutSideProps = {
|
26
|
-
children: Array<React.ReactNode> | React.ReactNode,
|
27
|
-
className?: String,
|
28
|
-
}
|
29
|
-
|
30
|
-
type LayoutBodyProps = {
|
31
|
-
children: Array<React.ReactNode> | React.ReactNode,
|
32
|
-
className?: String,
|
33
|
-
}
|
34
|
-
|
35
|
-
// Side component
|
36
|
-
const Side = ({
|
37
|
-
children,
|
38
|
-
className,
|
39
|
-
}: LayoutSideProps) => {
|
40
|
-
return (
|
41
|
-
<div className={classnames('layout_sidebar', className)}>
|
42
|
-
{children}
|
43
|
-
</div>
|
44
|
-
)
|
45
|
-
}
|
46
|
-
|
47
|
-
// Body component
|
48
|
-
const Body = ({
|
49
|
-
children,
|
50
|
-
className,
|
51
|
-
}: LayoutBodyProps) => {
|
52
|
-
return (
|
53
|
-
<div className={classnames('layout_body', className)}>
|
54
|
-
{children}
|
55
|
-
</div>
|
56
|
-
)
|
57
|
-
}
|
58
|
-
|
59
|
-
// Main componenet
|
60
24
|
const Layout = ({
|
61
25
|
aria = {},
|
62
26
|
children,
|
63
|
-
className,
|
64
27
|
collapse = 'md',
|
65
28
|
dark = false,
|
66
29
|
data = {},
|
67
30
|
full = false,
|
68
31
|
position = 'left',
|
69
|
-
size = 'md',
|
70
|
-
variant = 'light',
|
71
32
|
transparent = false,
|
72
|
-
|
33
|
+
size = 'base',
|
34
|
+
}: LayoutProps) => {
|
73
35
|
const ariaProps = buildAriaProps(aria)
|
74
36
|
const dataProps = buildDataProps(data)
|
75
|
-
const
|
76
|
-
'
|
77
|
-
'
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
const layoutChildren = typeof(children) === 'object' && children.length ? children : [children]
|
83
|
-
|
84
|
-
const subComponentTags = (tagName) => {
|
85
|
-
return layoutChildren.filter((c) => {
|
86
|
-
return c.type && c.type.displayName === tagName
|
87
|
-
}).map((child, i) => {
|
88
|
-
return React.cloneElement(child, { key: `${tagName.toLowerCase()}-${i}` })
|
37
|
+
const classes = classnames(
|
38
|
+
buildCss('layout', position, 'collapse', collapse),
|
39
|
+
buildCss('pb_layout_kit', size, position, {
|
40
|
+
'dark': dark,
|
41
|
+
'transparent': transparent,
|
42
|
+
'full': full,
|
89
43
|
})
|
90
|
-
|
91
|
-
|
92
|
-
const nonSideChildren = layoutChildren.filter((child) => !child.type || child.type.displayName !== 'Side')
|
44
|
+
)
|
93
45
|
|
94
46
|
return (
|
95
47
|
<div
|
96
48
|
{...ariaProps}
|
97
49
|
{...dataProps}
|
98
|
-
className={classnames(
|
50
|
+
className={classnames(classes)}
|
99
51
|
>
|
100
|
-
{
|
101
|
-
{nonSideChildren}
|
52
|
+
{children}
|
102
53
|
</div>
|
103
54
|
)
|
104
55
|
}
|
105
56
|
|
106
|
-
Layout.Side = Side
|
107
|
-
Layout.Body = Body
|
108
|
-
|
109
57
|
export default Layout
|