playbook_ui_docs 14.23.0.pre.alpha.PLAY1985renderpaginationonlywithpages9148 → 14.23.0.pre.alpha.PLAY2121enableexpandedfield9199

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 (22) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +90 -0
  3. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +4 -0
  4. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +1 -0
  5. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
  6. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +3 -2
  7. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  8. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.html.erb +75 -0
  9. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.jsx +94 -0
  10. data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_show_checked_children.md +3 -0
  11. data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
  12. data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +2 -1
  13. data/dist/playbook-doc.js +2 -2
  14. metadata +7 -10
  15. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +0 -69
  16. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +0 -71
  17. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +0 -110
  18. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +0 -76
  19. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +0 -76
  20. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +0 -76
  21. data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +0 -10
  22. data/app/pb_kits/playbook/pb_walkthrough/docs/index.js +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec99d50d99ee07c155d71870139ee4f3f920805d666f537bef1a54a009feb982
4
- data.tar.gz: 7741dc111b88a6a94c62dc715c435f67b636b6eb84e9138e91ab3320d2086ad0
3
+ metadata.gz: de0416514d2e64d0ea6696f5c8ad147ab4063c1ef83636a2853f553441e56ba2
4
+ data.tar.gz: 4a7055a08fa75f8f4b36412367635698ff6eaa3b9e57baab5563b429a1130a28
5
5
  SHA512:
