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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.html.erb +93 -0
  3. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.jsx +127 -0
  4. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_custom_display_disabled_option.md +1 -0
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.html.erb +10 -0
  6. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled.jsx +37 -0
  7. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.html.erb +10 -0
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.jsx +37 -0
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_disabled_option.md +1 -0
  10. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +6 -0
  11. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +3 -0
  12. data/app/pb_kits/playbook/pb_form_group/docs/_playground.json +100 -1
  13. data/app/pb_kits/playbook/pb_form_group/docs/_playground.overrides.json +91 -0
  14. data/app/pb_kits/playbook/pb_full_screen/docs/_description.md +1 -0
  15. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.jsx +68 -0
  16. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_content_padding.md +1 -0
  17. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.jsx +71 -0
  18. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_custom_trigger.md +1 -0
  19. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.html.erb +3 -0
  20. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.jsx +63 -0
  21. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_default.md +1 -0
  22. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.jsx +68 -0
  23. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_header_text_styling.md +1 -0
  24. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.jsx +68 -0
  25. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_sticky_header.md +1 -0
  26. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.jsx +149 -0
  27. data/app/pb_kits/playbook/pb_full_screen/docs/_full_screen_table_and_filter.md +1 -0
  28. data/app/pb_kits/playbook/pb_full_screen/docs/_playground.json +155 -0
  29. data/app/pb_kits/playbook/pb_full_screen/docs/_playground.overrides.json +137 -0
  30. data/app/pb_kits/playbook/pb_full_screen/docs/example.yml +14 -0
  31. data/app/pb_kits/playbook/pb_full_screen/docs/index.js +6 -0
  32. data/app/pb_kits/playbook/pb_layout/docs/_playground.json +246 -1
  33. data/app/pb_kits/playbook/pb_layout/docs/_playground.overrides.json +188 -0
  34. data/app/pb_kits/playbook/pb_progress_pills/docs/_playground.json +26 -13
  35. data/app/pb_kits/playbook/pb_progress_pills/docs/_playground.overrides.json +24 -6
  36. data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.json +50 -17
  37. data/app/pb_kits/playbook/pb_progress_simple/docs/_playground.overrides.json +41 -7
  38. data/app/pb_kits/playbook/pb_progress_step/docs/_playground.json +218 -1
  39. data/app/pb_kits/playbook/pb_progress_step/docs/_playground.overrides.json +189 -0
  40. data/app/pb_kits/playbook/pb_radio/docs/_playground.json +80 -6
  41. data/app/pb_kits/playbook/pb_radio/docs/_playground.overrides.json +82 -3
  42. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.json +171 -1
  43. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_playground.overrides.json +153 -0
  44. data/app/pb_kits/playbook/pb_select/docs/_playground.json +65 -19
  45. data/app/pb_kits/playbook/pb_select/docs/_playground.overrides.json +54 -14
  46. data/app/pb_kits/playbook/pb_selectable_card/docs/_playground.json +75 -82
  47. data/app/pb_kits/playbook/pb_selectable_card/docs/_playground.overrides.json +76 -76
  48. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.json +128 -1
  49. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_playground.overrides.json +106 -0
  50. data/app/pb_kits/playbook/pb_selectable_icon/docs/_playground.json +37 -21
  51. data/app/pb_kits/playbook/pb_selectable_icon/docs/_playground.overrides.json +35 -18
  52. data/app/pb_kits/playbook/pb_selectable_list/docs/_playground.json +174 -12
  53. data/app/pb_kits/playbook/pb_selectable_list/docs/_playground.overrides.json +162 -10
  54. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.json +92 -1
  55. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_playground.overrides.json +80 -0
  56. data/app/pb_kits/playbook/pb_source/docs/_playground.json +88 -1
  57. data/app/pb_kits/playbook/pb_source/docs/_playground.overrides.json +80 -0
  58. data/app/pb_kits/playbook/pb_star_rating/docs/_playground.json +28 -53
  59. data/app/pb_kits/playbook/pb_star_rating/docs/_playground.overrides.json +33 -32
  60. data/app/pb_kits/playbook/pb_stat_change/docs/_playground.json +15 -9
  61. data/app/pb_kits/playbook/pb_stat_change/docs/_playground.overrides.json +15 -5
  62. data/app/pb_kits/playbook/pb_stat_value/docs/_playground.json +19 -9
  63. data/app/pb_kits/playbook/pb_stat_value/docs/_playground.overrides.json +18 -7
  64. data/app/pb_kits/playbook/pb_table/docs/_playground.json +259 -1
  65. data/app/pb_kits/playbook/pb_table/docs/_playground.overrides.json +176 -0
  66. data/app/pb_kits/playbook/pb_text_input/docs/_playground.json +44 -5
  67. data/app/pb_kits/playbook/pb_text_input/docs/_playground.overrides.json +39 -3
  68. data/app/pb_kits/playbook/pb_textarea/docs/_playground.json +35 -3
  69. data/app/pb_kits/playbook/pb_textarea/docs/_playground.overrides.json +28 -3
  70. data/app/pb_kits/playbook/pb_time/docs/_playground.json +28 -14
  71. data/app/pb_kits/playbook/pb_time/docs/_playground.overrides.json +26 -13
  72. data/app/pb_kits/playbook/pb_time_picker/docs/_playground.json +36 -30
  73. data/app/pb_kits/playbook/pb_time_picker/docs/_playground.overrides.json +31 -26
  74. data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.json +86 -1
  75. data/app/pb_kits/playbook/pb_time_range_inline/docs/_playground.overrides.json +69 -0
  76. data/app/pb_kits/playbook/pb_time_stacked/docs/_playground.json +30 -9
  77. data/app/pb_kits/playbook/pb_time_stacked/docs/_playground.overrides.json +30 -9
  78. data/app/pb_kits/playbook/pb_timeline/docs/_playground.json +199 -1
  79. data/app/pb_kits/playbook/pb_timeline/docs/_playground.overrides.json +165 -0
  80. data/app/pb_kits/playbook/pb_timestamp/docs/_playground.json +36 -21
  81. data/app/pb_kits/playbook/pb_timestamp/docs/_playground.overrides.json +35 -20
  82. data/app/pb_kits/playbook/pb_toggle/docs/_playground.json +24 -13
  83. data/app/pb_kits/playbook/pb_toggle/docs/_playground.overrides.json +20 -12
  84. data/app/pb_kits/playbook/pb_tooltip/docs/_playground.json +42 -23
  85. data/app/pb_kits/playbook/pb_tooltip/docs/_playground.overrides.json +35 -15
  86. data/app/pb_kits/playbook/pb_typeahead/docs/_playground.json +124 -44
  87. data/app/pb_kits/playbook/pb_typeahead/docs/_playground.overrides.json +98 -31
  88. data/app/pb_kits/playbook/pb_user/docs/_playground.json +33 -15
  89. data/app/pb_kits/playbook/pb_user/docs/_playground.overrides.json +32 -15
  90. data/app/pb_kits/playbook/pb_user_badge/docs/_playground.json +26 -12
  91. data/app/pb_kits/playbook/pb_user_badge/docs/_playground.overrides.json +26 -9
  92. data/app/pb_kits/playbook/pb_weekday_stacked/docs/_playground.json +32 -5
  93. data/app/pb_kits/playbook/pb_weekday_stacked/docs/_playground.overrides.json +30 -4
  94. metadata +38 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81474679fa1e673e010a53e74c370621d241f8e9d9f79e031accd2d5dda84e7e
