playbook_ui_docs 13.18.0.pre.alpha.useexactnodejsversionghactions2183 → 13.19.0.pre.alpha.PBNTR207tabledivsupport2245
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/docs/_advanced_table_inline_row_loading.jsx +58 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.md +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js +200 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.html.erb +49 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +68 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.html.erb +42 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.jsx +83 -0
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_filter/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_div.html.erb +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_div.jsx +46 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
- data/dist/menu.yml +1 -1
- data/dist/playbook-doc.js +6 -6
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f46c37c2eca826cb24861f95445c890d8d4ad23323dae2bf2bc20da61550f18
|
4
|
+
data.tar.gz: a9bb15e4be05af63c48a923bc0ba6f13adbaee4dbc468bc6084f611ad31d0aae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1d281da841af3a27f74d3bf004052d93cde45aec96f7556b5a5704dae4cefd362e038e3d28ced650f90531cb847a1e0d8982ab06846d497fe0dc819b9df5ee
|
7
|
+
data.tar.gz: 3c4d5adbfe9c56ff0ed82b64d715c3ff771fdb5a256c61ff7c6481d8e8f172c93171d92dc6fe57d5a8e0b63e5543e37768ed389db131345738c97047007e2232
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { AdvancedTable } from "../..";
|
3
|
+
import { MOCK_DATA_INLINE_LOADING } from "./_mock_data_inline_loading";
|
4
|
+
|
5
|
+
const AdvancedTableInlineRowLoading = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "newEnrollments",
|
14
|
+
label: "New Enrollments",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "scheduledMeetings",
|
18
|
+
label: "Scheduled Meetings",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "attendanceRate",
|
22
|
+
label: "Attendance Rate",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "completedClasses",
|
26
|
+
label: "Completed Classes",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "classCompletionRate",
|
30
|
+
label: "Class Completion Rate",
|
31
|
+
},
|
32
|
+
{
|
33
|
+
accessor: "graduatedStudents",
|
34
|
+
label: "Graduated Students",
|
35
|
+
},
|
36
|
+
];
|
37
|
+
|
38
|
+
//Render the subRow header rows
|
39
|
+
const subRowHeaders = ["Quarter", "Month", "Day"]
|
40
|
+
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<AdvancedTable
|
45
|
+
columnDefinitions={columnDefinitions}
|
46
|
+
enableToggleExpansion="all"
|
47
|
+
inlineRowLoading
|
48
|
+
tableData={MOCK_DATA_INLINE_LOADING}
|
49
|
+
{...props}
|
50
|
+
>
|
51
|
+
<AdvancedTable.Header />
|
52
|
+
<AdvancedTable.Body subRowHeaders={subRowHeaders}/>
|
53
|
+
</AdvancedTable>
|
54
|
+
</div>
|
55
|
+
);
|
56
|
+
};
|
57
|
+
|
58
|
+
export default AdvancedTableInlineRowLoading;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
As a default, the kit assumes that the initial dataset is complete, and it renders all expansion buttons/controls based on that data; if no children are present, no expansion controls are rendered. If, however, you want to change the initial dataset to omit some or all of its children (to improve load times of a complex dataset, perhaps), and you implement a querying logic that loads children only when its parent is expanded, then you must use the `inlineRowLoading` prop to ensure your expansion controls are rendered even though your child data is not yet loaded. You must also pass an empty `children` array to any node that will have children to ensure its parent maintains its ability to expand. If this prop is called AND your data contains empty `children` arrays, the kit will render expansion controls on any row with empty children, and then add an inline loading state within the expanded subrow until those child row(s) are returned to the page [by your query logic].
|
2
|
+
|
3
|
+
In this code example, 2021 has an empty children array. Toggle it open to see the inline loading state. Once the correct data loads, this state will be replaced with the correct data rows.
|
4
|
+
|
5
|
+
This prop is set to `false` by default.
|
@@ -0,0 +1,200 @@
|
|
1
|
+
export const MOCK_DATA_INLINE_LOADING = [
|
2
|
+
{
|
3
|
+
year: "2021",
|
4
|
+
quarter: null,
|
5
|
+
month: null,
|
6
|
+
day: null,
|
7
|
+
newEnrollments: "20",
|
8
|
+
scheduledMeetings: "10",
|
9
|
+
attendanceRate: "51%",
|
10
|
+
completedClasses: "3",
|
11
|
+
classCompletionRate: "33%",
|
12
|
+
graduatedStudents: "19",
|
13
|
+
children: [],
|
14
|
+
},
|
15
|
+
{
|
16
|
+
year: "2022",
|
17
|
+
quarter: null,
|
18
|
+
month: null,
|
19
|
+
day: null,
|
20
|
+
newEnrollments: "25",
|
21
|
+
scheduledMeetings: "17",
|
22
|
+
attendanceRate: "75%",
|
23
|
+
completedClasses: "5",
|
24
|
+
classCompletionRate: "45%",
|
25
|
+
graduatedStudents: "32",
|
26
|
+
children: [
|
27
|
+
{
|
28
|
+
year: "2022",
|
29
|
+
quarter: "Q1",
|
30
|
+
month: null,
|
31
|
+
day: null,
|
32
|
+
newEnrollments: "2",
|
33
|
+
scheduledMeetings: "35",
|
34
|
+
attendanceRate: "32%",
|
35
|
+
completedClasses: "15",
|
36
|
+
classCompletionRate: "52%",
|
37
|
+
graduatedStudents: "36",
|
38
|
+
children: [
|
39
|
+
{
|
40
|
+
year: "2022",
|
41
|
+
quarter: "Q1",
|
42
|
+
month: "January",
|
43
|
+
day: null,
|
44
|
+
newEnrollments: "16",
|
45
|
+
scheduledMeetings: "20",
|
46
|
+
attendanceRate: "11%",
|
47
|
+
completedClasses: "13",
|
48
|
+
classCompletionRate: "47%",
|
49
|
+
graduatedStudents: "28",
|
50
|
+
children: [
|
51
|
+
{
|
52
|
+
year: "2022",
|
53
|
+
quarter: "Q1",
|
54
|
+
month: "January",
|
55
|
+
day: "15",
|
56
|
+
newEnrollments: "34",
|
57
|
+
scheduledMeetings: "28",
|
58
|
+
attendanceRate: "97%",
|
59
|
+
completedClasses: "20",
|
60
|
+
classCompletionRate: "15%",
|
61
|
+
graduatedStudents: "17",
|
62
|
+
},
|
63
|
+
{
|
64
|
+
year: "2022",
|
65
|
+
quarter: "Q1",
|
66
|
+
month: "January",
|
67
|
+
day: "25",
|
68
|
+
newEnrollments: "43",
|
69
|
+
scheduledMeetings: "23",
|
70
|
+
attendanceRate: "66%",
|
71
|
+
completedClasses: "26",
|
72
|
+
classCompletionRate: "47%",
|
73
|
+
graduatedStudents: "9",
|
74
|
+
},
|
75
|
+
],
|
76
|
+
},
|
77
|
+
{
|
78
|
+
year: "2022",
|
79
|
+
quarter: "Q1",
|
80
|
+
month: "May",
|
81
|
+
day: null,
|
82
|
+
newEnrollments: "20",
|
83
|
+
scheduledMeetings: "41",
|
84
|
+
attendanceRate: "95%",
|
85
|
+
completedClasses: "26",
|
86
|
+
classCompletionRate: "83%",
|
87
|
+
graduatedStudents: "43",
|
88
|
+
children: [
|
89
|
+
{
|
90
|
+
year: "2011",
|
91
|
+
quarter: "Q1",
|
92
|
+
month: "May",
|
93
|
+
day: "2",
|
94
|
+
newEnrollments: "19",
|
95
|
+
scheduledMeetings: "35",
|
96
|
+
attendanceRate: "69%",
|
97
|
+
completedClasses: "8",
|
98
|
+
classCompletionRate: "75%",
|
99
|
+
graduatedStudents: "23",
|
100
|
+
},
|
101
|
+
],
|
102
|
+
},
|
103
|
+
],
|
104
|
+
},
|
105
|
+
],
|
106
|
+
},
|
107
|
+
{
|
108
|
+
year: "2023",
|
109
|
+
quarter: null,
|
110
|
+
month: null,
|
111
|
+
day: null,
|
112
|
+
newEnrollments: "10",
|
113
|
+
scheduledMeetings: "15",
|
114
|
+
attendanceRate: "65%",
|
115
|
+
completedClasses: "4",
|
116
|
+
classCompletionRate: "49%",
|
117
|
+
graduatedStudents: "29",
|
118
|
+
children: [
|
119
|
+
{
|
120
|
+
year: "2023",
|
121
|
+
quarter: "Q1",
|
122
|
+
month: null,
|
123
|
+
day: null,
|
124
|
+
newEnrollments: "2",
|
125
|
+
scheduledMeetings: "35",
|
126
|
+
attendanceRate: "32%",
|
127
|
+
completedClasses: "15",
|
128
|
+
classCompletionRate: "52%",
|
129
|
+
graduatedStudents: "36",
|
130
|
+
children: [
|
131
|
+
{
|
132
|
+
year: "2023",
|
133
|
+
quarter: "Q1",
|
134
|
+
month: "March",
|
135
|
+
day: null,
|
136
|
+
newEnrollments: "16",
|
137
|
+
scheduledMeetings: "20",
|
138
|
+
attendanceRate: "11%",
|
139
|
+
completedClasses: "13",
|
140
|
+
classCompletionRate: "47%",
|
141
|
+
graduatedStudents: "28",
|
142
|
+
children: [
|
143
|
+
{
|
144
|
+
year: "2023",
|
145
|
+
quarter: "Q1",
|
146
|
+
month: "March",
|
147
|
+
day: "10",
|
148
|
+
newEnrollments: "34",
|
149
|
+
scheduledMeetings: "28",
|
150
|
+
attendanceRate: "97%",
|
151
|
+
completedClasses: "20",
|
152
|
+
classCompletionRate: "15%",
|
153
|
+
graduatedStudents: "17",
|
154
|
+
},
|
155
|
+
{
|
156
|
+
year: "2023",
|
157
|
+
quarter: "Q1",
|
158
|
+
month: "March",
|
159
|
+
day: "11",
|
160
|
+
newEnrollments: "43",
|
161
|
+
scheduledMeetings: "23",
|
162
|
+
attendanceRate: "66%",
|
163
|
+
completedClasses: "26",
|
164
|
+
classCompletionRate: "47%",
|
165
|
+
graduatedStudents: "9",
|
166
|
+
},
|
167
|
+
],
|
168
|
+
},
|
169
|
+
{
|
170
|
+
year: "2023",
|
171
|
+
quarter: "Q1",
|
172
|
+
month: "April",
|
173
|
+
day: null,
|
174
|
+
newEnrollments: "20",
|
175
|
+
scheduledMeetings: "41",
|
176
|
+
attendanceRate: "95%",
|
177
|
+
completedClasses: "26",
|
178
|
+
classCompletionRate: "83%",
|
179
|
+
graduatedStudents: "43",
|
180
|
+
children: [
|
181
|
+
{
|
182
|
+
year: "2023",
|
183
|
+
quarter: "Q1",
|
184
|
+
month: "April",
|
185
|
+
day: "15",
|
186
|
+
newEnrollments: "19",
|
187
|
+
scheduledMeetings: "35",
|
188
|
+
attendanceRate: "69%",
|
189
|
+
completedClasses: "8",
|
190
|
+
classCompletionRate: "75%",
|
191
|
+
graduatedStudents: "23",
|
192
|
+
},
|
193
|
+
],
|
194
|
+
},
|
195
|
+
],
|
196
|
+
},
|
197
|
+
],
|
198
|
+
},
|
199
|
+
];
|
200
|
+
|
@@ -7,3 +7,4 @@ export { default as AdvancedTableSubrowHeaders } from './_advanced_table_subrow_
|
|
7
7
|
export { default as AdvancedTableCollapsibleTrail } from './_advanced_table_collapsible_trail.jsx'
|
8
8
|
export { default as AdvancedTableTableOptions } from './_advanced_table_table_options.jsx'
|
9
9
|
export { default as AdvancedTableTableProps } from './_advanced_table_table_props.jsx'
|
10
|
+
export { default as AdvancedTableInlineRowLoading } from './_advanced_table_inline_row_loading.jsx'
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<% data = [{
|
2
|
+
name: 'Installation',
|
3
|
+
data: [1475,200,3000,654,656]
|
4
|
+
}, {
|
5
|
+
name: 'Manufacturing',
|
6
|
+
data: [4434,524,2320,440,500]
|
7
|
+
}, {
|
8
|
+
name: 'Sales & Distribution',
|
9
|
+
data: [3387,743,1344,434,440,]
|
10
|
+
}, {
|
11
|
+
name: 'Project Development',
|
12
|
+
data: [3227,878,999,780,1000]
|
13
|
+
}, {
|
14
|
+
name: 'Other',
|
15
|
+
data: [1111,677,3245,500,200]
|
16
|
+
}] %>
|
17
|
+
|
18
|
+
<% custom_options = {
|
19
|
+
customOptions: {
|
20
|
+
subtitle: {
|
21
|
+
text: "Overwritten subtitle",
|
22
|
+
style: {
|
23
|
+
color: "red"
|
24
|
+
}
|
25
|
+
},
|
26
|
+
xAxis: {
|
27
|
+
categories: [
|
28
|
+
'<i class="far fa-apple-whole"></i> Jan',
|
29
|
+
'<i class="far fa-strawberry"></i> Feb',
|
30
|
+
'<i class="far fa-lemon"></i> Mar',
|
31
|
+
'<i class="far fa-pear"></i> Apr',
|
32
|
+
'<i class="far fa-peach"></i> May'
|
33
|
+
],
|
34
|
+
labels: {
|
35
|
+
useHTML: true,
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
} %>
|
40
|
+
|
41
|
+
<%= pb_rails("bar_graph", props: {
|
42
|
+
axis_title: 'Number of Employees',
|
43
|
+
chart_data: data,
|
44
|
+
id: "bar-default",
|
45
|
+
y_axis_min: 0,
|
46
|
+
subtitle: 'Subtitle to replace',
|
47
|
+
title: 'Bar Graph with Custom Overrides',
|
48
|
+
custom_options: custom_options
|
49
|
+
}) %>
|
@@ -0,0 +1,68 @@
|
|
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
|
+
name: 'Manufacturing',
|
10
|
+
data: [4434, 524, 2320, 440, 500],
|
11
|
+
}, {
|
12
|
+
name: 'Sales & Distribution',
|
13
|
+
data: [3387, 743, 1344, 434, 440],
|
14
|
+
}, {
|
15
|
+
name: 'Project Development',
|
16
|
+
data: [3227, 878, 999, 780, 1000],
|
17
|
+
}, {
|
18
|
+
name: 'Other',
|
19
|
+
data: [1111, 677, 3245, 500, 200],
|
20
|
+
}]
|
21
|
+
|
22
|
+
const barGraphOptions = {
|
23
|
+
subtitle: {
|
24
|
+
text: "Overwritten subtitle",
|
25
|
+
style: {
|
26
|
+
color: "red"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
xAxis: {
|
30
|
+
labels: {
|
31
|
+
useHTML: true,
|
32
|
+
formatter: function() {
|
33
|
+
switch (this.value) {
|
34
|
+
case 'Jan':
|
35
|
+
return `<i class="far fa-apple-whole"></i> ${this.value}`
|
36
|
+
case 'Feb':
|
37
|
+
return `<i class="far fa-strawberry"></i> ${this.value}`
|
38
|
+
case 'Mar':
|
39
|
+
return `<i class="far fa-lemon"></i> ${this.value}`
|
40
|
+
case 'Apr':
|
41
|
+
return `<i class="far fa-pear"></i> ${this.value}`
|
42
|
+
case 'May':
|
43
|
+
return `<i class="far fa-peach"></i> ${this.value}`
|
44
|
+
default:
|
45
|
+
return ''
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
const BarGraphCustom = (props) => (
|
53
|
+
<div>
|
54
|
+
<BarGraph
|
55
|
+
axisTitle="Number of Employees"
|
56
|
+
chartData={chartData}
|
57
|
+
customOptions={barGraphOptions}
|
58
|
+
id="bar-custom"
|
59
|
+
subTitle="Subtitle to replace"
|
60
|
+
title="Bar Graph with Custom Overrides"
|
61
|
+
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
62
|
+
yAxisMin={0}
|
63
|
+
{...props}
|
64
|
+
/>
|
65
|
+
</div>
|
66
|
+
)
|
67
|
+
|
68
|
+
export default BarGraphCustom
|
@@ -0,0 +1 @@
|
|
1
|
+
See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
|
@@ -8,6 +8,7 @@ examples:
|
|
8
8
|
- bar_graph_height: Height
|
9
9
|
- bar_graph_spline: Spline
|
10
10
|
- bar_graph_colors: Color Overrides
|
11
|
+
- bar_graph_custom: Custom Overrides
|
11
12
|
|
12
13
|
|
13
14
|
react:
|
@@ -18,3 +19,4 @@ examples:
|
|
18
19
|
- bar_graph_height: Height
|
19
20
|
- bar_graph_spline: Spline
|
20
21
|
- bar_graph_colors: Color Overrides
|
22
|
+
- bar_graph_custom: Custom Overrides
|
@@ -5,3 +5,4 @@ export { default as BarGraphLegendNonClickable } from './_bar_graph_legend_non_c
|
|
5
5
|
export { default as BarGraphHeight } from './_bar_graph_height.jsx'
|
6
6
|
export { default as BarGraphSpline } from './_bar_graph_spline.jsx'
|
7
7
|
export { default as BarGraphColors } from './_bar_graph_colors.jsx'
|
8
|
+
export { default as BarGraphCustom } from './_bar_graph_custom.jsx'
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<%=
|
2
|
+
pb_rails("filter", props: {
|
3
|
+
max_height: "360px",
|
4
|
+
id: "filter_max_height_rails",
|
5
|
+
position: "top",
|
6
|
+
filters: [
|
7
|
+
{ name: "name", value: "John Wick" },
|
8
|
+
{ name: "city", value: "San Francisco"}
|
9
|
+
],
|
10
|
+
sort_menu: [
|
11
|
+
{ item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
|
12
|
+
{ item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
|
13
|
+
{ item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
|
14
|
+
],
|
15
|
+
template: "default",
|
16
|
+
results: 1,
|
17
|
+
}) do
|
18
|
+
%>
|
19
|
+
<%
|
20
|
+
example_collection = [
|
21
|
+
OpenStruct.new(name: "USA", value: 1),
|
22
|
+
OpenStruct.new(name: "Canada", value: 2),
|
23
|
+
OpenStruct.new(name: "Brazil", value: 3),
|
24
|
+
OpenStruct.new(name: "Philippines", value: 4),
|
25
|
+
OpenStruct.new(name: "A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...", value: 5)
|
26
|
+
]
|
27
|
+
%>
|
28
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
29
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
30
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
31
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
32
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
33
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
34
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
35
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: {max_width: "sm", label: true } %>
|
36
|
+
|
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" } %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Button, Filter, Flex, Select, TextInput } from '../..'
|
3
|
+
|
4
|
+
const FilterMaxHeight = (props) => {
|
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 far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...' },
|
11
|
+
]
|
12
|
+
return (
|
13
|
+
<Filter
|
14
|
+
{...props}
|
15
|
+
double
|
16
|
+
filters={{
|
17
|
+
'Full Name': 'John Wick',
|
18
|
+
'City': 'San Francisco',
|
19
|
+
}}
|
20
|
+
maxHeight="360px"
|
21
|
+
minWidth="360px"
|
22
|
+
results={1}
|
23
|
+
sortOptions={{
|
24
|
+
popularity: 'Popularity',
|
25
|
+
// eslint-disable-next-line
|
26
|
+
manager_title: 'Manager\'s Title',
|
27
|
+
// eslint-disable-next-line
|
28
|
+
manager_name: 'Manager\'s Name',
|
29
|
+
}}
|
30
|
+
sortValue={[{ name: 'popularity', dir: 'desc' }]}
|
31
|
+
>
|
32
|
+
{({ closePopover }) => (
|
33
|
+
<form>
|
34
|
+
<Select
|
35
|
+
blankSelection="Select One..."
|
36
|
+
label="Territory"
|
37
|
+
name="location"
|
38
|
+
options={options}
|
39
|
+
/>
|
40
|
+
<TextInput
|
41
|
+
label="First Name"
|
42
|
+
placeholder="Enter name"
|
43
|
+
{...props}
|
44
|
+
/>
|
45
|
+
<TextInput
|
46
|
+
label="Middle Name"
|
47
|
+
placeholder="Enter name"
|
48
|
+
{...props}
|
49
|
+
/>
|
50
|
+
<TextInput
|
51
|
+
label="Last Name"
|
52
|
+
placeholder="Enter name"
|
53
|
+
{...props}
|
54
|
+
/>
|
55
|
+
<TextInput
|
56
|
+
label="Email"
|
57
|
+
placeholder="Enter email"
|
58
|
+
{...props}
|
59
|
+
/>
|
60
|
+
<TextInput
|
61
|
+
label="Address"
|
62
|
+
placeholder="Enter address"
|
63
|
+
{...props}
|
64
|
+
/>
|
65
|
+
<Flex
|
66
|
+
spacing="between"
|
67
|
+
>
|
68
|
+
<Button
|
69
|
+
onClick={closePopover}
|
70
|
+
text="Apply"
|
71
|
+
/>
|
72
|
+
<Button
|
73
|
+
text="Clear"
|
74
|
+
variant="secondary"
|
75
|
+
/>
|
76
|
+
</Flex>
|
77
|
+
</form>
|
78
|
+
)}
|
79
|
+
</Filter>
|
80
|
+
)
|
81
|
+
}
|
82
|
+
|
83
|
+
export default FilterMaxHeight
|
@@ -8,6 +8,7 @@ examples:
|
|
8
8
|
- filter_only: Filter Only
|
9
9
|
- sort_only: Sort Only
|
10
10
|
- filter_max_width: Max Width for Popover Inside of Filter
|
11
|
+
- filter_max_height: Max Height for Popover Inside of Filter
|
11
12
|
- filter_placement: Filter Placement
|
12
13
|
|
13
14
|
react:
|
@@ -18,4 +19,5 @@ examples:
|
|
18
19
|
- filter_only: Filter Only
|
19
20
|
- sort_only: Sort Only
|
20
21
|
- filter_max_width: Max Width for Popover Inside of Filter
|
22
|
+
- filter_max_height: Max Height for Popover Inside of Filter
|
21
23
|
- filter_placement: Filter Placement
|
@@ -5,4 +5,5 @@ export { default as FilterNoBackground } from './_filter_no_background.jsx'
|
|
5
5
|
export { default as FilterOnly } from './_filter_only.jsx'
|
6
6
|
export { default as SortOnly } from './_sort_only.jsx'
|
7
7
|
export { default as FilterMaxWidth } from './_filter_max_width.jsx'
|
8
|
+
export { default as FilterMaxHeight } from './_filter_max_height.jsx'
|
8
9
|
export { default as FilterPlacement } from './_filter_placement.jsx'
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<%= pb_rails("table", props: { size: "sm", tag: "div" }) do %>
|
2
|
+
<div class="thead">
|
3
|
+
<div class="tr">
|
4
|
+
<div class="th">Column 1</div>
|
5
|
+
<div class="th">Column 2</div>
|
6
|
+
<div class="th">Column 3</div>
|
7
|
+
<div class="th">Column 4</div>
|
8
|
+
<div class="th">Column 5</div>
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<div class="tbody">
|
12
|
+
<div class="tr">
|
13
|
+
<div class="td">Value 1</div>
|
14
|
+
<div class="td">Value 2</div>
|
15
|
+
<div class="td">Value 3</div>
|
16
|
+
<div class="td">Value 4</div>
|
17
|
+
<div class="td">Value 5</div>
|
18
|
+
</div>
|
19
|
+
<div class="tr">
|
20
|
+
<div class="td">Value 1</div>
|
21
|
+
<div class="td">Value 2</div>
|
22
|
+
<div class="td">Value 3</div>
|
23
|
+
<div class="td">Value 4</div>
|
24
|
+
<div class="td">Value 5</div>
|
25
|
+
</div>
|
26
|
+
<div class="tr">
|
27
|
+
<div class="td">Value 1</div>
|
28
|
+
<div class="td">Value 2</div>
|
29
|
+
<div class="td">Value 3</div>
|
30
|
+
<div class="td">Value 4</div>
|
31
|
+
<div class="td">Value 5</div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
<% end %>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Table from '../_table'
|
3
|
+
|
4
|
+
const TableDiv = (props) => {
|
5
|
+
return (
|
6
|
+
<Table
|
7
|
+
size="sm"
|
8
|
+
{...props}
|
9
|
+
>
|
10
|
+
<div className="thead">
|
11
|
+
<div className="tr">
|
12
|
+
<div className="th">{'Column 1'}</div>
|
13
|
+
<div className="th">{'Column 2'}</div>
|
14
|
+
<div className="th">{'Column 3'}</div>
|
15
|
+
<div className="th">{'Column 4'}</div>
|
16
|
+
<div className="th">{'Column 5'}</div>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div className="tbody">
|
20
|
+
<div className="tr">
|
21
|
+
<div className="td">{'Value 1'}</div>
|
22
|
+
<div className="td">{'Value 2'}</div>
|
23
|
+
<div className="td">{'Value 3'}</div>
|
24
|
+
<div className="td">{'Value 4'}</div>
|
25
|
+
<div className="td">{'Value 5'}</div>
|
26
|
+
</div>
|
27
|
+
<div className="tr">
|
28
|
+
<div className="td">{'Value 1'}</div>
|
29
|
+
<div className="td">{'Value 2'}</div>
|
30
|
+
<div className="td">{'Value 3'}</div>
|
31
|
+
<div className="td">{'Value 4'}</div>
|
32
|
+
<div className="td">{'Value 5'}</div>
|
33
|
+
</div>
|
34
|
+
<div className="tr">
|
35
|
+
<div className="td">{'Value 1'}</div>
|
36
|
+
<div className="td">{'Value 2'}</div>
|
37
|
+
<div className="td">{'Value 3'}</div>
|
38
|
+
<div className="td">{'Value 4'}</div>
|
39
|
+
<div className="td">{'Value 5'}</div>
|
40
|
+
</div>
|
41
|
+
</div>
|
42
|
+
</Table>
|
43
|
+
)
|
44
|
+
}
|
45
|
+
|
46
|
+
export default TableDiv
|
@@ -1,5 +1,6 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
|
+
- table_div: Div
|
3
4
|
- table_sm: Small
|
4
5
|
- table_md: Medium
|
5
6
|
- table_lg: Large
|
@@ -26,6 +27,7 @@ examples:
|
|
26
27
|
- table_striped: Striped Table
|
27
28
|
|
28
29
|
react:
|
30
|
+
- table_div: Div
|
29
31
|
- table_sm: Small
|
30
32
|
- table_md: Medium
|
31
33
|
- table_lg: Large
|