playbook_ui_docs 14.24.0.pre.alpha.PLAY19989342 → 14.24.0.pre.alpha.PLAY23139411
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/pb_advanced_table/docs/_advanced_table_padding_control.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_date/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_date/docs/index.js +0 -1
- data/dist/playbook-doc.js +1 -1
- metadata +6 -5
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +0 -4
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +0 -17
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0de875159380600189994ed20174c469e68169fa7596c395afeda3ee9f4ace98
|
4
|
+
data.tar.gz: 96e03349d30ba93c884dbe83db41cf4898367375bcd934b4d6d8e26fd345f20c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92219fef1f922c6f0038be01e1011cf609b95bfe84a50c90776ec00cae95f82a5392dbf1c7044ed23f9f70f11bef02943f705241dd78512bca3bb159fad1701a
|
7
|
+
data.tar.gz: a108383d3960c900d7786e5596dafb2a79cf08d484599d458236e1136bbeec7a186ed25c13f1611e62136af1cf04e2578eb416e28121a9f48f23cdcb32efd34b
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../_advanced_table'
|
3
|
+
import Background from '../../pb_background/_background'
|
4
|
+
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
5
|
+
|
6
|
+
const AdvancedTablePaddingControl = (props) => {
|
7
|
+
const columnDefinitions = [
|
8
|
+
{
|
9
|
+
accessor: "year",
|
10
|
+
label: "Year",
|
11
|
+
cellAccessors: ["quarter", "month", "day"],
|
12
|
+
},
|
13
|
+
{
|
14
|
+
accessor: "newEnrollments",
|
15
|
+
label: "New Enrollments",
|
16
|
+
columnStyling:{cellPadding: "none"},
|
17
|
+
customRenderer: (row, value) => (
|
18
|
+
<Background
|
19
|
+
backgroundColor={row.original.newEnrollments > 20 ? "success_secondary" : "warning_secondary"}
|
20
|
+
padding="xs"
|
21
|
+
>
|
22
|
+
{value}
|
23
|
+
</Background>
|
24
|
+
),
|
25
|
+
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "scheduledMeetings",
|
29
|
+
label: "Scheduled Meetings",
|
30
|
+
},
|
31
|
+
{
|
32
|
+
accessor: "attendanceRate",
|
33
|
+
label: "Attendance Rate",
|
34
|
+
},
|
35
|
+
{
|
36
|
+
accessor: "completedClasses",
|
37
|
+
label: "Completed Classes",
|
38
|
+
},
|
39
|
+
{
|
40
|
+
accessor: "classCompletionRate",
|
41
|
+
label: "Class Completion Rate",
|
42
|
+
},
|
43
|
+
{
|
44
|
+
accessor: "graduatedStudents",
|
45
|
+
label: "Graduated Students",
|
46
|
+
},
|
47
|
+
]
|
48
|
+
|
49
|
+
return (
|
50
|
+
<div>
|
51
|
+
<AdvancedTable
|
52
|
+
columnDefinitions={columnDefinitions}
|
53
|
+
tableData={MOCK_DATA}
|
54
|
+
{...props}
|
55
|
+
/>
|
56
|
+
</div>
|
57
|
+
)
|
58
|
+
}
|
59
|
+
|
60
|
+
export default AdvancedTablePaddingControl
|
@@ -0,0 +1,3 @@
|
|
1
|
+
`columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
|
2
|
+
|
3
|
+
This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../_advanced_table'
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
4
|
+
|
5
|
+
const AdvancedTablePaddingControlPerRow = (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
|
+
const rowStyling = [
|
39
|
+
{
|
40
|
+
rowId: "1",
|
41
|
+
cellPadding:"md"
|
42
|
+
},
|
43
|
+
];
|
44
|
+
|
45
|
+
return (
|
46
|
+
<div>
|
47
|
+
<AdvancedTable
|
48
|
+
columnDefinitions={columnDefinitions}
|
49
|
+
rowStyling={rowStyling}
|
50
|
+
tableData={MOCK_DATA}
|
51
|
+
{...props}
|
52
|
+
/>
|
53
|
+
</div>
|
54
|
+
)
|
55
|
+
}
|
56
|
+
|
57
|
+
export default AdvancedTablePaddingControlPerRow
|
@@ -0,0 +1 @@
|
|
1
|
+
`rowStyling` can also be used to control padding on all cells in a given row via the use of the `cellPadding` key/value pair as shown here. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
|
@@ -66,8 +66,10 @@ examples:
|
|
66
66
|
- advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
|
67
67
|
- advanced_table_scrollbar_none: Advanced Table Scrollbar None
|
68
68
|
- advanced_table_row_styling: Row Styling
|
69
|
+
- advanced_table_padding_control_per_row: Padding Control using Row Styling
|
69
70
|
- advanced_table_column_styling: Column Styling
|
70
71
|
- advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
|
72
|
+
- advanced_table_padding_control: Padding Control using Column Styling
|
71
73
|
- advanced_table_column_border_color: Column Group Border Color
|
72
74
|
- advanced_table_fullscreen: Fullscreen
|
73
75
|
- advanced_table_infinite_scroll: Infinite Scroll
|
@@ -42,4 +42,6 @@ export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_c
|
|
42
42
|
export { default as AdvancedTableCustomSort } from './_advanced_table_custom_sort.jsx'
|
43
43
|
export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced_table_with_custom_header_multi_header.jsx'
|
44
44
|
export { default as AdvancedTableSortPerColumn } from './_advanced_table_sort_per_column.jsx'
|
45
|
-
export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
|
45
|
+
export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
|
46
|
+
export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
|
47
|
+
export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'
|
@@ -5,14 +5,12 @@ examples:
|
|
5
5
|
- date_variants: Variants
|
6
6
|
- date_alignment: Alignment
|
7
7
|
- date_timezone: Timezones
|
8
|
-
- date_with_show_current_year: Show Current Year
|
9
8
|
- date_unstyled: Unstyled
|
10
9
|
|
11
10
|
react:
|
12
11
|
- date_default: Default
|
13
12
|
- date_variants: Variants
|
14
13
|
- date_alignment: Alignment
|
15
|
-
- date_with_show_current_year: Show Current Year
|
16
14
|
- date_unstyled: Unstyled
|
17
15
|
|
18
16
|
swift:
|
@@ -2,4 +2,3 @@ export { default as DateDefault } from './_date_default.jsx'
|
|
2
2
|
export { default as DateVariants } from './_date_variants.jsx'
|
3
3
|
export { default as DateAlignment } from './_date_alignment.jsx'
|
4
4
|
export { default as DateUnstyled } from './_date_unstyled.jsx'
|
5
|
-
export { default as DateWithShowCurrentYear } from './_date_with_show_current_year.jsx'
|