4
- data.tar.gz: 4c977e961d67b8bf78eea7160f643edeaa94c40f8198a941e0753052f4f1c9cc
3
+ metadata.gz: 848100ab0b18540bc0a206fa0e424c3efb52965935b07a8cfdc3b9cd4ab4e48e
4
+ data.tar.gz: a95ae1a587b664448fa5398ec07fd945db65afa5fae31f872d92abc6601061eb
5
5
  SHA512:
6
- metadata.gz: 77bc037bdc66f1df564020b0e2ec2904ca13e3cbd0c4568fa2777e09fe3e6c2c7ff3422ab4e0a2057da03599083b584e39598e4f60a6793d9473b0506048d9e2
7
- data.tar.gz: 3a92c8be8e162d0d8ef9cb50853ed111022cb573b6b52a2561d6fa488addabcff087e548029314f55b649b6437be7339612f19ac7e54e48d19abba231ef0d9d1
6
+ metadata.gz: 7a6fcb1466507aba549248990daff3689a9b5ea236f394edf35f781d5377eafc67265fe4ea997f4dc3f0247fdee937e61ecc95b9e98dacffc84e6d79bb33a30a
7
+ data.tar.gz: e0d301f3d3bfd3adf02ce5e72b004f1eb13e26ba7971dd74337abe535fe226df6587d76ace3c946bf34e0889d4f84ccb0b1d2c5da8fc09a96ad7b80b437f520e
@@ -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";
@@ -1 +1,100 @@
1
- null
1
+ {
2
+ "template": "<FormGroup{{props}}>\n{{children}}\n</FormGroup>",
3
+ "propTargets": {},
4
+ "defaults": {
5
+ "fullWidth": false
6
+ },
7
+ "groups": [
8
+ {
9
+ "name": "Layout",
10
+ "props": [
11
+ "fullWidth"
12
+ ]
13
+ }
14
+ ],
15
+ "presets": [
16
+ {
17
+ "name": "Text Inputs",
18
+ "props": {},
19
+ "children": "<TextInput\n id=\"first-name\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
20
+ },
21
+ {
22
+ "name": "Full Width",
23
+ "props": {
24
+ "fullWidth": true
25
+ },
26
+ "children": "<TextInput\n id=\"first-name-full-width\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial-full-width\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name-full-width\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
27
+ },
28
+ {
29
+ "name": "Search Button",
30
+ "props": {},
31
+ "children": "<TextInput\n id=\"search-with-action\"\n label=\"Search\"\n name=\"search\"\n onChange={handleFieldChange}\n placeholder=\"Search\"\n value={formFields.search}\n/>\n<Button\n onClick={() => alert(\"Button clicked!\")}\n text=\"Submit\"\n variant=\"secondary\"\n/>"
32
+ },
33
+ {
34
+ "name": "Select",
35
+ "props": {},
36
+ "children": "<TextInput\n id=\"artist-name\"\n name=\"artistName\"\n onChange={handleFieldChange}\n placeholder=\"Enter Artist Name\"\n value={formFields.artistName || \"\"}\n/>\n<Select\n blankSelection=\"Genre\"\n name=\"genre\"\n options={[\n { value: \"Country\" },\n { value: \"Pop\" },\n { value: \"Rock\" },\n { value: \"Hip-Hop/Rap\" }\n ]}\n/>"
37
+ },
38
+ {
39
+ "name": "Date Picker",
40
+ "props": {},
41
+ "children": "<TextInput\n id=\"event-name\"\n label=\"Event\"\n name=\"eventName\"\n onChange={handleFieldChange}\n placeholder=\"Event Name\"\n value={formFields.eventName}\n/>\n<DatePicker\n label=\"Event Date\"\n pickerId=\"form-group-event-date\"\n/>"
42
+ },
43
+ {
44
+ "name": "Typeahead Action",
45
+ "props": {},
46
+ "children": "<Typeahead\n id=\"products\"\n label=\"Products\"\n options={[\n { label: \"Windows\", value: \"windows\" },\n { label: \"Roof\", value: \"roof\" },\n { label: \"Siding\", value: \"siding\" },\n { label: \"Doors\", value: \"doors\" }\n ]}\n/>\n<Button\n onClick={() => alert(\"Product added!\")}\n text=\"Add\"\n variant=\"secondary\"\n/>"
47
+ },
48
+ {
49
+ "name": "Selectable Cards",
50
+ "props": {},
51
+ "children": "<SelectableCard\n checked={formFields.animal === \"cat\"}\n inputId=\"cat-option\"\n multi={false}\n name=\"animal\"\n onChange={handleAnimalChange}\n value=\"cat\"\n>\n Cat\n</SelectableCard>\n<SelectableCard\n checked={formFields.animal === \"dog\"}\n inputId=\"dog-option\"\n multi={false}\n name=\"animal\"\n onChange={handleAnimalChange}\n value=\"dog\"\n>\n Dog\n</SelectableCard>"
52
+ }
53
+ ],
54
+ "conditionals": {},
55
+ "hints": {
56
+ "text_inputs": {
57
+ "presetName": "Text Inputs",
58
+ "message": "Text Inputs uses state-backed child inputs so the playground fields stay editable.",
59
+ "type": "info"
60
+ },
61
+ "full_width": {
62
+ "presetName": "Full Width",
63
+ "message": "Full Width applies fullWidth to the FormGroup while leaving each child input editable.",
64
+ "type": "info"
65
+ },
66
+ "search_button": {
67
+ "presetName": "Search Button",
68
+ "message": "Search Button pairs a controlled text field with an action button in the same group.",
69
+ "type": "info"
70
+ },
71
+ "select": {
72
+ "presetName": "Select",
73
+ "message": "Select shows mixed children inside the group, with the options array kept directly in editable children.",
74
+ "type": "info"
75
+ },
76
+ "date_picker": {
77
+ "presetName": "Date Picker",
78
+ "message": "Date Picker combines a text input with a picker child, including the pickerId required by the kit.",
79
+ "type": "info"
80
+ },
81
+ "typeahead_action": {
82
+ "presetName": "Typeahead Action",
83
+ "message": "Typeahead Action mirrors the docs pattern of a searchable Typeahead plus an adjacent button.",
84
+ "type": "info"
85
+ },
86
+ "selectable_cards": {
87
+ "presetName": "Selectable Cards",
88
+ "message": "Selectable Cards keeps both card options in children so each option can be edited together.",
89
+ "type": "info"
90
+ }
91
+ },
92
+ "wrapper": "const FormGroupPlayground = () => {\n const [formFields, setFormFields] = useState({\n firstName: \"Jane\",\n middleInitial: \"Q\",\n lastName: \"Doe\",\n search: \"\",\n eventName: \"Planning session\",\n animal: \"cat\"\n })\n\n const handleFieldChange = ({ target }) => {\n setFormFields({ ...formFields, [target.name]: target.value })\n }\n\n const handleAnimalChange = ({ target }) => {\n setFormFields({ ...formFields, animal: target.value })\n }\n\n return {{component}}\n}\n\n<FormGroupPlayground />",
93
+ "externalImports": [
94
+ "import React, { useState } from 'react'"
95
+ ],
96
+ "children": {
97
+ "editable": true,
98
+ "default": "<TextInput\n id=\"first-name\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
99
+ }
100
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "template": "<FormGroup{{props}}>\n{{children}}\n</FormGroup>",
3
+ "wrapper": "const FormGroupPlayground = () => {\n const [formFields, setFormFields] = useState({\n firstName: \"Jane\",\n middleInitial: \"Q\",\n lastName: \"Doe\",\n search: \"\",\n eventName: \"Planning session\",\n animal: \"cat\"\n })\n\n const handleFieldChange = ({ target }) => {\n setFormFields({ ...formFields, [target.name]: target.value })\n }\n\n const handleAnimalChange = ({ target }) => {\n setFormFields({ ...formFields, animal: target.value })\n }\n\n return {{component}}\n}\n\n<FormGroupPlayground />",
4
+ "externalImports": ["import React, { useState } from 'react'"],
5
+ "children": {
6
+ "editable": true,
7
+ "default": "<TextInput\n id=\"first-name\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
8
+ },
9
+ "groups": [
10
+ {
11
+ "name": "Layout",
12
+ "props": ["fullWidth"]
13
+ }
14
+ ],
15
+ "presets": [
16
+ {
17
+ "name": "Text Inputs",
18
+ "props": {},
19
+ "children": "<TextInput\n id=\"first-name\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
20
+ },
21
+ {
22
+ "name": "Full Width",
23
+ "props": {
24
+ "fullWidth": true
25
+ },
26
+ "children": "<TextInput\n id=\"first-name-full-width\"\n label=\"First Name\"\n name=\"firstName\"\n onChange={handleFieldChange}\n placeholder=\"Enter first name\"\n value={formFields.firstName}\n/>\n<TextInput\n id=\"middle-initial-full-width\"\n label=\"Middle Initial\"\n name=\"middleInitial\"\n onChange={handleFieldChange}\n placeholder=\"Enter middle initial\"\n value={formFields.middleInitial}\n/>\n<TextInput\n id=\"last-name-full-width\"\n label=\"Last Name\"\n name=\"lastName\"\n onChange={handleFieldChange}\n placeholder=\"Enter last name\"\n value={formFields.lastName}\n/>"
27
+ },
28
+ {
29
+ "name": "Search Button",
30
+ "props": {},
31
+ "children": "<TextInput\n id=\"search-with-action\"\n label=\"Search\"\n name=\"search\"\n onChange={handleFieldChange}\n placeholder=\"Search\"\n value={formFields.search}\n/>\n<Button\n onClick={() => alert(\"Button clicked!\")}\n text=\"Submit\"\n variant=\"secondary\"\n/>"
32
+ },
33
+ {
34
+ "name": "Select",
35
+ "props": {},
36
+ "children": "<TextInput\n id=\"artist-name\"\n name=\"artistName\"\n onChange={handleFieldChange}\n placeholder=\"Enter Artist Name\"\n value={formFields.artistName || \"\"}\n/>\n<Select\n blankSelection=\"Genre\"\n name=\"genre\"\n options={[\n { value: \"Country\" },\n { value: \"Pop\" },\n { value: \"Rock\" },\n { value: \"Hip-Hop/Rap\" }\n ]}\n/>"
37
+ },
38
+ {
39
+ "name": "Date Picker",
40
+ "props": {},
41
+ "children": "<TextInput\n id=\"event-name\"\n label=\"Event\"\n name=\"eventName\"\n onChange={handleFieldChange}\n placeholder=\"Event Name\"\n value={formFields.eventName}\n/>\n<DatePicker\n label=\"Event Date\"\n pickerId=\"form-group-event-date\"\n/>"
42
+ },
43
+ {
44
+ "name": "Typeahead Action",
45
+ "props": {},
46
+ "children": "<Typeahead\n id=\"products\"\n label=\"Products\"\n options={[\n { label: \"Windows\", value: \"windows\" },\n { label: \"Roof\", value: \"roof\" },\n { label: \"Siding\", value: \"siding\" },\n { label: \"Doors\", value: \"doors\" }\n ]}\n/>\n<Button\n onClick={() => alert(\"Product added!\")}\n text=\"Add\"\n variant=\"secondary\"\n/>"
47
+ },
48
+ {
49
+ "name": "Selectable Cards",
50
+ "props": {},
51
+ "children": "<SelectableCard\n checked={formFields.animal === \"cat\"}\n inputId=\"cat-option\"\n multi={false}\n name=\"animal\"\n onChange={handleAnimalChange}\n value=\"cat\"\n>\n Cat\n</SelectableCard>\n<SelectableCard\n checked={formFields.animal === \"dog\"}\n inputId=\"dog-option\"\n multi={false}\n name=\"animal\"\n onChange={handleAnimalChange}\n value=\"dog\"\n>\n Dog\n</SelectableCard>"
52
+ }
53
+ ],
54
+ "hints": {
55
+ "text_inputs": {
56
+ "presetName": "Text Inputs",
57
+ "message": "Text Inputs uses state-backed child inputs so the playground fields stay editable.",
58
+ "type": "info"
59
+ },
60
+ "full_width": {
61
+ "presetName": "Full Width",
62
+ "message": "Full Width applies fullWidth to the FormGroup while leaving each child input editable.",
63
+ "type": "info"
64
+ },
65
+ "search_button": {
66
+ "presetName": "Search Button",
67
+ "message": "Search Button pairs a controlled text field with an action button in the same group.",
68
+ "type": "info"
69
+ },
70
+ "select": {
71
+ "presetName": "Select",
72
+ "message": "Select shows mixed children inside the group, with the options array kept directly in editable children.",
73
+ "type": "info"
74
+ },
75
+ "date_picker": {
76
+ "presetName": "Date Picker",
77
+ "message": "Date Picker combines a text input with a picker child, including the pickerId required by the kit.",
78
+ "type": "info"
79
+ },
80
+ "typeahead_action": {
81
+ "presetName": "Typeahead Action",
82
+ "message": "Typeahead Action mirrors the docs pattern of a searchable Typeahead plus an adjacent button.",
83
+ "type": "info"
84
+ },
85
+ "selectable_cards": {
86
+ "presetName": "Selectable Cards",
87
+ "message": "Selectable Cards keeps both card options in children so each option can be edited together.",
88
+ "type": "info"
89
+ }
90
+ }
91
+ }
@@ -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.