playbook_ui_docs 16.10.0 → 16.11.0.pre.rc.0
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_dropdown/docs/_dropdown_custom_display_disabled_option.html.erb +93 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.jsx +127 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.jsx +37 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.jsx +37 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_form_group/docs/_playground.json +100 -1
- data/app/pb_kits/playbook/pb_form_group/docs/_playground.overrides.json +91 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_description.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.jsx +68 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.jsx +71 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.html.erb +3 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.jsx +63 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.jsx +68 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.jsx +68 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.jsx +149 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.md +1 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_playground.json +155 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/_playground.overrides.json +137 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/example.yml +14 -0
- data/app/pb_kits/playbook/pb_full_screen/docs/index.js +6 -0
- data/app/pb_kits/playbook/pb_layout/docs/_playground.json +246 -1
- data/app/pb_kits/playbook/pb_layout/docs/_playground.overrides.json +188 -0
- data/app/pb_kits/playbook/pb_progress_pills/docs/_playground.json +26 -13
- data/app/pb_kits/playbook/pb_progress_pills/docs/_playground.overrides.json +24 -6
- data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.json +50 -17
- data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.overrides.json +41 -7
- data/app/pb_kits/playbook/pb_progress_step/docs/_playground.json +218 -1
- data/app/pb_kits/playbook/pb_progress_step/docs/_playground.overrides.json +189 -0
- data/app/pb_kits/playbook/pb_radio/docs/_playground.json +80 -6
- data/app/pb_kits/playbook/pb_radio/docs/_playground.overrides.json +82 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +171 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +153 -0
- data/app/pb_kits/playbook/pb_select/docs/_playground.json +65 -19
- data/app/pb_kits/playbook/pb_select/docs/_playground.overrides.json +54 -14
- data/app/pb_kits/playbook/pb_selectable_card/docs/_playground.json +75 -82
- data/app/pb_kits/playbook/pb_selectable_card/docs/_playground.overrides.json +76 -76
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.json +128 -1
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.overrides.json +106 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_playground.json +37 -21
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_playground.overrides.json +35 -18
- data/app/pb_kits/playbook/pb_selectable_list/docs/_playground.json +174 -12
- data/app/pb_kits/playbook/pb_selectable_list/docs/_playground.overrides.json +162 -10
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.json +92 -1
- data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.overrides.json +80 -0
- data/app/pb_kits/playbook/pb_source/docs/_playground.json +88 -1
- data/app/pb_kits/playbook/pb_source/docs/_playground.overrides.json +80 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_playground.json +28 -53
- data/app/pb_kits/playbook/pb_star_rating/docs/_playground.overrides.json +33 -32
- data/app/pb_kits/playbook/pb_stat_change/docs/_playground.json +15 -9
- data/app/pb_kits/playbook/pb_stat_change/docs/_playground.overrides.json +15 -5
- data/app/pb_kits/playbook/pb_stat_value/docs/_playground.json +19 -9
- data/app/pb_kits/playbook/pb_stat_value/docs/_playground.overrides.json +18 -7
- data/app/pb_kits/playbook/pb_table/docs/_playground.json +259 -1
- data/app/pb_kits/playbook/pb_table/docs/_playground.overrides.json +176 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_playground.json +44 -5
- data/app/pb_kits/playbook/pb_text_input/docs/_playground.overrides.json +39 -3
- data/app/pb_kits/playbook/pb_textarea/docs/_playground.json +35 -3
- data/app/pb_kits/playbook/pb_textarea/docs/_playground.overrides.json +28 -3
- data/app/pb_kits/playbook/pb_time/docs/_playground.json +28 -14
- data/app/pb_kits/playbook/pb_time/docs/_playground.overrides.json +26 -13
- data/app/pb_kits/playbook/pb_time_picker/docs/_playground.json +36 -30
- data/app/pb_kits/playbook/pb_time_picker/docs/_playground.overrides.json +31 -26
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.json +86 -1
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.overrides.json +69 -0
- data/app/pb_kits/playbook/pb_time_stacked/docs/_playground.json +30 -9
- data/app/pb_kits/playbook/pb_time_stacked/docs/_playground.overrides.json +30 -9
- data/app/pb_kits/playbook/pb_timeline/docs/_playground.json +199 -1
- data/app/pb_kits/playbook/pb_timeline/docs/_playground.overrides.json +165 -0
- data/app/pb_kits/playbook/pb_timestamp/docs/_playground.json +36 -21
- data/app/pb_kits/playbook/pb_timestamp/docs/_playground.overrides.json +35 -20
- data/app/pb_kits/playbook/pb_toggle/docs/_playground.json +24 -13
- data/app/pb_kits/playbook/pb_toggle/docs/_playground.overrides.json +20 -12
- data/app/pb_kits/playbook/pb_tooltip/docs/_playground.json +42 -23
- data/app/pb_kits/playbook/pb_tooltip/docs/_playground.overrides.json +35 -15
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +124 -44
- data/app/pb_kits/playbook/pb_typeahead/docs/_playground.overrides.json +98 -31
- data/app/pb_kits/playbook/pb_user/docs/_playground.json +33 -15
- data/app/pb_kits/playbook/pb_user/docs/_playground.overrides.json +32 -15
- data/app/pb_kits/playbook/pb_user_badge/docs/_playground.json +26 -12
- data/app/pb_kits/playbook/pb_user_badge/docs/_playground.overrides.json +26 -9
- data/app/pb_kits/playbook/pb_weekday_stacked/docs/_playground.json +32 -5
- data/app/pb_kits/playbook/pb_weekday_stacked/docs/_playground.overrides.json +30 -4
- metadata +38 -2
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FullScreen from "../../pb_full_screen/_full_screen";
|
|
3
|
+
import useFullScreen from "../../pb_full_screen/useFullScreen";
|
|
4
|
+
import AdvancedTable from "../../pb_advanced_table/_advanced_table";
|
|
5
|
+
import Flex from "../../pb_flex/_flex";
|
|
6
|
+
import MOCK_DATA from "../../pb_advanced_table/docs/advanced_table_mock_data.json";
|
|
7
|
+
import CircleIconButton from "../../pb_circle_icon_button/_circle_icon_button";
|
|
8
|
+
|
|
9
|
+
const columnDefinitions = [
|
|
10
|
+
{
|
|
11
|
+
accessor: "year",
|
|
12
|
+
label: "Year",
|
|
13
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
accessor: "newEnrollments",
|
|
17
|
+
label: "New Enrollments",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
accessor: "scheduledMeetings",
|
|
21
|
+
label: "Scheduled Meetings",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
accessor: "attendanceRate",
|
|
25
|
+
label: "Attendance Rate",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
accessor: "completedClasses",
|
|
29
|
+
label: "Completed Classes",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
accessor: "classCompletionRate",
|
|
33
|
+
label: "Class Completion Rate",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
accessor: "graduatedStudents",
|
|
37
|
+
label: "Graduated Students",
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
const FullScreenCustomTrigger = (props) => {
|
|
42
|
+
const [isFullscreen, setIsFullscreen] = useFullScreen(false);
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<Flex justify="end">
|
|
47
|
+
<CircleIconButton
|
|
48
|
+
icon="expand"
|
|
49
|
+
marginBottom="md"
|
|
50
|
+
onClick={() => setIsFullscreen(true)}
|
|
51
|
+
{...props}
|
|
52
|
+
/>
|
|
53
|
+
</Flex>
|
|
54
|
+
|
|
55
|
+
<FullScreen
|
|
56
|
+
headerText="Fullscreen Table"
|
|
57
|
+
isFullscreen={isFullscreen}
|
|
58
|
+
onClose={() => setIsFullscreen(false)}
|
|
59
|
+
{...props}
|
|
60
|
+
>
|
|
61
|
+
<AdvancedTable
|
|
62
|
+
columnDefinitions={columnDefinitions}
|
|
63
|
+
tableData={MOCK_DATA}
|
|
64
|
+
{...props}
|
|
65
|
+
/>
|
|
66
|
+
</FullScreen>
|
|
67
|
+
</>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default FullScreenCustomTrigger;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use `useFullScreen` when the trigger belongs somewhere else on the page, such as a toolbar or table action area. Pass the hook state to `isFullscreen`, open the overlay from your external control, and reset the state with `onClose`.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FullScreen from "../../pb_full_screen/_full_screen";
|
|
3
|
+
import AdvancedTable from "../../pb_advanced_table/_advanced_table";
|
|
4
|
+
import Button from "../../pb_button/_button";
|
|
5
|
+
import MOCK_DATA from "../../pb_advanced_table/docs/advanced_table_mock_data.json";
|
|
6
|
+
|
|
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
|
+
},
|
|
17
|
+
{
|
|
18
|
+
accessor: "scheduledMeetings",
|
|
19
|
+
label: "Scheduled Meetings",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
accessor: "attendanceRate",
|
|
23
|
+
label: "Attendance Rate",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
accessor: "completedClasses",
|
|
27
|
+
label: "Completed Classes",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
accessor: "classCompletionRate",
|
|
31
|
+
label: "Class Completion Rate",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
accessor: "graduatedStudents",
|
|
35
|
+
label: "Graduated Students",
|
|
36
|
+
},
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const FullScreenDefault = (props) => {
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<FullScreen
|
|
43
|
+
headerText="Fullscreen Table"
|
|
44
|
+
trigger={({ onClick, isOpen }) => (
|
|
45
|
+
<Button
|
|
46
|
+
marginBottom="md"
|
|
47
|
+
onClick={onClick}
|
|
48
|
+
text={isOpen ? "Exit Fullscreen" : "Enter Fullscreen"}
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
{...props}
|
|
53
|
+
>
|
|
54
|
+
<AdvancedTable
|
|
55
|
+
columnDefinitions={columnDefinitions}
|
|
56
|
+
tableData={MOCK_DATA}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
</FullScreen>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default FullScreenDefault;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the `trigger` prop for the simplest setup. The trigger render function receives the fullscreen state and toggle handler, so the control can open and close the overlay without managing separate state.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FullScreen from "../../pb_full_screen/_full_screen";
|
|
3
|
+
import useFullScreen from "../../pb_full_screen/useFullScreen";
|
|
4
|
+
import AdvancedTable from "../../pb_advanced_table/_advanced_table";
|
|
5
|
+
import Button from "../../pb_button/_button";
|
|
6
|
+
import MOCK_DATA from "../../pb_advanced_table/docs/advanced_table_mock_data.json";
|
|
7
|
+
|
|
8
|
+
const columnDefinitions = [
|
|
9
|
+
{
|
|
10
|
+
accessor: "year",
|
|
11
|
+
label: "Year",
|
|
12
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
accessor: "newEnrollments",
|
|
16
|
+
label: "New Enrollments",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessor: "scheduledMeetings",
|
|
20
|
+
label: "Scheduled Meetings",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
accessor: "attendanceRate",
|
|
24
|
+
label: "Attendance Rate",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
accessor: "completedClasses",
|
|
28
|
+
label: "Completed Classes",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
accessor: "classCompletionRate",
|
|
32
|
+
label: "Class Completion Rate",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
accessor: "graduatedStudents",
|
|
36
|
+
label: "Graduated Students",
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const FullScreenHeaderTextStyling = (props) => {
|
|
41
|
+
const [isFullscreen, setIsFullscreen] = useFullScreen(false);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<Button
|
|
46
|
+
marginBottom="md"
|
|
47
|
+
onClick={() => setIsFullscreen(true)}
|
|
48
|
+
text="Enter Fullscreen"
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
<FullScreen
|
|
52
|
+
headerText="Fullscreen Table"
|
|
53
|
+
headerTextStyling="body"
|
|
54
|
+
isFullscreen={isFullscreen}
|
|
55
|
+
onClose={() => setIsFullscreen(false)}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
<AdvancedTable
|
|
59
|
+
columnDefinitions={columnDefinitions}
|
|
60
|
+
tableData={MOCK_DATA}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
</FullScreen>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default FullScreenHeaderTextStyling;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use `headerTextStyling` to match the header text to the weight of the fullscreen experience. The default `title_4` treatment works well for primary workflows, while `body` creates a quieter header for utility views.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FullScreen from "../../pb_full_screen/_full_screen";
|
|
3
|
+
import useFullScreen from "../../pb_full_screen/useFullScreen";
|
|
4
|
+
import AdvancedTable from "../../pb_advanced_table/_advanced_table";
|
|
5
|
+
import Button from "../../pb_button/_button";
|
|
6
|
+
import MOCK_DATA from "../../pb_advanced_table/docs/advanced_table_mock_data.json";
|
|
7
|
+
|
|
8
|
+
const columnDefinitions = [
|
|
9
|
+
{
|
|
10
|
+
accessor: "year",
|
|
11
|
+
label: "Year",
|
|
12
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
accessor: "newEnrollments",
|
|
16
|
+
label: "New Enrollments",
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
accessor: "scheduledMeetings",
|
|
20
|
+
label: "Scheduled Meetings",
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
accessor: "attendanceRate",
|
|
24
|
+
label: "Attendance Rate",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
accessor: "completedClasses",
|
|
28
|
+
label: "Completed Classes",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
accessor: "classCompletionRate",
|
|
32
|
+
label: "Class Completion Rate",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
accessor: "graduatedStudents",
|
|
36
|
+
label: "Graduated Students",
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const FullScreenStickyHeader = (props) => {
|
|
41
|
+
const [isFullscreen, setIsFullscreen] = useFullScreen(false);
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<Button
|
|
46
|
+
marginBottom="md"
|
|
47
|
+
onClick={() => setIsFullscreen(true)}
|
|
48
|
+
text="Enter Fullscreen"
|
|
49
|
+
{...props}
|
|
50
|
+
/>
|
|
51
|
+
<FullScreen
|
|
52
|
+
headerText="Fullscreen Table"
|
|
53
|
+
isFullscreen={isFullscreen}
|
|
54
|
+
onClose={() => setIsFullscreen(false)}
|
|
55
|
+
stickyHeader={false}
|
|
56
|
+
{...props}
|
|
57
|
+
>
|
|
58
|
+
<AdvancedTable
|
|
59
|
+
columnDefinitions={columnDefinitions}
|
|
60
|
+
tableData={MOCK_DATA}
|
|
61
|
+
{...props}
|
|
62
|
+
/>
|
|
63
|
+
</FullScreen>
|
|
64
|
+
</>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default FullScreenStickyHeader;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
The fullscreen header stays sticky by default, keeping the title and close action visible while content scrolls. Set `stickyHeader` to `false` when the header should move with the rest of the fullscreen content.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import FullScreen from "../../pb_full_screen/_full_screen";
|
|
3
|
+
import useFullScreen from "../../pb_full_screen/useFullScreen";
|
|
4
|
+
import AdvancedTable from "../../pb_advanced_table/_advanced_table";
|
|
5
|
+
import Button from "../../pb_button/_button";
|
|
6
|
+
import Filter from "../../pb_filter/_filter";
|
|
7
|
+
import TextInput from "../../pb_text_input/_text_input";
|
|
8
|
+
import Dropdown from "../../pb_dropdown/_dropdown";
|
|
9
|
+
import Flex from "../../pb_flex/_flex";
|
|
10
|
+
import SectionSeparator from "../../pb_section_separator/_section_separator";
|
|
11
|
+
import Card from "../../pb_card/_card";
|
|
12
|
+
import MOCK_DATA from "../../pb_advanced_table/docs/advanced_table_mock_data.json";
|
|
13
|
+
|
|
14
|
+
const dropdownOptions = [
|
|
15
|
+
{
|
|
16
|
+
label: "United States",
|
|
17
|
+
value: "unitedStates",
|
|
18
|
+
id: "us"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "Canada",
|
|
22
|
+
value: "canada",
|
|
23
|
+
id: "ca"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: "Pakistan",
|
|
27
|
+
value: "pakistan",
|
|
28
|
+
id: "pk"
|
|
29
|
+
}
|
|
30
|
+
];
|
|
31
|
+
|
|
32
|
+
const columnDefinitions = [
|
|
33
|
+
{
|
|
34
|
+
accessor: "year",
|
|
35
|
+
label: "Year",
|
|
36
|
+
cellAccessors: ["quarter", "month", "day"],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
accessor: "newEnrollments",
|
|
40
|
+
label: "New Enrollments",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
accessor: "scheduledMeetings",
|
|
44
|
+
label: "Scheduled Meetings",
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
accessor: "attendanceRate",
|
|
48
|
+
label: "Attendance Rate",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
accessor: "completedClasses",
|
|
52
|
+
label: "Completed Classes",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
accessor: "classCompletionRate",
|
|
56
|
+
label: "Class Completion Rate",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
accessor: "graduatedStudents",
|
|
60
|
+
label: "Graduated Students",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const FullScreenTableAndFilter = (props) => {
|
|
65
|
+
const [isFullscreen, setIsFullscreen] = useFullScreen(false);
|
|
66
|
+
const [territory, setTerritory] = useState("");
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<>
|
|
70
|
+
<Button
|
|
71
|
+
marginBottom="md"
|
|
72
|
+
onClick={() => setIsFullscreen(true)}
|
|
73
|
+
text="Enter Fullscreen"
|
|
74
|
+
{...props}
|
|
75
|
+
/>
|
|
76
|
+
<FullScreen
|
|
77
|
+
headerText="Fullscreen Table"
|
|
78
|
+
isFullscreen={isFullscreen}
|
|
79
|
+
onClose={() => setIsFullscreen(false)}
|
|
80
|
+
{...props}
|
|
81
|
+
>
|
|
82
|
+
<Card padding="none">
|
|
83
|
+
<Flex
|
|
84
|
+
align="stretch"
|
|
85
|
+
flexDirection="column"
|
|
86
|
+
gap="none"
|
|
87
|
+
>
|
|
88
|
+
<Filter
|
|
89
|
+
background={false}
|
|
90
|
+
double
|
|
91
|
+
maxHeight="50vh"
|
|
92
|
+
minWidth="xs"
|
|
93
|
+
popoverProps={{ width: "350px", appendTo: ".fullscreen-overlay" }}
|
|
94
|
+
results={50}
|
|
95
|
+
sortOptions={{
|
|
96
|
+
territory_id: "Territory ID",
|
|
97
|
+
first_name: "Name",
|
|
98
|
+
started_on: "Start Date",
|
|
99
|
+
department_name: "Department",
|
|
100
|
+
title_name: "Title",
|
|
101
|
+
branch_branch_name: "Branch",
|
|
102
|
+
}}
|
|
103
|
+
sortValue={[{ name: "started_on", dir: "asc" }]}
|
|
104
|
+
>
|
|
105
|
+
{({ closePopover }) => (
|
|
106
|
+
<>
|
|
107
|
+
<TextInput
|
|
108
|
+
label="Territory ID"
|
|
109
|
+
onChange={(event) => setTerritory(event.target.value)}
|
|
110
|
+
value={territory}
|
|
111
|
+
/>
|
|
112
|
+
<Dropdown
|
|
113
|
+
label="Territory"
|
|
114
|
+
marginBottom="sm"
|
|
115
|
+
options={dropdownOptions}
|
|
116
|
+
/>
|
|
117
|
+
<Flex spacing="between">
|
|
118
|
+
<Button
|
|
119
|
+
onClick={() => {
|
|
120
|
+
alert(
|
|
121
|
+
"No filtering functionality - just a pattern demo!",
|
|
122
|
+
);
|
|
123
|
+
closePopover();
|
|
124
|
+
}}
|
|
125
|
+
text="Filter"
|
|
126
|
+
/>
|
|
127
|
+
<Button
|
|
128
|
+
text="Defaults"
|
|
129
|
+
variant="secondary"
|
|
130
|
+
/>
|
|
131
|
+
</Flex>
|
|
132
|
+
</>
|
|
133
|
+
)}
|
|
134
|
+
</Filter>
|
|
135
|
+
<SectionSeparator />
|
|
136
|
+
<AdvancedTable
|
|
137
|
+
columnDefinitions={columnDefinitions}
|
|
138
|
+
tableData={MOCK_DATA}
|
|
139
|
+
tableProps={{ container: false }}
|
|
140
|
+
{...props}
|
|
141
|
+
/>
|
|
142
|
+
</Flex>
|
|
143
|
+
</Card>
|
|
144
|
+
</FullScreen>
|
|
145
|
+
</>
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export default FullScreenTableAndFilter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Full Screen can host composed workflows such as a filter paired with a data table. For popovers inside the overlay, set the popover append target to `.fullscreen-overlay` so menus render within the fullscreen layer.
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"template": "<FullScreen{{props}} />",
|
|
3
|
+
"propTargets": {},
|
|
4
|
+
"defaults": {
|
|
5
|
+
"contentPadding": "lg",
|
|
6
|
+
"escToExit": true,
|
|
7
|
+
"headerText": "Enrollment Review",
|
|
8
|
+
"headerTextStyling": "title_4",
|
|
9
|
+
"onClose": "() => console.log('Fullscreen closed')",
|
|
10
|
+
"onOpen": "() => console.log('Fullscreen opened')",
|
|
11
|
+
"stickyHeader": true
|
|
12
|
+
},
|
|
13
|
+
"groups": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Header",
|
|
16
|
+
"props": [
|
|
17
|
+
"headerText",
|
|
18
|
+
"headerTextStyling",
|
|
19
|
+
"stickyHeader"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "Content",
|
|
24
|
+
"props": [
|
|
25
|
+
"contentPadding"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "Behavior",
|
|
30
|
+
"props": [
|
|
31
|
+
"escToExit"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "Callbacks",
|
|
36
|
+
"props": [
|
|
37
|
+
"trigger",
|
|
38
|
+
"onOpen",
|
|
39
|
+
"onClose"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"presets": [
|
|
44
|
+
{
|
|
45
|
+
"name": "Default",
|
|
46
|
+
"props": {
|
|
47
|
+
"contentPadding": "lg",
|
|
48
|
+
"escToExit": true,
|
|
49
|
+
"headerText": "Enrollment Review",
|
|
50
|
+
"headerTextStyling": "title_4",
|
|
51
|
+
"stickyHeader": true,
|
|
52
|
+
"trigger": "({ onClick, isOpen }) => (\n <Button\n marginBottom=\"md\"\n onClick={onClick}\n >\n {isOpen ? \"Exit Fullscreen\" : \"Enter Fullscreen\"}\n </Button>\n)"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "Hook trigger",
|
|
57
|
+
"structureMode": "hook_trigger",
|
|
58
|
+
"props": {
|
|
59
|
+
"contentPadding": "lg",
|
|
60
|
+
"escToExit": true,
|
|
61
|
+
"headerText": "Enrollment Review",
|
|
62
|
+
"headerTextStyling": "title_4",
|
|
63
|
+
"stickyHeader": true
|
|
64
|
+
},
|
|
65
|
+
"children": "<Card padding=\"md\">\n <Title size={4} text=\"Enrollment Review\" />\n <Body marginTop=\"xs\" text=\"The hook lets the trigger live anywhere while FullScreen owns the overlay content.\" />\n</Card>"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "Medium padding",
|
|
69
|
+
"props": {
|
|
70
|
+
"contentPadding": "md",
|
|
71
|
+
"headerText": "Medium Padding",
|
|
72
|
+
"stickyHeader": true
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "No padding",
|
|
77
|
+
"props": {
|
|
78
|
+
"contentPadding": "none",
|
|
79
|
+
"headerText": "Edge-to-edge Content",
|
|
80
|
+
"stickyHeader": true
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "Non-sticky header",
|
|
85
|
+
"props": {
|
|
86
|
+
"contentPadding": "lg",
|
|
87
|
+
"headerText": "Scrolling Header",
|
|
88
|
+
"stickyHeader": false
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "Body header",
|
|
93
|
+
"props": {
|
|
94
|
+
"headerText": "A quieter header treatment",
|
|
95
|
+
"headerTextStyling": "body",
|
|
96
|
+
"stickyHeader": true
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"conditionals": {},
|
|
101
|
+
"hints": {
|
|
102
|
+
"hook_trigger": {
|
|
103
|
+
"presetName": "Hook trigger",
|
|
104
|
+
"message": "Use the hook pattern when the trigger needs to live outside the FullScreen wrapper.",
|
|
105
|
+
"type": "info"
|
|
106
|
+
},
|
|
107
|
+
"content_padding": {
|
|
108
|
+
"when": {
|
|
109
|
+
"contentPadding": "none"
|
|
110
|
+
},
|
|
111
|
+
"message": "Use no padding when the fullscreen content already provides its own spacing or needs an edge-to-edge layout.",
|
|
112
|
+
"type": "info"
|
|
113
|
+
},
|
|
114
|
+
"sticky_header": {
|
|
115
|
+
"when": {
|
|
116
|
+
"stickyHeader": false
|
|
117
|
+
},
|
|
118
|
+
"message": "Turn off stickyHeader when the header should scroll away with the fullscreen content.",
|
|
119
|
+
"type": "info"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"children": {
|
|
123
|
+
"editable": true,
|
|
124
|
+
"default": "<Card padding=\"md\">\n <Title size={4} text=\"Enrollment Review\" />\n <Body marginTop=\"xs\" text=\"Open fullscreen to review a focused workspace with enough content to test header behavior and padding.\" />\n</Card>"
|
|
125
|
+
},
|
|
126
|
+
"structureModes": {
|
|
127
|
+
"default": "trigger_prop",
|
|
128
|
+
"modes": {
|
|
129
|
+
"trigger_prop": {
|
|
130
|
+
"label": "Trigger Prop",
|
|
131
|
+
"template": "<FullScreen{{props}}>\n {{children}}\n</FullScreen>",
|
|
132
|
+
"children": "<Card padding=\"md\">\n <Title size={4} text=\"Enrollment Review\" />\n <Body marginTop=\"xs\" text=\"Open fullscreen to review a focused workspace with enough content to test header behavior and padding.\" />\n</Card>",
|
|
133
|
+
"props": {
|
|
134
|
+
"headerText": "Enrollment Review",
|
|
135
|
+
"trigger": "({ onClick, isOpen }) => (\n <Button\n marginBottom=\"md\"\n onClick={onClick}\n >\n {isOpen ? \"Exit Fullscreen\" : \"Enter Fullscreen\"}\n </Button>\n)"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"hook_trigger": {
|
|
139
|
+
"label": "Hook Trigger",
|
|
140
|
+
"template": "<FullScreen\n isFullscreen={isFullscreen}\n onClose={() => setIsFullscreen(false)}{{props}}\n>\n {{children}}\n</FullScreen>",
|
|
141
|
+
"children": "<Card padding=\"md\">\n <Title size={4} text=\"Enrollment Review\" />\n <Body marginTop=\"xs\" text=\"The hook lets the trigger live anywhere while FullScreen owns the overlay content.\" />\n</Card>",
|
|
142
|
+
"imports": [
|
|
143
|
+
"useFullScreen"
|
|
144
|
+
],
|
|
145
|
+
"props": {
|
|
146
|
+
"headerText": "Enrollment Review"
|
|
147
|
+
},
|
|
148
|
+
"wrapper": "const FullScreenPlaygroundExample = () => {\n const [isFullscreen, setIsFullscreen, toggleFullScreen] = useFullScreen(false)\n\n return (\n <>\n <Flex justify=\"end\">\n <CircleIconButton\n icon=\"expand\"\n marginBottom=\"md\"\n onClick={toggleFullScreen}\n />\n </Flex>\n {{component}}\n </>\n )\n}\n\n<FullScreenPlaygroundExample />"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"hiddenProps": [
|
|
153
|
+
"isFullscreen"
|
|
154
|
+
]
|
|
155
|
+
}
|