playbook_ui_docs 14.9.0.pre.rc.18 → 14.10.0.pre.alpha.PBNTR662stickyrightcolumnreact5160

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +36 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +60 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +1 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +74 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +1 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +50 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +1 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +57 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +5 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +5600 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +53 -49
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +29 -36
  17. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +6 -0
  18. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +21 -1
  19. data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +50 -0
  20. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  21. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +8 -0
  22. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +9 -0
  23. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +1 -0
  24. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +25 -5
  25. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +17 -1
  26. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +15 -0
  27. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +2 -1
  28. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +166 -0
  29. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -0
  30. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +89 -0
  31. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +2 -1
  32. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +2 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +88 -0
  34. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +3 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +77 -0
  36. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
  37. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +3 -0
  38. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +4 -1
  39. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +87 -0
  40. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +5 -0
  41. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +75 -0
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +1 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +108 -0
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +2 -0
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +94 -0
  46. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
  47. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +83 -0
  48. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +3 -0
  49. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +120 -0
  50. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -0
  51. data/app/pb_kits/playbook/pb_table/docs/example.yml +7 -0
  52. data/app/pb_kits/playbook/pb_table/docs/index.js +5 -0
  53. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +88 -0
  54. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -0
  55. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  56. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +9 -2
  57. data/dist/playbook-doc.js +1 -1
  58. metadata +33 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b5364dc42d3f5acfe91d5aa9a5928fa72749a6aa26e728f2e459bc3bf97b44a
4
- data.tar.gz: 875fa9d0facc30a2a617aea1a7497be4c46bd44aabe8b717036c5ef70be36605
3
+ metadata.gz: 95c4ead543891b95004355f475a66cdd9261307f1b2084fcb4717afd2dfbf7f3
4
+ data.tar.gz: 3cca8e025b2a122620b157e69a3fb5630a77137640a31729b8ae8ee2d0a59af9
5
5
  SHA512:
