playbook_ui_docs 14.12.0.pre.rc.12 → 14.13.0.pre.alpha.PBNTR457formtimezoneselect6219
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_column_headers_custom_cell.jsx +75 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_loading.md → _advanced_table_loading_react.md} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_responsive.html.erb +38 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.html.erb +33 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx +55 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +9 -3
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +6 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.jsx +64 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.jsx +69 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_react_hook.md +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.html.erb +2 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_default.jsx +21 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.html.erb +5 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.jsx +45 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/_copy_button_from.md +1 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_copy_button/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +13 -5
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.html.erb +99 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers_rails.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.html.erb +1 -3
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards_rails.md +7 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.html.erb +61 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table.md +4 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.jsx +90 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_table_react.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +4 -5
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close.html.erb +58 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_auto_close_rails.md +3 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.html.erb +11 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting.jsx +22 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_rails.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_formatting_react.md +1 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_home_address_street/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_default.html.erb +1 -2
- data/app/pb_kits/playbook/pb_icon_button/docs/_icon_button_sizes.html.erb +27 -0
- data/app/pb_kits/playbook/pb_icon_button/docs/example.yml +1 -3
- data/app/pb_kits/playbook/pb_link/docs/_link_target.html.erb +15 -0
- data/app/pb_kits/playbook/pb_link/docs/_link_target.jsx +29 -0
- data/app/pb_kits/playbook/pb_link/docs/example.yml +5 -3
- data/app/pb_kits/playbook/pb_link/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +37 -0
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional_react.md +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_overlay/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.jsx +7 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_default.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width.jsx +18 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_rails.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_progress_pills_full_width_react.md +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_progress_step/docs/_progress_step_tooltip.html.erb +6 -6
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.html.erb +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_background_kit.jsx +6 -9
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.html.erb +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.jsx +88 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_clickable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.html.erb +51 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click_rails.md +2 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +12 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content_rails.md +0 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.html.erb +80 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table_rails.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +96 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.jsx +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.md +1 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.html.erb +15 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.html.erb +42 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.jsx +59 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_light_weight.md +2 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +63 -16
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +0 -26
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +0 -10
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +0 -17
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +0 -19
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +0 -16
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +0 -35
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +0 -42
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +0 -13
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +0 -15
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +0 -4
- /data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/{_fixed_confirmation_toast_auto_close.md → _fixed_confirmation_toast_auto_close_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_table/docs/{_table_with_collapsible_with_custom_click.md → _table_with_collapsible_with_custom_click_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: b8b0860a4c52f2837c779b50e7fbb2b73dcc937616de444052a55e5794744891
|
4
|
+
data.tar.gz: 3bcb50d452dbf2e415bc1af338bda53a079f251a1ea2036f8924954c6d86c212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26954ed7c5aaf9c54b8f8b75172aa50c634b4eb8f87a1d909056b76e06c61eb8ba9890cabe400741576c46e2878c01c0f17611378dce84adc37e806b033727fe
|
7
|
+
data.tar.gz: 9c22a4778f809a97c01ce9bf8cf100c31e4bfc7619969797858e37f7e839ee19def91f9dd2550709de3fbe0280d7fe3379e63237d3829d2b068acbc05515c726
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_custom_cell.jsx
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import { AdvancedTable, Pill } from "playbook-ui"
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableColumnHeadersCustomCell = (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
|
+
customRenderer: (row, value) => (
|
19
|
+
<Pill text={value}
|
20
|
+
variant="success"
|
21
|
+
/>
|
22
|
+
),
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "scheduledMeetings",
|
26
|
+
label: "Scheduled Meetings",
|
27
|
+
customRenderer: (row, value) => (
|
28
|
+
<Pill text={value}
|
29
|
+
variant="info"
|
30
|
+
/>
|
31
|
+
),
|
32
|
+
},
|
33
|
+
],
|
34
|
+
},
|
35
|
+
{
|
36
|
+
label: "Performance Data",
|
37
|
+
columns: [
|
38
|
+
{
|
39
|
+
accessor: "attendanceRate",
|
40
|
+
label: "Attendance Rate",
|
41
|
+
},
|
42
|
+
{
|
43
|
+
accessor: "completedClasses",
|
44
|
+
label: "Completed Classes",
|
45
|
+
customRenderer: (row, value) => (
|
46
|
+
<Pill text={value}
|
47
|
+
variant="error"
|
48
|
+
/>
|
49
|
+
),
|
50
|
+
},
|
51
|
+
{
|
52
|
+
accessor: "classCompletionRate",
|
53
|
+
label: "Class Completion Rate",
|
54
|
+
},
|
55
|
+
{
|
56
|
+
accessor: "graduatedStudents",
|
57
|
+
label: "Graduated Students",
|
58
|
+
},
|
59
|
+
],
|
60
|
+
},
|
61
|
+
];
|
62
|
+
|
63
|
+
|
64
|
+
return (
|
65
|
+
<>
|
66
|
+
<AdvancedTable
|
67
|
+
columnDefinitions={columnDefinitions}
|
68
|
+
tableData={MOCK_DATA}
|
69
|
+
{...props}
|
70
|
+
/>
|
71
|
+
</>
|
72
|
+
)
|
73
|
+
}
|
74
|
+
|
75
|
+
export default AdvancedTableColumnHeadersCustomCell
|
@@ -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: "beta_table", table_data: @table_data, column_definitions: column_definitions, loading: true }) %>
|
@@ -0,0 +1 @@
|
|
1
|
+
The optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
|
@@ -1,3 +1,3 @@
|
|
1
|
-
|
1
|
+
The optional `loading` prop takes a boolean value that can be managed using state. If loading is true, the table will display the loading skeleton and once loading is false, the table will render with the data provided.
|
2
2
|
|
3
|
-
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `
|
3
|
+
By default, the inital row count of the loading skeleton is set to 10. If you want more control over this initial row count, the optional `initialLoadingRowsCount` prop can be used to pass in a number. __NOTE__: This is only for the first render of the table, subsequent loading skeleton row count logic is handled within the kit itself.
|
@@ -0,0 +1,38 @@
|
|
1
|
+
|
2
|
+
<% column_definitions = [
|
3
|
+
{
|
4
|
+
accessor: "year",
|
5
|
+
label: "Year",
|
6
|
+
cellAccessors: ["quarter", "month", "day"],
|
7
|
+
},
|
8
|
+
{
|
9
|
+
accessor: "newEnrollments",
|
10
|
+
label: "New Enrollments",
|
11
|
+
},
|
12
|
+
{
|
13
|
+
accessor: "scheduledMeetings",
|
14
|
+
label: "Scheduled Meetings",
|
15
|
+
},
|
16
|
+
{
|
17
|
+
accessor: "attendanceRate",
|
18
|
+
label: "Attendance Rate",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
accessor: "completedClasses",
|
22
|
+
label: "Completed Classes",
|
23
|
+
},
|
24
|
+
{
|
25
|
+
accessor: "classCompletionRate",
|
26
|
+
label: "Class Completion Rate",
|
27
|
+
},
|
28
|
+
{
|
29
|
+
accessor: "graduatedStudents",
|
30
|
+
label: "Graduated Students",
|
31
|
+
},
|
32
|
+
] %>
|
33
|
+
|
34
|
+
<%= pb_rails("title", props: { size: 4 }) do %> Not Responsive <% end %>
|
35
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table_non_responsive", table_data: @table_data, column_definitions: column_definitions, responsive: "none" }) %>
|
36
|
+
|
37
|
+
<%= pb_rails("title", props: { padding_top: "sm", size: 4 }) do %> Responsive as Default <% end %>
|
38
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table_responsive", table_data: @table_data, column_definitions: column_definitions }) %>
|
@@ -30,4 +30,4 @@
|
|
30
30
|
}
|
31
31
|
] %>
|
32
32
|
|
33
|
-
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, sticky: true }}) %>
|
33
|
+
<%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { container: false, sticky: true }}) %>
|
@@ -1 +1,3 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
|
2
|
+
|
3
|
+
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
|
@@ -1 +1,3 @@
|
|
1
|
-
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with
|
1
|
+
This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
|
2
|
+
|
3
|
+
This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.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: "table_props_table", table_data: @table_data, column_definitions: column_definitions, max_height: "xs", table_props: { sticky: true }}) %>
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header.jsx
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import { AdvancedTable } from "playbook-ui"
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableTablePropsStickyHeader = (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 tableProps = {
|
39
|
+
sticky: true
|
40
|
+
}
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<AdvancedTable
|
45
|
+
columnDefinitions={columnDefinitions}
|
46
|
+
maxHeight="xs"
|
47
|
+
tableData={MOCK_DATA}
|
48
|
+
tableProps={tableProps}
|
49
|
+
{...props}
|
50
|
+
/>
|
51
|
+
</div>
|
52
|
+
)
|
53
|
+
}
|
54
|
+
|
55
|
+
export default AdvancedTableTablePropsStickyHeader
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
2
|
+
|
3
|
+
A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md
ADDED
@@ -0,0 +1,3 @@
|
|
1
|
+
Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
|
2
|
+
|
3
|
+
A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
|
@@ -1,10 +1,13 @@
|
|
1
1
|
examples:
|
2
2
|
rails:
|
3
3
|
- advanced_table_beta: Default (Required Props)
|
4
|
+
- advanced_table_loading: Loading State
|
4
5
|
- advanced_table_beta_subrow_headers: SubRow Headers
|
5
6
|
- advanced_table_collapsible_trail_rails: Collapsible Trail
|
6
7
|
- advanced_table_table_props: Table Props
|
8
|
+
- advanced_table_table_props_sticky_header: Table Props Sticky Header
|
7
9
|
- advanced_table_beta_sort: Enable Sorting
|
10
|
+
- advanced_table_responsive: Responsive Tables
|
8
11
|
- advanced_table_custom_cell_rails: Custom Components for Cells
|
9
12
|
- advanced_table_column_headers: Multi-Header Columns
|
10
13
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
@@ -20,6 +23,7 @@ examples:
|
|
20
23
|
- advanced_table_collapsible_trail: Collapsible Trail
|
21
24
|
- advanced_table_table_options: Table Options
|
22
25
|
- advanced_table_table_props: Table Props
|
26
|
+
- advanced_table_table_props_sticky_header: Table Props Sticky Header
|
23
27
|
- advanced_table_inline_row_loading: Inline Row Loading
|
24
28
|
- advanced_table_responsive: Responsive Tables
|
25
29
|
- advanced_table_custom_cell: Custom Components for Cells
|
@@ -27,6 +31,7 @@ examples:
|
|
27
31
|
- advanced_table_pagination_with_props: Pagination Props
|
28
32
|
- advanced_table_column_headers: Multi-Header Columns
|
29
33
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
34
|
+
- advanced_table_column_headers_custom_cell: Multi-Header Columns with Custom Cells
|
30
35
|
# - advanced_table_no_subrows: Table with No Subrows
|
31
36
|
- advanced_table_selectable_rows: Selectable Rows
|
32
37
|
- advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
@@ -18,4 +18,6 @@ export { default as AdvancedTableSelectableRows } from './_advanced_table_select
|
|
18
18
|
export { default as AdvancedTableSelectableRowsNoSubrows } from './_advanced_table_selectable_rows_no_subrows.jsx'
|
19
19
|
export { default as AdvancedTableNoSubrows } from './_advanced_table_no_subrows.jsx'
|
20
20
|
export { default as AdvancedTableSelectableRowsHeader } from './_advanced_table_selectable_rows_header.jsx'
|
21
|
-
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
21
|
+
export { default as AdvancedTableSelectableRowsActions } from './_advanced_table_selectable_rows_actions.jsx'
|
22
|
+
export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
|
23
|
+
export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Avatar } from 'playbook-ui'
|
3
3
|
|
4
|
-
const AvatarBadgeComponentOverlay = () => {
|
4
|
+
const AvatarBadgeComponentOverlay = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Avatar
|
8
8
|
componentOverlay={{
|
9
9
|
component: "badge",
|
10
10
|
placement: "bottom-right",
|
11
|
-
text: "12"
|
11
|
+
text: "12",
|
12
12
|
}}
|
13
13
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
14
14
|
marginBottom="sm"
|
15
15
|
size="sm"
|
16
|
+
{...props}
|
16
17
|
/>
|
17
18
|
|
18
19
|
<Avatar
|
@@ -24,6 +25,8 @@ const AvatarBadgeComponentOverlay = () => {
|
|
24
25
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
25
26
|
marginBottom="sm"
|
26
27
|
size="md"
|
28
|
+
{...props}
|
29
|
+
|
27
30
|
/>
|
28
31
|
|
29
32
|
<Avatar
|
@@ -36,6 +39,8 @@ const AvatarBadgeComponentOverlay = () => {
|
|
36
39
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
37
40
|
marginBottom="sm"
|
38
41
|
size="lg"
|
42
|
+
{...props}
|
43
|
+
|
39
44
|
/>
|
40
45
|
|
41
46
|
<Avatar
|
@@ -48,7 +53,8 @@ const AvatarBadgeComponentOverlay = () => {
|
|
48
53
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
49
54
|
marginBottom="sm"
|
50
55
|
size="xl"
|
51
|
-
|
56
|
+
{...props}
|
57
|
+
/>
|
52
58
|
</div>
|
53
59
|
)
|
54
60
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Avatar } from 'playbook-ui'
|
3
3
|
|
4
|
-
const AvatarCircleIconComponentOverlay = () => {
|
4
|
+
const AvatarCircleIconComponentOverlay = (props) => {
|
5
5
|
return (
|
6
6
|
<div>
|
7
7
|
<Avatar
|
@@ -14,6 +14,7 @@ const AvatarCircleIconComponentOverlay = () => {
|
|
14
14
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
15
15
|
marginBottom="sm"
|
16
16
|
size="sm"
|
17
|
+
{...props}
|
17
18
|
/>
|
18
19
|
|
19
20
|
<Avatar
|
@@ -26,6 +27,7 @@ const AvatarCircleIconComponentOverlay = () => {
|
|
26
27
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
27
28
|
marginBottom="sm"
|
28
29
|
size="md"
|
30
|
+
{...props}
|
29
31
|
/>
|
30
32
|
|
31
33
|
<Avatar
|
@@ -38,6 +40,7 @@ const AvatarCircleIconComponentOverlay = () => {
|
|
38
40
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
39
41
|
marginBottom="sm"
|
40
42
|
size="lg"
|
43
|
+
{...props}
|
41
44
|
/>
|
42
45
|
|
43
46
|
<Avatar
|
@@ -50,7 +53,8 @@ const AvatarCircleIconComponentOverlay = () => {
|
|
50
53
|
imageUrl="https://randomuser.me/api/portraits/men/44.jpg"
|
51
54
|
marginBottom="sm"
|
52
55
|
size="xl"
|
53
|
-
|
56
|
+
{...props}
|
57
|
+
/>
|
54
58
|
</div>
|
55
59
|
)
|
56
60
|
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Highcharts from "highcharts";
|
3
|
+
import HighchartsReact from "highcharts-react-official";
|
4
|
+
|
5
|
+
import "../BarGraphStyles.scss";
|
6
|
+
// Your path might look more like this
|
7
|
+
//import "playbook-ui/dist/pb_bar_graph/BarGraphStyles.scss";
|
8
|
+
|
9
|
+
const columnChartData = [
|
10
|
+
{
|
11
|
+
name: "Installation",
|
12
|
+
data: [1475, 200, 3000, 654, 656],
|
13
|
+
},
|
14
|
+
{
|
15
|
+
name: "Manufacturing",
|
16
|
+
data: [4434, 524, 2320, 440, 500],
|
17
|
+
},
|
18
|
+
{
|
19
|
+
name: "Sales & Distribution",
|
20
|
+
data: [3387, 743, 1344, 434, 440],
|
21
|
+
},
|
22
|
+
{
|
23
|
+
name: "Project Development",
|
24
|
+
data: [3227, 878, 999, 780, 1000],
|
25
|
+
},
|
26
|
+
{
|
27
|
+
name: "Other",
|
28
|
+
data: [1111, 677, 3245, 500, 200],
|
29
|
+
},
|
30
|
+
];
|
31
|
+
|
32
|
+
const columnOptions = {
|
33
|
+
chart: {
|
34
|
+
type: "column",
|
35
|
+
},
|
36
|
+
series: columnChartData,
|
37
|
+
title: {
|
38
|
+
text: "Solar Employment Growth by Sector, 2010-2016",
|
39
|
+
},
|
40
|
+
subtitle: {
|
41
|
+
text: "Source: thesolarfoundation.com",
|
42
|
+
},
|
43
|
+
xAxis: {
|
44
|
+
categories: ["Jan", "Feb", "Mar", "Apr", "May"],
|
45
|
+
},
|
46
|
+
yAxis: {
|
47
|
+
min: 0,
|
48
|
+
title: {
|
49
|
+
text: "Number of Employees",
|
50
|
+
},
|
51
|
+
},
|
52
|
+
legend: { enabled: false },
|
53
|
+
credits: { enabled: false },
|
54
|
+
};
|
55
|
+
|
56
|
+
const BarGraphPbStyles = () => (
|
57
|
+
<div>
|
58
|
+
<HighchartsReact highcharts={Highcharts}
|
59
|
+
options={columnOptions}
|
60
|
+
/>
|
61
|
+
</div>
|
62
|
+
)
|
63
|
+
|
64
|
+
export default BarGraphPbStyles
|
@@ -0,0 +1 @@
|
|
1
|
+
You don't need to use the bar graph kit to apply the styles to your Highcharts bar graph. Just import the BarGraphStyles.scss to your component and the styles will apply automatically.
|
@@ -10,3 +10,4 @@ export { default as BarGraphStacked } from './_bar_graph_stacked.jsx'
|
|
10
10
|
export { default as BarGraphNegativeNumbers } from './_bar_graph_negative_numbers.jsx'
|
11
11
|
export { default as BarGraphSecondaryYAxis } from './_bar_graph_secondary_y_axis.jsx'
|
12
12
|
export { default as BarGraphHorizontal } from './_bar_graph_horizontal.jsx'
|
13
|
+
export { default as BarGraphPbStyles } from './_bar_graph_pb_styles.jsx'
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import React, { useState } from "react"
|
2
|
+
import { useForm } from "react-hook-form"
|
3
|
+
import { Button, Checkbox, Flex, Body } from "playbook-ui"
|
4
|
+
|
5
|
+
const CheckboxReactHook = () => {
|
6
|
+
const { register, handleSubmit } = useForm({
|
7
|
+
defaultValues: {
|
8
|
+
Small: false,
|
9
|
+
Medium: false,
|
10
|
+
Large: false,
|
11
|
+
},
|
12
|
+
})
|
13
|
+
|
14
|
+
const [submittedData, setSubmittedData] = useState({
|
15
|
+
Small: false,
|
16
|
+
Medium: false,
|
17
|
+
Large: false,
|
18
|
+
})
|
19
|
+
|
20
|
+
const onSubmit = (data) => {
|
21
|
+
setSubmittedData(data)
|
22
|
+
}
|
23
|
+
|
24
|
+
return (
|
25
|
+
<Flex orientation="row">
|
26
|
+
<Flex align="start"
|
27
|
+
orientation="column"
|
28
|
+
paddingRight="lg"
|
29
|
+
>
|
30
|
+
<form onSubmit={handleSubmit(onSubmit)}>
|
31
|
+
<Checkbox padding="xs"
|
32
|
+
text="Small"
|
33
|
+
{...register("Small")}
|
34
|
+
/>
|
35
|
+
<br />
|
36
|
+
<Checkbox padding="xs"
|
37
|
+
text="Medium"
|
38
|
+
{...register("Medium")}
|
39
|
+
/>
|
40
|
+
<br />
|
41
|
+
<Checkbox padding="xs"
|
42
|
+
text="Large"
|
43
|
+
{...register("Large")}
|
44
|
+
/>
|
45
|
+
<br />
|
46
|
+
<Button htmlType="submit"
|
47
|
+
marginTop="sm"
|
48
|
+
text="submit"
|
49
|
+
/>
|
50
|
+
</form>
|
51
|
+
</Flex>
|
52
|
+
<Flex align="start"
|
53
|
+
orientation="column"
|
54
|
+
>
|
55
|
+
<Body padding="xs"
|
56
|
+
text={`Small: ${submittedData.Small ? "true" : "false"}`}
|
57
|
+
/>
|
58
|
+
<Body padding="xs"
|
59
|
+
text={`Medium: ${submittedData.Medium ? "true" : "false"}`}
|
60
|
+
/>
|
61
|
+
<Body padding="xs"
|
62
|
+
text={`Large: ${submittedData.Large ? "true" : "false"}`}
|
63
|
+
/>
|
64
|
+
</Flex>
|
65
|
+
</Flex>
|
66
|
+
)
|
67
|
+
}
|
68
|
+
|
69
|
+
export default CheckboxReactHook
|
@@ -0,0 +1 @@
|
|
1
|
+
You can pass react hook props to the checkbox kit.
|
@@ -11,6 +11,7 @@ examples:
|
|
11
11
|
react:
|
12
12
|
- checkbox_default: Default
|
13
13
|
- checkbox_checked: Load as checked
|
14
|
+
- checkbox_react_hook: React Hook Form
|
14
15
|
- checkbox_custom: Custom Checkbox
|
15
16
|
- checkbox_error: Default w/ Error
|
16
17
|
- checkbox_indeterminate: Indeterminate Checkbox
|
@@ -21,4 +22,4 @@ examples:
|
|
21
22
|
- checkbox_error_swift: Default w/ Error
|
22
23
|
- checkbox_indeterminate_swift: Indeterminate Checkbox
|
23
24
|
- checkbox_props_swift: ""
|
24
|
-
|
25
|
+
|
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as CheckboxDefault } from './_checkbox_default.jsx'
|
2
2
|
export { default as CheckboxCustom } from './_checkbox_custom.jsx'
|
3
|
+
export { default as CheckboxReactHook } from './_checkbox_react_hook.jsx'
|
3
4
|
export { default as CheckboxError } from './_checkbox_error.jsx'
|
4
5
|
export { default as CheckboxChecked } from './_checkbox_checked.jsx'
|
5
6
|
export { default as CheckboxIndeterminate } from './_checkbox_indeterminate.jsx'
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<%= pb_rails("copy_button", props: { id: "default-copy-button", text: "Copy Text", value: "Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease." } ) %>
|
2
|
+
<%= pb_rails("textarea", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { CopyButton, Textarea } from 'playbook-ui'
|
3
|
+
|
4
|
+
const CopyButtonDefault = (props) => (
|
5
|
+
<div>
|
6
|
+
<CopyButton
|
7
|
+
{...props}
|
8
|
+
text="Copy Text"
|
9
|
+
tooltipPlacement="right"
|
10
|
+
tooltipText="Text copied!"
|
11
|
+
value="Playbook makes it easy to support bleeding edge, or legacy systems. Use Playbook’s 200+ components and end-to-end design language to create simple, intuitive and beautiful experiences with ease."
|
12
|
+
/>
|
13
|
+
|
14
|
+
<Textarea
|
15
|
+
{...props}
|
16
|
+
placeholder="Copy and paste here"
|
17
|
+
/>
|
18
|
+
</div>
|
19
|
+
)
|
20
|
+
|
21
|
+
export default CopyButtonDefault
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%= pb_rails("body", props: { id: "body", text: "Copy this body text!"}) %>
|
2
|
+
<%= pb_rails("copy_button", props: { text: "Copy Body text", from: "body", id: "copy-body-button" }) %>
|
3
|
+
<%= pb_rails("text_input", props: { margin_top: "xs", placeholder: "Copy and paste here" }) %>
|
4
|
+
<%= pb_rails("copy_button", props: { text: "Copy Text Input", from: "copy-input", id: "copy-input-button" }) %>
|
5
|
+
<%= pb_rails("text_input", props: { margin_top: "xs", id: "copy-input" , value: "Copy and paste here" }) %>
|