playbook_ui_docs 14.16.0.pre.alpha.PLAY1938completetooltipfloatinguitransition6830 → 14.16.0.pre.alpha.play1756pbcontenttag6933
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_pagination.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows.html.erb +39 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +6 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.html.erb +0 -11
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_inline.jsx +0 -7
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx +50 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating.jsx +59 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_header_style_floating_react.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- data/dist/playbook-doc.js +1 -1
- metadata +12 -4
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.md → _advanced_table_selectable_rows_no_subrows_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.md → _advanced_table_selectable_rows_react.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a4bb80b840a66ff4c8f2e5bfa4cea6b089e2ca6d25fad5f09689db8dab5e7e4
|
4
|
+
data.tar.gz: fd2a86c00262913fd901b9fb223fa42977ddf46b995b5bf203775886f933f656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f6cfc418ee1f491039008b031208ab100f6f229936c2d8c3cb4b342c0fb803995ad9ef5a73b72490180b1538faf790702b5a1242ff845f15616209d2870f88b
|
7
|
+
data.tar.gz: ed4ab2c4a666eecbfdad9bcbfa52c7da260475bed10efdde37cd60d35bf55aa90031768c2a5d4b8a142a1bd38b6566500892a40d2bb79a7258205464c6e59d8c
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
accessor: "newEnrollments",
|
9
|
+
label: "New Enrollments",
|
10
|
+
},
|
11
|
+
{
|
12
|
+
accessor: "scheduledMeetings",
|
13
|
+
label: "Scheduled Meetings",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
accessor: "attendanceRate",
|
17
|
+
label: "Attendance Rate",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
accessor: "completedClasses",
|
21
|
+
label: "Completed Classes",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
accessor: "classCompletionRate",
|
25
|
+
label: "Class Completion Rate",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "graduatedStudents",
|
29
|
+
label: "Graduated Students",
|
30
|
+
}
|
31
|
+
]
|
32
|
+
|
33
|
+
subrow_headers = ["Quarter", "Month", "Day"]
|
34
|
+
%>
|
35
|
+
|
36
|
+
<%= pb_rails("advanced_table", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, selectable_rows: true }) do %>
|
37
|
+
<%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions, selectable_rows: true }) %>
|
38
|
+
<%= pb_rails("advanced_table/table_body", props: { id: "selectable_rows", table_data: @table_data_with_id, column_definitions: column_definitions, subrow_headers: subrow_headers, enable_toggle_expansion: "all", selectable_rows: true }) %>
|
39
|
+
<% end %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows.html.erb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
accessor: "newEnrollments",
|
9
|
+
label: "New Enrollments",
|
10
|
+
},
|
11
|
+
{
|
12
|
+
accessor: "scheduledMeetings",
|
13
|
+
label: "Scheduled Meetings",
|
14
|
+
},
|
15
|
+
{
|
16
|
+
accessor: "attendanceRate",
|
17
|
+
label: "Attendance Rate",
|
18
|
+
},
|
19
|
+
{
|
20
|
+
accessor: "completedClasses",
|
21
|
+
label: "Completed Classes",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
accessor: "classCompletionRate",
|
25
|
+
label: "Class Completion Rate",
|
26
|
+
},
|
27
|
+
{
|
28
|
+
accessor: "graduatedStudents",
|
29
|
+
label: "Graduated Students",
|
30
|
+
}
|
31
|
+
] %>
|
32
|
+
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "selectable_rows_no_subrows", table_data: @table_data_no_subrows, column_definitions: column_definitions, selectable_rows: true, enable_toggle_expansion: "none", }) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
`selectable_rows` can also be used with tables without nested row data. Set `enable_toggle_expansion: none` to adjust the Advanced Table styling to fit a table without subrows.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
`selectable_rows` is a boolean prop that if present will add checkboxes to all rows that will allow for selecting rows.
|
2
|
+
|
3
|
+
When a parent row is clicked, it will check all nested children rows, Children rows can be manually checked or unchecked as well.
|
4
|
+
|
5
|
+
__ALERT TO DEVS__: UPDATE THIS PARAGRAPH IN THE FOLLOW UP STORY WHEN CHECKBOX FUNCTIONALITY IS SET PLEASE
|
6
|
+
The `onRowSelectionChange` prop returns an array of ids of all Rows that have been selected. Open the console on this example and check and uncheck checkboxes to see this is action! __NOTE__: Each object within the `tableData`Array must contain a unique id in order to attach an id to all Rows for this to function.
|
@@ -11,6 +11,8 @@ examples:
|
|
11
11
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
12
12
|
- advanced_table_column_headers: Multi-Header Columns
|
13
13
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
14
|
+
# - advanced_table_selectable_rows: Selectable Rows
|
15
|
+
# - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
14
16
|
|
15
17
|
|
16
18
|
react:
|
@@ -4,14 +4,3 @@
|
|
4
4
|
inline: true,
|
5
5
|
picker_id: "date-picker-inline"
|
6
6
|
}) %>
|
7
|
-
|
8
|
-
<%= javascript_tag do %>
|
9
|
-
window.addEventListener("DOMContentLoaded", (event) => {
|
10
|
-
const fpInline = document.querySelector("#date-picker-inline")._flatpickr
|
11
|
-
<!-- Display the angle-down icon when a date has been selected -->
|
12
|
-
const showAngleDownHandler = () => {
|
13
|
-
document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
|
14
|
-
}
|
15
|
-
fpInline.config.onChange.push(showAngleDownHandler)
|
16
|
-
})
|
17
|
-
<% end %>
|
@@ -3,19 +3,12 @@ import React from 'react'
|
|
3
3
|
import DatePicker from '../_date_picker'
|
4
4
|
|
5
5
|
const DatePickerInline = (props) => {
|
6
|
-
const showAngleDownHandler = (dateSelected) => {
|
7
|
-
if (dateSelected) {
|
8
|
-
document.querySelector('.inline-date-picker').classList.add('show-angle-down-icon')
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
6
|
return (
|
13
7
|
<div>
|
14
8
|
<DatePicker
|
15
9
|
className="inline-date-picker"
|
16
10
|
hideIcon
|
17
11
|
inLine
|
18
|
-
onChange={showAngleDownHandler}
|
19
12
|
pickerId="date-picker-inline"
|
20
13
|
{...props}
|
21
14
|
/>
|
@@ -1 +1 @@
|
|
1
|
-
<%= pb_rails("rich_text_editor", props: {id: "
|
1
|
+
<%= pb_rails("rich_text_editor", props: {input_options: { id: 'hidden_input_id', name: "hidden_input_name" }, value: "Add your text here. You can format your text, add links, quotes, and bullets."}) %>
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Table from '../../pb_table/_table'
|
4
|
+
|
5
|
+
const TableWithHeaderStyleBorderless = (props) => {
|
6
|
+
return (
|
7
|
+
<>
|
8
|
+
<Table
|
9
|
+
headerStyle="borderless"
|
10
|
+
size="sm"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<thead>
|
14
|
+
<tr>
|
15
|
+
<th>{'Column 1'}</th>
|
16
|
+
<th>{'Column 2'}</th>
|
17
|
+
<th>{'Column 3'}</th>
|
18
|
+
<th>{'Column 4'}</th>
|
19
|
+
<th>{'Column 5'}</th>
|
20
|
+
</tr>
|
21
|
+
</thead>
|
22
|
+
<tbody>
|
23
|
+
<tr>
|
24
|
+
<td>{'Value 1'}</td>
|
25
|
+
<td>{'Value 2'}</td>
|
26
|
+
<td>{'Value 3'}</td>
|
27
|
+
<td>{'Value 4'}</td>
|
28
|
+
<td>{'Value 5'}</td>
|
29
|
+
</tr>
|
30
|
+
<tr>
|
31
|
+
<td>{'Value 1'}</td>
|
32
|
+
<td>{'Value 2'}</td>
|
33
|
+
<td>{'Value 3'}</td>
|
34
|
+
<td>{'Value 4'}</td>
|
35
|
+
<td>{'Value 5'}</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>{'Value 1'}</td>
|
39
|
+
<td>{'Value 2'}</td>
|
40
|
+
<td>{'Value 3'}</td>
|
41
|
+
<td>{'Value 4'}</td>
|
42
|
+
<td>{'Value 5'}</td>
|
43
|
+
</tr>
|
44
|
+
</tbody>
|
45
|
+
</Table>
|
46
|
+
</>
|
47
|
+
)
|
48
|
+
}
|
49
|
+
|
50
|
+
export default TableWithHeaderStyleBorderless
|
@@ -0,0 +1 @@
|
|
1
|
+
Customize your header by removing the header borders with the `headerStyle="borderless"` prop.
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Background from '../../pb_background/_background'
|
4
|
+
import Card from '../../pb_card/_card'
|
5
|
+
import Table from '../../pb_table/_table'
|
6
|
+
|
7
|
+
const TableWithHeaderStyleFloating = (props) => {
|
8
|
+
return (
|
9
|
+
<>
|
10
|
+
<Card background="light"
|
11
|
+
{...props}
|
12
|
+
>
|
13
|
+
<Table
|
14
|
+
headerStyle="floating"
|
15
|
+
size="sm"
|
16
|
+
{...props}
|
17
|
+
>
|
18
|
+
<Table.Head>
|
19
|
+
<Background backgroundColor="light"
|
20
|
+
tag="tr"
|
21
|
+
{...props}
|
22
|
+
>
|
23
|
+
<Table.Header>{'Column 1'}</Table.Header>
|
24
|
+
<Table.Header>{'Column 2'}</Table.Header>
|
25
|
+
<Table.Header>{'Column 3'}</Table.Header>
|
26
|
+
<Table.Header>{'Column 4'}</Table.Header>
|
27
|
+
<Table.Header>{'Column 5'}</Table.Header>
|
28
|
+
</Background>
|
29
|
+
</Table.Head>
|
30
|
+
<Table.Body>
|
31
|
+
<Table.Row>
|
32
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
33
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
34
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
35
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
36
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
37
|
+
</Table.Row>
|
38
|
+
<Table.Row>
|
39
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
40
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
41
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
42
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
43
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
44
|
+
</Table.Row>
|
45
|
+
<Table.Row>
|
46
|
+
<Table.Cell>{'Value 1'}</Table.Cell>
|
47
|
+
<Table.Cell>{'Value 2'}</Table.Cell>
|
48
|
+
<Table.Cell>{'Value 3'}</Table.Cell>
|
49
|
+
<Table.Cell>{'Value 4'}</Table.Cell>
|
50
|
+
<Table.Cell>{'Value 5'}</Table.Cell>
|
51
|
+
</Table.Row>
|
52
|
+
</Table.Body>
|
53
|
+
</Table>
|
54
|
+
</Card>
|
55
|
+
</>
|
56
|
+
)
|
57
|
+
}
|
58
|
+
|
59
|
+
export default TableWithHeaderStyleFloating
|
@@ -0,0 +1 @@
|
|
1
|
+
Further customize your header by using the [table with background kit](https://playbook.powerapp.cloud/kits/table/react#table-with-background-kit) logic to give your table header a custom background color. Use the `headerStyle="floating"` prop to visually nest the borderless table within a card or collapsible with a matching background color (the `backgroundColor` passed to Background kit should match the `backgroundColor` for the element in which it is nested).
|
@@ -75,3 +75,5 @@ examples:
|
|
75
75
|
- table_with_collapsible_with_nested_table: Table with Collapsible with Nested Table
|
76
76
|
- table_with_clickable_rows: Table with Clickable Rows
|
77
77
|
- table_with_selectable_rows: Table with Selectable Rows
|
78
|
+
- table_with_header_style_borderless: Header Style Borderless
|
79
|
+
- table_with_header_style_floating: Header Style Floating
|
@@ -35,3 +35,5 @@ export { default as TableWithCollapsibleWithNestedRows } from './_table_with_col
|
|
35
35
|
export { default as TableWithCollapsibleWithCustomClick } from './_table_with_collapsible_with_custom_click.jsx'
|
36
36
|
export { default as TableWithSelectableRows } from './_table_with_selectable_rows.jsx'
|
37
37
|
export { default as TableWithClickableRows } from './_table_with_clickable_rows.jsx'
|
38
|
+
export { default as TableWithHeaderStyleBorderless } from './_table_with_header_style_borderless.jsx'
|
39
|
+
export { default as TableWithHeaderStyleFloating } from './_table_with_header_style_floating.jsx'
|