6
- metadata.gz: 6633bd15654966fc892bdc4dfd880037002ca7a1e48516adddd010501dd2aabf2a9c99e7e42f32ad0b39698653ef548e05d787ee7eedf84091fed74717bb1ec5
7
- data.tar.gz: 6b6414830e3da8a2c95f823a79e559ac00fc0769b03fe8fe7c6873d29fe0a5332bd75030fc2d8ff3c62f57cb10fed60f08c2c8c2883f584c34bad252d7946db6
6
+ metadata.gz: b69f9c884e16420701addba2543a4cb484c8298dacc1c1010907ae798bbf9b58934b6e3ec5dea8ade23ec9b862dfab74097ca4bdd641037ade6ddf9aaf317868
7
+ data.tar.gz: b5478d2bd0712723e0408602102cc0dd7133df3bd008d2b4a8fa02119d377c30977242d134ff3ed79b54f906073965001269e9e253f5101107145479698cdc38
@@ -0,0 +1,90 @@
1
+ import React from 'react'
2
+ import Dropdown from '../_dropdown'
3
+
4
+ const DropdownCustomActiveStyleOptions = (props) => {
5
+
6
+
7
+ const options = [
8
+ {
9
+ label: "United States",
10
+ value: "unitedStates",
11
+ id: "us"
12
+ },
13
+ {
14
+ label: "Canada",
15
+ value: "canada",
16
+ id: "ca"
17
+ },
18
+ {
19
+ label: "Pakistan",
20
+ value: "pakistan",
21
+ id: "pk"
22
+ }
23
+ ];
24
+
25
+
26
+ return (
27
+ <div>
28
+ <Dropdown
29
+ activeStyle={{
30
+ backgroundColor: "bg_light",
31
+ fontColor: "primary",
32
+ }}
33
+ label="Background Color: bg_light; Font Color: primary"
34
+ marginBottom="sm"
35
+ options={options}
36
+ {...props}
37
+ >
38
+ <Dropdown.Trigger/>
39
+ <Dropdown.Container>
40
+ {options.map((option) => (
41
+ <Dropdown.Option key={option.id}
42
+ option={option}
43
+ />
44
+ ))}
45
+ </Dropdown.Container>
46
+ </Dropdown>
47
+ <Dropdown
48
+ activeStyle={{
49
+ backgroundColor: "white",
50
+ fontColor: "primary",
51
+ }}
52
+ label="Background Color: white; Font Color: primary"
53
+ marginBottom="sm"
54
+ options={options}
55
+ {...props}
56
+ />
57
+ <Dropdown
58
+ activeStyle={{
59
+ backgroundColor: "bg_light",
60
+ fontColor: "text_lt_default",
61
+ }}
62
+ autocomplete
63
+ label="Background Color: bg_light; Font Color: text_lt_default"
64
+ marginBottom="sm"
65
+ options={options}
66
+ {...props}
67
+ />
68
+ <Dropdown
69
+ activeStyle={{
70
+ fontColor: "text_lt_lighter",
71
+ }}
72
+ label="Font Color: text_lt_lighter"
73
+ marginBottom="sm"
74
+ options={options}
75
+ {...props}
76
+ >
77
+ <Dropdown.Trigger/>
78
+ <Dropdown.Container>
79
+ {options.map((option) => (
80
+ <Dropdown.Option key={option.id}
81
+ option={option}
82
+ />
83
+ ))}
84
+ </Dropdown.Container>
85
+ </Dropdown>
86
+ </div>
87
+ )
88
+ }
89
+
90
+ export default DropdownCustomActiveStyleOptions
@@ -0,0 +1,4 @@
1
+ The `activeStyle` prop can be used to customize the appearance of the dropdown selection indicator. It accepts an object with the following keys: `backgroundColor` sets the background color of the selected item (and its hover state); `fontColor` sets the font color of the selected item.
2
+
3
+ `backgroundColor` **Type**: String | **Values**: bg_light | white | **Default**: (no selection) is primary
4
+ `fontColor` **Type**: String | **Values**: primary | all [Playbook Text Colors](https://playbook.powerapp.cloud/visual_guidelines/colors) | **Default**: (no selection) is white
@@ -18,6 +18,7 @@ const DropdownCustomRadioOptions = (props) => {
18
18
  return (
19
19
  <div>
20
20
  <Dropdown
21
+ activeStyle={{ backgroundColor: "bg_light", fontColor: "text_lt_default" }}
21
22
  label="Select Item"
22
23
  onSelect={(selectedItem) => setSelectedValue(selectedItem?.value)}
23
24
  options={options}
@@ -1 +1 @@
1
- Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown.
1
+ Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown. Use the [activeStyle](https://playbook.powerapp.cloud/kits/dropdown/react#custom-active-style-options) `backgroundColor` and `fontColor` props to create contrast between the Radio selection indicator and the Dropdown selection background indicator.
@@ -16,7 +16,7 @@ examples:
16
16
  - dropdown_with_search_rails: Custom Trigger Dropdown with Search
17
17
  - dropdown_with_custom_padding: Custom Option Padding
18
18
  - dropdown_with_custom_icon_options: Custom Icon Options
19
- # - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
19
+ # - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in the Rails follow up to [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
20
20
  - dropdown_error: Dropdown with Error
21
21
  - dropdown_default_value: Default Value
22
22
  - dropdown_multi_select_with_default: Multi Select Default Value
@@ -39,8 +39,9 @@ examples:
39
39
  - dropdown_with_custom_trigger: Custom Trigger
40
40
  - dropdown_with_search: Custom Trigger Dropdown with Search
41
41
  - dropdown_with_custom_padding: Custom Option Padding
42
+ - dropdown_with_custom_active_style_options: Custom Active Style Options
42
43
  - dropdown_with_custom_icon_options: Custom Icon Options
43
- # - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
44
+ - dropdown_with_custom_radio_options: Custom Radio Options
44
45
  - dropdown_error: Dropdown with Error
45
46
  - dropdown_default_value: Default Value
46
47
  - dropdown_multi_select_with_default: Multi Select Default Value
@@ -21,4 +21,5 @@ export { default as DropdownMultiSelectWithAutocomplete } from './_dropdown_mult
21
21
  export { default as DropdownMultiSelectWithDefault } from './_dropdown_multi_select_with_default.jsx'
22
22
  export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
23
23
  export {default as DropdownWithCustomIconOptions} from './_dropdown_with_custom_icon_options.jsx'
24
- export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
24
+ export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
25
+ export {default as DropdownWithCustomActiveStyleOptions} from './_dropdown_with_custom_active_style_options.jsx'
@@ -0,0 +1,75 @@
1
+ <% treeData = [{
2
+ label: "Power Home Remodeling",
3
+ value: "powerHomeRemodeling",
4
+ id: "100",
5
+ expanded: true,
6
+ children: [
7
+ {
8
+ label: "People",
9
+ value: "people",
10
+ id: "101",
11
+ children: [
12
+ {
13
+ label: "Talent Acquisition",
14
+ value: "talentAcquisition",
15
+ id: "102",
16
+ },
17
+ {
18
+ label: "Business Affairs",
19
+ value: "businessAffairs",
20
+ id: "103",
21
+ children: [
22
+ {
23
+ label: "Initiatives",
24
+ value: "initiatives",
25
+ id: "104",
26
+ },
27
+ {
28
+ label: "Learning & Development",
29
+ value: "learningAndDevelopment",
30
+ id: "105",
31
+ },
32
+ ],
33
+ },
34
+ {
35
+ label: "People Experience",
36
+ value: "peopleExperience",
37
+ id: "106",
38
+ },
39
+ ],
40
+ },
41
+ {
42
+ label: "Contact Center",
43
+ value: "contactCenter",
44
+ id: "107",
45
+ children: [
46
+ {
47
+ label: "Appointment Management",
48
+ value: "appointmentManagement",
49
+ id: "108",
50
+ },
51
+ {
52
+ label: "Customer Service",
53
+ value: "customerService",
54
+ id: "109",
55
+ },
56
+ {
57
+ label: "Energy",
58
+ value: "energy",
59
+ id: "110",
60
+ },
61
+ ],
62
+ },
63
+ ],
64
+ }] %>
65
+
66
+ <% # Pre-selected node IDs to demonstrate the functionality %>
67
+ <% preSelectedIds = ["102", "104", "109"] %>
68
+
69
+ <%= pb_rails("multi_level_select", props: {
70
+ id: "multi-level-select-show-checked-children-rails",
71
+ name: "my_array",
72
+ tree_data: treeData,
73
+ selected_ids: preSelectedIds,
74
+ show_checked_children: false
75
+ }) %>
@@ -0,0 +1,94 @@
1
+ import React from "react";
2
+ import MultiLevelSelect from "../_multi_level_select";
3
+
4
+ const treeData = [
5
+ {
6
+ label: "Power Home Remodeling",
7
+ value: "powerHomeRemodeling",
8
+ id: "powerhome1",
9
+ expanded: true,
10
+ children: [
11
+ {
12
+ label: "People",
13
+ value: "people",
14
+ id: "people1",
15
+ children: [
16
+ {
17
+ label: "Talent Acquisition",
18
+ value: "talentAcquisition",
19
+ id: "talent1",
20
+ },
21
+ {
22
+ label: "Business Affairs",
23
+ value: "businessAffairs",
24
+ id: "business1",
25
+ children: [
26
+ {
27
+ label: "Initiatives",
28
+ value: "initiatives",
29
+ id: "initiative1",
30
+ },
31
+ {
32
+ label: "Learning & Development",
33
+ value: "learningAndDevelopment",
34
+ id: "development1",
35
+ },
36
+ ],
37
+ },
38
+ {
39
+ label: "People Experience",
40
+ value: "peopleExperience",
41
+ id: "experience1",
42
+ },
43
+ ],
44
+ },
45
+ {
46
+ label: "Contact Center",
47
+ value: "contactCenter",
48
+ id: "contact1",
49
+ children: [
50
+ {
51
+ label: "Appointment Management",
52
+ value: "appointmentManagement",
53
+ id: "appointment1",
54
+ },
55
+ {
56
+ label: "Customer Service",
57
+ value: "customerService",
58
+ id: "customer1",
59
+ },
60
+ {
61
+ label: "Energy",
62
+ value: "energy",
63
+ id: "energy1",
64
+ },
65
+ ],
66
+ },
67
+ ],
68
+ },
69
+ ];
70
+
71
+ // Pre-selected node IDs to demonstrate the functionality
72
+ const preSelectedIds = ["talent1", "initiative1", "customer1"];
73
+
74
+ const MultiLevelSelectShowCheckedChildren = (props) => {
75
+ return (
76
+ <div>
77
+ <MultiLevelSelect
78
+ id='multiselect-checked-children'
79
+ onSelect={(selectedNodes) =>
80
+ console.log(
81
+ "Selected Items",
82
+ selectedNodes
83
+ )
84
+ }
85
+ selectedIds={preSelectedIds}
86
+ showCheckedChildren={false}
87
+ treeData={treeData}
88
+ {...props}
89
+ />
90
+ </div>
91
+ )
92
+ };
93
+
94
+ export default MultiLevelSelectShowCheckedChildren;
@@ -0,0 +1,3 @@
1
+ If you wish to control the auto-expansion of nodes with descendants in your multi-level select, you can utilize `showCheckedChildren/show_checked_children`. This prop (set to 'true' by default) controls whether items will be expanded when opening the select, regardless of if there are any items currently selected.
2
+
3
+ The prop will still honor any `expanded` attribute set up within your tree data.
@@ -15,6 +15,7 @@ examples:
15
15
  - multi_level_select_disabled_options: Disabled Options (Return All Selected)
16
16
  - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
17
17
  - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
18
+ - multi_level_select_show_checked_children: Show Expanded Items
18
19
 
19
20
  react:
20
21
  - multi_level_select_default: Default
@@ -33,3 +34,4 @@ examples:
33
34
  - multi_level_select_disabled_options: Disabled Options (Return All Selected)
34
35
  - multi_level_select_disabled_options_parent_default: Disabled Parent Option (Default)
35
36
  - multi_level_select_disabled_options_parent: Disabled Parent Option (Return All Selected)
37
+ - multi_level_select_show_checked_children: Show Expanded Items
@@ -13,4 +13,5 @@ export { default as MultiLevelSelectDisabledOptions } from './_multi_level_selec
13
13
  export { default as MultiLevelSelectDisabledOptionsParent } from './_multi_level_select_disabled_options_parent.jsx'
14
14
  export { default as MultiLevelSelectDisabledOptionsParentDefault } from './_multi_level_select_disabled_options_parent_default.jsx'
15
15
  export { default as MultiLevelSelectDisabledOptionsDefault } from './_multi_level_select_disabled_options_default.jsx'
16
- export { default as MultiLevelSelectLabel } from './_multi_level_select_label.jsx'
16
+ export { default as MultiLevelSelectLabel } from './_multi_level_select_label.jsx'
17
+ export { default as MultiLevelSelectShowCheckedChildren } from './_multi_level_select_show_checked_children.jsx'