playbook_ui_docs 16.10.0.pre.alpha.play300617391 → 16.10.0.pre.alpha.play300617418
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_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
- metadata +28 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd9327137e3a460566ac95c9c8fb15519229318be75a637ddc464da296e1f020
|
|
4
|
+
data.tar.gz: a614b3d551ff564f845629082acf5ac142c174a2d87c636ba8537f3b71d02a59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1320fb295a94de7714b2312b8346977aac67d4677741b8eb2df0512f69035c200173926b551a5c081133fc51b49520ed2e6d0370b2924409fe7445055b68b24e
|
|
7
|
+
data.tar.gz: 866ca27108d13b19e28974fa9a0e0df22dee222b345a8b1567017ec867e895b33b2fd4312e2b828d333912868b8f7af9c4fd95ecb7503cfe34f1a13eff859119
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<%
|
|
2
|
+
options = [
|
|
3
|
+
{
|
|
4
|
+
label: "Jasper Furniss",
|
|
5
|
+
value: "jasperFurniss",
|
|
6
|
+
territory: "PHL",
|
|
7
|
+
title: "Lead UX Engineer",
|
|
8
|
+
id: "jasper-furniss",
|
|
9
|
+
status: "Offline"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
label: "Ramon Ruiz",
|
|
13
|
+
value: "ramonRuiz",
|
|
14
|
+
territory: "PHL",
|
|
15
|
+
title: "Senior UX Designer",
|
|
16
|
+
id: "ramon-ruiz",
|
|
17
|
+
status: "Unavailable",
|
|
18
|
+
disabled: true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: "Carlos Lima",
|
|
22
|
+
value: "carlosLima",
|
|
23
|
+
territory: "PHL",
|
|
24
|
+
title: "Nitro Developer",
|
|
25
|
+
id: "carlos-lima",
|
|
26
|
+
status: "Online"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
label: "Courtney Long",
|
|
30
|
+
value: "courtneyLong",
|
|
31
|
+
territory: "PHL",
|
|
32
|
+
title: "Lead UX Designer",
|
|
33
|
+
id: "courtney-long",
|
|
34
|
+
status: "Online"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
%>
|
|
38
|
+
|
|
39
|
+
<%
|
|
40
|
+
custom_display = capture do
|
|
41
|
+
pb_rails("flex", props: { align: "center" }) do
|
|
42
|
+
concat(pb_rails("avatar", props: { name: "", size: "xs", id: "dropdown-avatar" }))
|
|
43
|
+
concat(pb_rails("body", props: { text: "", size: "xs", margin_x: "xs", id: "dropdown-avatar-name" }))
|
|
44
|
+
concat(pb_rails("badge", props: { text: "", id: "dropdown-avatar-status" }))
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
%>
|
|
48
|
+
|
|
49
|
+
<%= pb_rails("dropdown", props: { id: "user-dropdown-disabled-options", options: options }) do %>
|
|
50
|
+
<%= pb_rails("dropdown/dropdown_trigger", props: { placeholder: "Select a User", custom_display: custom_display }) %>
|
|
51
|
+
<%= pb_rails("dropdown/dropdown_container") do %>
|
|
52
|
+
<% options.each do |option| %>
|
|
53
|
+
<%= pb_rails("dropdown/dropdown_option", props: { option: option }) do %>
|
|
54
|
+
<%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
|
|
55
|
+
<%= pb_rails("flex/flex_item") do %>
|
|
56
|
+
<%= pb_rails("user", props: { name: option[:label], align: "left", avatar: true, orientation: "horizontal", territory: option[:territory], title: option[:title] }) %>
|
|
57
|
+
<% end %>
|
|
58
|
+
<%= pb_rails("flex/flex_item") do %>
|
|
59
|
+
<%= pb_rails("badge", props: { rounded: true, dark: true, text: option[:status], variant: option[:status] == "Offline" ? "neutral" : option[:status] == "Online" ? "success" : "warning" }) %>
|
|
60
|
+
<% end %>
|
|
61
|
+
<% end %>
|
|
62
|
+
<% end %>
|
|
63
|
+
<% end %>
|
|
64
|
+
<% end %>
|
|
65
|
+
<% end %>
|
|
66
|
+
|
|
67
|
+
<script>
|
|
68
|
+
document.addEventListener("pb:dropdown:selected", (e) => {
|
|
69
|
+
if (e.target.id !== "user-dropdown-disabled-options") return;
|
|
70
|
+
|
|
71
|
+
const option = e.detail;
|
|
72
|
+
const dropdown = e.target;
|
|
73
|
+
const display = dropdown.querySelector("[data-dropdown-trigger-custom-display]");
|
|
74
|
+
if (!display) return;
|
|
75
|
+
|
|
76
|
+
const nameEl = display.querySelector("#dropdown-avatar-name");
|
|
77
|
+
if (nameEl) nameEl.textContent = option.label;
|
|
78
|
+
|
|
79
|
+
const avatarWrapper = display.querySelector("#dropdown-avatar .avatar_wrapper");
|
|
80
|
+
if (avatarWrapper) {
|
|
81
|
+
const initials = (option.label[0] + option.label.split(" ").pop()[0]).toUpperCase();
|
|
82
|
+
avatarWrapper.dataset.name = option.label;
|
|
83
|
+
avatarWrapper.setAttribute("data-initials", initials);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const badgeEl = display.querySelector("#dropdown-avatar-status");
|
|
87
|
+
const variant = option.status === "Online" ? "success" : option.status === "Offline" ? "neutral" : "warning";
|
|
88
|
+
if (badgeEl) {
|
|
89
|
+
badgeEl.querySelector("span").textContent = option.status;
|
|
90
|
+
badgeEl.className = `pb_badge_kit_${variant}`;
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
</script>
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
4
|
+
import Badge from '../../pb_badge/_badge'
|
|
5
|
+
import Flex from '../../pb_flex/_flex'
|
|
6
|
+
import FlexItem from '../../pb_flex/_flex_item'
|
|
7
|
+
import Avatar from '../../pb_avatar/_avatar'
|
|
8
|
+
import User from '../../pb_user/_user'
|
|
9
|
+
import Body from '../../pb_body/_body'
|
|
10
|
+
|
|
11
|
+
const DropdownCustomDisplayDisabledOption = (props) => {
|
|
12
|
+
const [selectedOption, setSelectedOption] = useState();
|
|
13
|
+
|
|
14
|
+
const options = [
|
|
15
|
+
{
|
|
16
|
+
label: "Jasper Furniss",
|
|
17
|
+
value: "jasperFurniss",
|
|
18
|
+
territory: "PHL",
|
|
19
|
+
title: "Lead UX Engineer",
|
|
20
|
+
id: "jasper-furniss",
|
|
21
|
+
status: "Offline"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "Ramon Ruiz",
|
|
25
|
+
value: "ramonRuiz",
|
|
26
|
+
territory: "PHL",
|
|
27
|
+
title: "Senior UX Designer",
|
|
28
|
+
id: "ramon-ruiz",
|
|
29
|
+
status: "Unavailable",
|
|
30
|
+
disabled: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Carlos Lima",
|
|
34
|
+
value: "carlosLima",
|
|
35
|
+
territory: "PHL",
|
|
36
|
+
title: "Nitro Developer",
|
|
37
|
+
id: "carlos-lima",
|
|
38
|
+
status: "Online"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
label: "Courtney Long",
|
|
42
|
+
value: "courtneyLong",
|
|
43
|
+
territory: "PHL",
|
|
44
|
+
title: "Lead UX Designer",
|
|
45
|
+
id: "courtney-long",
|
|
46
|
+
status: "Online"
|
|
47
|
+
}
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
const CustomDisplay = () => {
|
|
51
|
+
return (
|
|
52
|
+
<>
|
|
53
|
+
{
|
|
54
|
+
selectedOption && (
|
|
55
|
+
<Flex align="center">
|
|
56
|
+
<Avatar
|
|
57
|
+
name={selectedOption.label}
|
|
58
|
+
size="xs"
|
|
59
|
+
/>
|
|
60
|
+
<Body
|
|
61
|
+
marginX="xs"
|
|
62
|
+
text={selectedOption.label}
|
|
63
|
+
/>
|
|
64
|
+
<Badge
|
|
65
|
+
text={selectedOption.status}
|
|
66
|
+
variant={selectedOption.status == "Offline" ? "neutral" : selectedOption.status == "Online" ? "success" : "warning"}
|
|
67
|
+
/>
|
|
68
|
+
</Flex>
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
</>
|
|
72
|
+
)
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<div>
|
|
78
|
+
<Dropdown
|
|
79
|
+
onSelect={(selectedItem) => setSelectedOption(selectedItem)}
|
|
80
|
+
options={options}
|
|
81
|
+
{...props}
|
|
82
|
+
>
|
|
83
|
+
<Dropdown.Trigger customDisplay={<CustomDisplay/>}
|
|
84
|
+
placeholder="Select a User"
|
|
85
|
+
/>
|
|
86
|
+
{options.map((option) => (
|
|
87
|
+
<Dropdown.Option key={option.id}
|
|
88
|
+
option={option}
|
|
89
|
+
>
|
|
90
|
+
<Flex
|
|
91
|
+
align="center"
|
|
92
|
+
justify="between"
|
|
93
|
+
>
|
|
94
|
+
<FlexItem>
|
|
95
|
+
<User
|
|
96
|
+
align="left"
|
|
97
|
+
avatar
|
|
98
|
+
name={option.label}
|
|
99
|
+
orientation="horizontal"
|
|
100
|
+
territory={option.territory}
|
|
101
|
+
title={option.title}
|
|
102
|
+
/>
|
|
103
|
+
</FlexItem>
|
|
104
|
+
<FlexItem>
|
|
105
|
+
<Badge dark
|
|
106
|
+
rounded
|
|
107
|
+
text={option.status}
|
|
108
|
+
variant={`${
|
|
109
|
+
option.status === "Offline"
|
|
110
|
+
? "neutral"
|
|
111
|
+
: option.status === "Unavailable"
|
|
112
|
+
? "warning"
|
|
113
|
+
: option.status === "Online"
|
|
114
|
+
? "success"
|
|
115
|
+
: "warning"
|
|
116
|
+
}`}
|
|
117
|
+
/>
|
|
118
|
+
</FlexItem>
|
|
119
|
+
</Flex>
|
|
120
|
+
</Dropdown.Option>
|
|
121
|
+
))}
|
|
122
|
+
</Dropdown>
|
|
123
|
+
</div>
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default DropdownCustomDisplayDisabledOption
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
To disable individual items in the `options`, include `disabled: true` within the object on the option that you want disabled. See the code snippet below for an example of how to do this.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%
|
|
2
|
+
options = [
|
|
3
|
+
{ label: 'United States', value: 'unitedStates', id: 'us' },
|
|
4
|
+
{ label: 'Canada', value: 'canada', id: 'ca' },
|
|
5
|
+
{ label: 'Pakistan', value: 'pakistan', id: 'pk' },
|
|
6
|
+
]
|
|
7
|
+
|
|
8
|
+
%>
|
|
9
|
+
|
|
10
|
+
<%= pb_rails("dropdown", props: {id: "dropdown-disabled", disabled: true,label: "Default Dropdown", options: options}) %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import Dropdown from '../_dropdown'
|
|
3
|
+
|
|
4
|
+
const DropdownDisabled = (props) => {
|
|
5
|
+
|
|
6
|
+
const options = [
|
|
7
|
+
{
|
|
8
|
+
label: "United States",
|
|
9
|
+
value: "unitedStates",
|
|
10
|
+
id: "us"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "Canada",
|
|
14
|
+
value: "canada",
|
|
15
|
+
id: "ca"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "Pakistan",
|
|
19
|
+
value: "pakistan",
|
|
20
|
+
id: "pk"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<Dropdown
|
|
28
|
+
disabled
|
|
29
|
+
label="Default Dropdown"
|
|
30
|
+
options={options}
|
|
31
|
+
{...props}
|
|
32
|
+
/>
|
|
33
|
+
</div>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default DropdownDisabled
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<%
|
|
2
|
+
options = [
|
|
3
|
+
{ label: "Available Option", value: "available", id: "available-option" },
|
|
4
|
+
{ label: "Coming Soon", value: "coming-soon", id: "coming-soon", disabled: true },
|
|
5
|
+
{ label: "Another Available", value: "another-available", id: "another-available" },
|
|
6
|
+
{ label: "Locked Feature", value: "locked-feature", id: "locked-feature", disabled: true },
|
|
7
|
+
]
|
|
8
|
+
%>
|
|
9
|
+
|
|
10
|
+
<%= pb_rails("dropdown", props: { label: "Disabled Options", options: options }) %>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React, { useState } from 'react'
|
|
2
|
+
|
|
3
|
+
import Dropdown from '../../pb_dropdown/_dropdown'
|
|
4
|
+
import Caption from '../../pb_caption/_caption'
|
|
5
|
+
|
|
6
|
+
const DropdownDisabledOption = (props) => {
|
|
7
|
+
const [selectedOption, setSelectedOption] = useState()
|
|
8
|
+
|
|
9
|
+
const options = [
|
|
10
|
+
{ label: 'Available Option', value: 'available', id: 'available-option' },
|
|
11
|
+
{ label: 'Coming Soon', value: 'coming-soon', id: 'coming-soon', disabled: true },
|
|
12
|
+
{ label: 'Another Available', value: 'another-available', id: 'another-available' },
|
|
13
|
+
{ label: 'Locked Feature', value: 'locked-feature', id: 'locked-feature', disabled: true },
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div>
|
|
18
|
+
<Caption
|
|
19
|
+
text="Select an option. Disabled options remain visible but cannot be selected."
|
|
20
|
+
/>
|
|
21
|
+
<Dropdown
|
|
22
|
+
onSelect={(selectedItem) => setSelectedOption(selectedItem)}
|
|
23
|
+
options={options}
|
|
24
|
+
placeholder="Choose an option"
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
{selectedOption && (
|
|
28
|
+
<Caption
|
|
29
|
+
marginTop="xs"
|
|
30
|
+
text={`Selected: ${selectedOption.label}`}
|
|
31
|
+
/>
|
|
32
|
+
)}
|
|
33
|
+
</div>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export default DropdownDisabledOption
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
To disable individual items in the `options`, include `disabled: true` within the object on the option that you want disabled. See the code snippet below for an example of how to do this.
|
|
@@ -6,12 +6,14 @@ examples:
|
|
|
6
6
|
- dropdown_multi_select_with_autocomplete: Multi Select with Autocomplete
|
|
7
7
|
- dropdown_multi_select_display_rails: Multi Select with Form Pill Props
|
|
8
8
|
- dropdown_subtle_variant: Subtle Variant
|
|
9
|
+
- dropdown_disabled_option: Disabled Option
|
|
9
10
|
- dropdown_subcomponent_structure_rails: Subcomponent Structure
|
|
10
11
|
- dropdown_with_autocomplete_with_subcomponents: Autocomplete with Subcomponent Structure
|
|
11
12
|
- dropdown_with_label: With Label
|
|
12
13
|
- dropdown_with_custom_options_rails: Custom Options
|
|
13
14
|
- dropdown_multi_select_with_custom_options: Multi Select with Custom Options
|
|
14
15
|
- dropdown_with_custom_display_rails: Custom Display
|
|
16
|
+
- dropdown_custom_display_disabled_option: Custom Display Disabled Option
|
|
15
17
|
- dropdown_with_custom_trigger_rails: Custom Trigger
|
|
16
18
|
- dropdown_with_search_rails: Custom Trigger Dropdown with Search
|
|
17
19
|
- dropdown_with_custom_padding: Custom Option Padding
|
|
@@ -33,6 +35,7 @@ examples:
|
|
|
33
35
|
- dropdown_quickpick_with_date_pickers_rails: Quick Pick with Date Pickers
|
|
34
36
|
- dropdown_quickpick_with_date_pickers_default_rails: Quick Pick with Date Pickers (Default Value)
|
|
35
37
|
- dropdown_required_indicator: Required Indicator
|
|
38
|
+
- dropdown_disabled: Disabled Input
|
|
36
39
|
- dropdown_custom_event_type: Custom Event Type
|
|
37
40
|
|
|
38
41
|
react:
|
|
@@ -42,10 +45,12 @@ examples:
|
|
|
42
45
|
- dropdown_multi_select_with_autocomplete: Multi Select with Autocomplete
|
|
43
46
|
- dropdown_multi_select_display: Multi Select with Form Pill Props
|
|
44
47
|
- dropdown_subtle_variant: Subtle Variant
|
|
48
|
+
- dropdown_disabled_option: Disabled Option
|
|
45
49
|
- dropdown_subcomponent_structure: Subcomponent Structure
|
|
46
50
|
- dropdown_with_autocomplete_with_subcomponents: Autocomplete with Subcomponent Structure
|
|
47
51
|
- dropdown_with_label: With Label
|
|
48
52
|
- dropdown_with_custom_options: Custom Options
|
|
53
|
+
- dropdown_custom_display_disabled_option: Custom Display Disabled Option
|
|
49
54
|
- dropdown_multi_select_with_custom_options: Multi Select with Custom Options
|
|
50
55
|
- dropdown_with_custom_display: Custom Display
|
|
51
56
|
- dropdown_with_custom_trigger: Custom Trigger
|
|
@@ -71,3 +76,4 @@ examples:
|
|
|
71
76
|
- dropdown_quickpick_custom: Quick Pick Variant (Custom Quick Pick Dates)
|
|
72
77
|
- dropdown_quickpick_with_date_pickers: Quick Pick Variant with Date Pickers
|
|
73
78
|
- dropdown_required_indicator: Required Indicator
|
|
79
|
+
- dropdown_disabled: Disabled Input
|
|
@@ -33,3 +33,6 @@ export { default as DropdownWithClearable } from './_dropdown_with_clearable.jsx
|
|
|
33
33
|
export { default as DropdownWithConstrainHeight } from './_dropdown_with_constrain_height.jsx'
|
|
34
34
|
export { default as DropdownClosingOptions } from './_dropdown_closing_options.jsx'
|
|
35
35
|
export { default as DropdownRequiredIndicator } from "./_dropdown_required_indicator.jsx";
|
|
36
|
+
export { default as DropdownDisabledOption } from "./_dropdown_disabled_option.jsx";
|
|
37
|
+
export { default as DropdownCustomDisplayDisabledOption } from "./_dropdown_custom_display_disabled_option.jsx";
|
|
38
|
+
export { default as DropdownDisabled } from "./_dropdown_disabled.jsx";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Full Screen creates a focused overlay for workflows that need more room, such as tables, filters, dashboards, or review screens. It can manage its own trigger or be controlled with `useFullScreen` when the trigger needs to live elsewhere in the interface.
|
|
@@ -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 FullScreenContentPadding = (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
|
+
contentPadding="md"
|
|
53
|
+
headerText="Fullscreen Table"
|
|
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 FullScreenContentPadding;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use `contentPadding` to tune the spacing around fullscreen content. The default is `lg` for comfortable breathing room; choose a smaller value like `md` when the content is dense or already has its own container spacing.
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
{
|
|
2
|
+
"children": {
|
|
3
|
+
"editable": true,
|
|
4
|
+
"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>"
|
|
5
|
+
},
|
|
6
|
+
"structureModes": {
|
|
7
|
+
"default": "trigger_prop",
|
|
8
|
+
"modes": {
|
|
9
|
+
"trigger_prop": {
|
|
10
|
+
"label": "Trigger Prop",
|
|
11
|
+
"template": "<FullScreen{{props}}>\n {{children}}\n</FullScreen>",
|
|
12
|
+
"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>",
|
|
13
|
+
"props": {
|
|
14
|
+
"headerText": "Enrollment Review",
|
|
15
|
+
"trigger": "({ onClick, isOpen }) => (\n <Button\n marginBottom=\"md\"\n onClick={onClick}\n >\n {isOpen ? \"Exit Fullscreen\" : \"Enter Fullscreen\"}\n </Button>\n)"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"hook_trigger": {
|
|
19
|
+
"label": "Hook Trigger",
|
|
20
|
+
"template": "<FullScreen\n isFullscreen={isFullscreen}\n onClose={() => setIsFullscreen(false)}{{props}}\n>\n {{children}}\n</FullScreen>",
|
|
21
|
+
"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>",
|
|
22
|
+
"imports": ["useFullScreen"],
|
|
23
|
+
"props": {
|
|
24
|
+
"headerText": "Enrollment Review"
|
|
25
|
+
},
|
|
26
|
+
"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 />"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"defaults": {
|
|
31
|
+
"contentPadding": "lg",
|
|
32
|
+
"escToExit": true,
|
|
33
|
+
"headerText": "Enrollment Review",
|
|
34
|
+
"headerTextStyling": "title_4",
|
|
35
|
+
"onClose": "() => console.log('Fullscreen closed')",
|
|
36
|
+
"onOpen": "() => console.log('Fullscreen opened')",
|
|
37
|
+
"stickyHeader": true
|
|
38
|
+
},
|
|
39
|
+
"groups": [
|
|
40
|
+
{
|
|
41
|
+
"name": "Header",
|
|
42
|
+
"props": ["headerText", "headerTextStyling", "stickyHeader"]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "Content",
|
|
46
|
+
"props": ["contentPadding"]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"name": "Behavior",
|
|
50
|
+
"props": ["escToExit"]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "Callbacks",
|
|
54
|
+
"props": ["trigger", "onOpen", "onClose"]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"presets": [
|
|
58
|
+
{
|
|
59
|
+
"name": "Default",
|
|
60
|
+
"props": {
|
|
61
|
+
"contentPadding": "lg",
|
|
62
|
+
"escToExit": true,
|
|
63
|
+
"headerText": "Enrollment Review",
|
|
64
|
+
"headerTextStyling": "title_4",
|
|
65
|
+
"stickyHeader": true,
|
|
66
|
+
"trigger": "({ onClick, isOpen }) => (\n <Button\n marginBottom=\"md\"\n onClick={onClick}\n >\n {isOpen ? \"Exit Fullscreen\" : \"Enter Fullscreen\"}\n </Button>\n)"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "Hook trigger",
|
|
71
|
+
"structureMode": "hook_trigger",
|
|
72
|
+
"props": {
|
|
73
|
+
"contentPadding": "lg",
|
|
74
|
+
"escToExit": true,
|
|
75
|
+
"headerText": "Enrollment Review",
|
|
76
|
+
"headerTextStyling": "title_4",
|
|
77
|
+
"stickyHeader": true
|
|
78
|
+
},
|
|
79
|
+
"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>"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "Medium padding",
|
|
83
|
+
"props": {
|
|
84
|
+
"contentPadding": "md",
|
|
85
|
+
"headerText": "Medium Padding",
|
|
86
|
+
"stickyHeader": true
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "No padding",
|
|
91
|
+
"props": {
|
|
92
|
+
"contentPadding": "none",
|
|
93
|
+
"headerText": "Edge-to-edge Content",
|
|
94
|
+
"stickyHeader": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "Non-sticky header",
|
|
99
|
+
"props": {
|
|
100
|
+
"contentPadding": "lg",
|
|
101
|
+
"headerText": "Scrolling Header",
|
|
102
|
+
"stickyHeader": false
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "Body header",
|
|
107
|
+
"props": {
|
|
108
|
+
"headerText": "A quieter header treatment",
|
|
109
|
+
"headerTextStyling": "body",
|
|
110
|
+
"stickyHeader": true
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"conditionals": {},
|
|
115
|
+
"hints": {
|
|
116
|
+
"hook_trigger": {
|
|
117
|
+
"presetName": "Hook trigger",
|
|
118
|
+
"message": "Use the hook pattern when the trigger needs to live outside the FullScreen wrapper.",
|
|
119
|
+
"type": "info"
|
|
120
|
+
},
|
|
121
|
+
"content_padding": {
|
|
122
|
+
"when": {
|
|
123
|
+
"contentPadding": "none"
|
|
124
|
+
},
|
|
125
|
+
"message": "Use no padding when the fullscreen content already provides its own spacing or needs an edge-to-edge layout.",
|
|
126
|
+
"type": "info"
|
|
127
|
+
},
|
|
128
|
+
"sticky_header": {
|
|
129
|
+
"when": {
|
|
130
|
+
"stickyHeader": false
|
|
131
|
+
},
|
|
132
|
+
"message": "Turn off stickyHeader when the header should scroll away with the fullscreen content.",
|
|
133
|
+
"type": "info"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"hiddenProps": ["isFullscreen"]
|
|
137
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
examples:
|
|
2
|
+
|
|
3
|
+
rails:
|
|
4
|
+
# - full_screen_default: Default
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
react:
|
|
8
|
+
- full_screen_default: Default
|
|
9
|
+
- full_screen_custom_trigger: Custom Trigger
|
|
10
|
+
- full_screen_header_text_styling: Header Text Styling
|
|
11
|
+
- full_screen_sticky_header: Sticky Header
|
|
12
|
+
- full_screen_content_padding: Content Padding
|
|
13
|
+
- full_screen_table_and_filter: Complex Example
|
|
14
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as FullScreenDefault } from './_full_screen_default.jsx'
|
|
2
|
+
export { default as FullScreenCustomTrigger } from './_full_screen_custom_trigger.jsx'
|
|
3
|
+
export { default as FullScreenTableAndFilter } from './_full_screen_table_and_filter.jsx'
|
|
4
|
+
export { default as FullScreenHeaderTextStyling } from './_full_screen_header_text_styling.jsx'
|
|
5
|
+
export { default as FullScreenStickyHeader } from './_full_screen_sticky_header.jsx'
|
|
6
|
+
export { default as FullScreenContentPadding } from './_full_screen_content_padding.jsx'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: playbook_ui_docs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.10.0.pre.alpha.
|
|
4
|
+
version: 16.10.0.pre.alpha.play300617418
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Power UX
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-
|
|
12
|
+
date: 2026-07-01 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -946,6 +946,9 @@ files:
|
|
|
946
946
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options.md
|
|
947
947
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.html.erb
|
|
948
948
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_closing_options_rails.md
|
|
949
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.html.erb
|
|
950
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.jsx
|
|
951
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.md
|
|
949
952
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_event_type.html.erb
|
|
950
953
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_event_type.md
|
|
951
954
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
|
@@ -954,6 +957,11 @@ files:
|
|
|
954
957
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.md
|
|
955
958
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb
|
|
956
959
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
|
|
960
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.html.erb
|
|
961
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.jsx
|
|
962
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.html.erb
|
|
963
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.jsx
|
|
964
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.md
|
|
957
965
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
|
|
958
966
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
|
|
959
967
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx
|
|
@@ -1261,6 +1269,24 @@ files:
|
|
|
1261
1269
|
- app/pb_kits/playbook/pb_form_pill/docs/_playground.overrides.json
|
|
1262
1270
|
- app/pb_kits/playbook/pb_form_pill/docs/example.yml
|
|
1263
1271
|
- app/pb_kits/playbook/pb_form_pill/docs/index.js
|
|
1272
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_description.md
|
|
1273
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.jsx
|
|
1274
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.md
|
|
1275
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.jsx
|
|
1276
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.md
|
|
1277
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.html.erb
|
|
1278
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.jsx
|
|
1279
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.md
|
|
1280
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.jsx
|
|
1281
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.md
|
|
1282
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.jsx
|
|
1283
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.md
|
|
1284
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.jsx
|
|
1285
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.md
|
|
1286
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_playground.json
|
|
1287
|
+
- app/pb_kits/playbook/pb_full_screen/docs/_playground.overrides.json
|
|
1288
|
+
- app/pb_kits/playbook/pb_full_screen/docs/example.yml
|
|
1289
|
+
- app/pb_kits/playbook/pb_full_screen/docs/index.js
|
|
1264
1290
|
- app/pb_kits/playbook/pb_hashtag/docs/_description.md
|
|
1265
1291
|
- app/pb_kits/playbook/pb_hashtag/docs/_footer.md
|
|
1266
1292
|
- app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.html.erb
|