6
- metadata.gz: 8606d46695824fec308cf98ad82eaa6830797aa3b4a9b9b42147e0c3d0caaba138ac6bb2d969a76350531bff2b6ba19d54aa7107cc4706cad8199f905ffefe1f
7
- data.tar.gz: 1e51bc65fcb91372ff96d5d1e5c12c556359b5169f3dfd6829a86ce152487438764253f5417e989d63fd21190de30c85f49a9436d96e9f9e372719079ad684e5
6
+ metadata.gz: e4dca9d99b4c4977795aad3aafbc2b815591bebfef4e18a2adaafb12d990f952165271f313cdbe8a4b69cee02f01162719032bde4e11ef914d6aca2a4f261d61
7
+ data.tar.gz: c4df75caf4fa31a8bf990633a6c8d2a02495fc0aabd87cc15629522282a119ec84ba597b4a6615108eebafafe540d203ffc667f15581cfe078e1ef942cf1fa15
@@ -0,0 +1,36 @@
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: "collapsible_trail", table_data: @table_data, column_definitions: column_definitions }) do %>
34
+ <%= pb_rails("advanced_table/table_header", props: { column_definitions: column_definitions }) %>
35
+ <%= pb_rails("advanced_table/table_body", props: { table_data: @table_data, column_definitions: column_definitions, collapsible_trail: false }) %>
36
+ <% end %>
@@ -0,0 +1 @@
1
+ `collapsible_trail` is an optional prop that is set to 'true' by default. If set to 'false', it will remove the trail on the left of the rows when subRows are toggled open.
@@ -0,0 +1,60 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import MOCK_DATA from "./advanced_table_mock_data.json"
4
+
5
+ const AdvancedTableColumnHeaders = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ label: "Enrollment Data",
14
+ columns: [
15
+ {
16
+ accessor: "newEnrollments",
17
+ label: "New Enrollments",
18
+ },
19
+ {
20
+ accessor: "scheduledMeetings",
21
+ label: "Scheduled Meetings",
22
+ },
23
+ ],
24
+ },
25
+ {
26
+ label: "Performance Data",
27
+ columns: [
28
+ {
29
+ accessor: "attendanceRate",
30
+ label: "Attendance Rate",
31
+ },
32
+ {
33
+ accessor: "completedClasses",
34
+ label: "Completed Classes",
35
+ },
36
+ {
37
+ accessor: "classCompletionRate",
38
+ label: "Class Completion Rate",
39
+ },
40
+ {
41
+ accessor: "graduatedStudents",
42
+ label: "Graduated Students",
43
+ },
44
+ ],
45
+ },
46
+ ];
47
+
48
+
49
+ return (
50
+ <>
51
+ <AdvancedTable
52
+ columnDefinitions={columnDefinitions}
53
+ tableData={MOCK_DATA}
54
+ {...props}
55
+ />
56
+ </>
57
+ )
58
+ }
59
+
60
+ export default AdvancedTableColumnHeaders
@@ -0,0 +1 @@
1
+ Use a nested `columns` array in your columnDefinitions to create multiple header rows. Any column with `columns` is treated as a grouped header, and its child columns are displayed beneath it.
@@ -0,0 +1,74 @@
1
+ import React from "react";
2
+ import { AdvancedTable } from "playbook-ui";
3
+ import MOCK_DATA from "./advanced_table_mock_data.json";
4
+
5
+ const AdvancedTableColumnHeadersMultiple = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ label: "Enrollment Data",
14
+ columns: [
15
+ {
16
+ label: "Enrollment Stats",
17
+ columns: [
18
+ {
19
+ accessor: "newEnrollments",
20
+ label: "New Enrollments",
21
+ },
22
+ {
23
+ accessor: "scheduledMeetings",
24
+ label: "Scheduled Meetings",
25
+ },
26
+ ],
27
+ },
28
+ ],
29
+ },
30
+ {
31
+ label: "Performance Data",
32
+ columns: [
33
+ {
34
+ label: "Completion Metrics",
35
+ columns: [
36
+ {
37
+ accessor: "completedClasses",
38
+ label: "Completed Classes",
39
+ },
40
+ {
41
+ accessor: "classCompletionRate",
42
+ label: "Class Completion Rate",
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ label: "Attendance",
48
+ columns: [
49
+ {
50
+ accessor: "attendanceRate",
51
+ label: "Attendance Rate",
52
+ },
53
+ {
54
+ accessor: "scheduledMeetings",
55
+ label: "Scheduled Meetings",
56
+ },
57
+ ],
58
+ },
59
+ ],
60
+ },
61
+ ];
62
+
63
+ return (
64
+ <>
65
+ <AdvancedTable
66
+ columnDefinitions={columnDefinitions}
67
+ tableData={MOCK_DATA}
68
+ {...props}
69
+ />
70
+ </>
71
+ );
72
+ };
73
+
74
+ export default AdvancedTableColumnHeadersMultiple;
@@ -0,0 +1 @@
1
+ Multiple levels of column headers can also be rendered as seen here.
@@ -0,0 +1,50 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
+
5
+ const AdvancedTablePagination = (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
+ return (
39
+ <>
40
+ <AdvancedTable
41
+ columnDefinitions={columnDefinitions}
42
+ pagination
43
+ tableData={PAGINATION_MOCK_DATA}
44
+ {...props}
45
+ />
46
+ </>
47
+ )
48
+ }
49
+
50
+ export default AdvancedTablePagination
@@ -0,0 +1 @@
1
+ `pagination` is an optional prop that can be used to add pagination to the AdvancedTable. If present, it will add pagination with default values for pageSize, etc. To customize pagination, you can also use `paginationProps` shown in the next example.
@@ -0,0 +1,57 @@
1
+ import React from "react"
2
+ import { AdvancedTable } from "playbook-ui"
3
+ import PAGINATION_MOCK_DATA from "./advanced_table_pagination_mock_data.json"
4
+
5
+ const AdvancedTablePaginationWithProps = (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 paginationProps = {
39
+ pageIndex: 1,
40
+ pageSize: 10,
41
+ range: 2
42
+ }
43
+
44
+ return (
45
+ <>
46
+ <AdvancedTable
47
+ columnDefinitions={columnDefinitions}
48
+ pagination
49
+ paginationProps={paginationProps}
50
+ tableData={PAGINATION_MOCK_DATA}
51
+ {...props}
52
+ />
53
+ </>
54
+ )
55
+ }
56
+
57
+ export default AdvancedTablePaginationWithProps
@@ -0,0 +1,5 @@
1
+ `paginationProps` is an optional prop that can be used to further customize pagination for the AdvancedTable. This prop is an object with 2 optional items:
2
+
3
+ - `pageIndex`: An optional prop to set which page is set to open on initial load. Default is '0'
4
+ - `pageSize`: An optional prop to set total number of rows for each page before the Table paginates. Default is '20'
5
+ - `range`: The range prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the range prop. See [here for more details](https://playbook.powerapp.cloud/kits/pagination/react#default). Default is set to '5'