playbook_ui 13.10.0 → 13.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_button/docs/_button_circle_swift.md +28 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_default_swift.md +23 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_full_width_swift.md +9 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_icon_options_swift.md +18 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +11 -0
- data/app/pb_kits/playbook/pb_button/docs/_button_size_swift.md +20 -0
- data/app/pb_kits/playbook/pb_button/docs/example.yml +8 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_background_swift.md +29 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_border_none_swift.md +7 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_border_radius_swift.md +33 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_header_swift.md +33 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_highlight_swift.md +17 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_light_swift.md +7 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_padding_swift.md +33 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_props_swift.md +10 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_selected_swift.md +0 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_separator_swift.md +11 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_shadow_swift.md +21 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_styles_swift.md +17 -0
- data/app/pb_kits/playbook/pb_card/docs/_card_tag_swift.md +0 -0
- data/app/pb_kits/playbook/pb_card/docs/example.yml +12 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default_swift.md +10 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error_swift.md +12 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_swift.md +12 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_props_swift.md +7 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_dawg/docs/example.yml +9 -0
- data/app/pb_kits/playbook/pb_docs/kit_example.html.erb +3 -3
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_props.md +6 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_swift.md +16 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_defaul_swift.md +7 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_swift.md +11 -0
- data/app/pb_kits/playbook/pb_icon_circle/docs/example.yml +7 -0
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +27 -20
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +0 -1
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +104 -45
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +100 -43
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +138 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +150 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md +1 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_multi_level_select/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +10 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/_tiptap_styles.scss +8 -4
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx +33 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.md +3 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor_advanced.test.js +47 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_header.html.erb +47 -31
- data/app/pb_kits/playbook/pb_table/docs/_table_header.md +5 -0
- data/app/pb_kits/playbook/pb_table/table_header.html.erb +1 -1
- data/dist/menu.yml +284 -110
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/pb_doc_helper.rb +33 -3
- data/lib/playbook/version.rb +2 -2
- metadata +37 -2
@@ -1,68 +1,127 @@
|
|
1
|
-
<% treeData = [
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<% treeData = [
|
2
|
+
{
|
3
|
+
label: "HQ",
|
4
|
+
value: "HQ",
|
5
|
+
id: "hq",
|
6
|
+
},
|
7
|
+
{
|
8
|
+
label: "Philadelphia",
|
9
|
+
value: "Philadelphia",
|
10
|
+
id: "phl",
|
6
11
|
children: [
|
7
12
|
{
|
8
|
-
label: "
|
9
|
-
value: "
|
10
|
-
id: "
|
11
|
-
|
13
|
+
label: "Marketing & Sales PHL",
|
14
|
+
value: "Marketing & Sales PHL",
|
15
|
+
id: "marketingPHL",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
label: "Installation Office PHL",
|
19
|
+
value: "Installation Office PHL",
|
20
|
+
id: "installationPHL",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
label: "Warehouse PHL",
|
24
|
+
value: "Warehouse PHL",
|
25
|
+
id: "warehousePHL",
|
26
|
+
},
|
27
|
+
]
|
28
|
+
},
|
29
|
+
{
|
30
|
+
label: "New Jersey",
|
31
|
+
value: "New Jersey",
|
32
|
+
id: "nj",
|
33
|
+
children: [
|
34
|
+
{
|
35
|
+
label: "New Jersey",
|
36
|
+
value: "New Jersey",
|
37
|
+
id: "nj1",
|
12
38
|
children: [
|
13
39
|
{
|
14
|
-
label: "
|
15
|
-
value: "
|
16
|
-
id: "
|
40
|
+
label: "Marketing & Sales NJ",
|
41
|
+
value: "Marketing & Sales NJ",
|
42
|
+
id: "marketingNJ",
|
17
43
|
},
|
18
44
|
{
|
19
|
-
label: "
|
20
|
-
value: "
|
21
|
-
id: "
|
22
|
-
children: [
|
23
|
-
{
|
24
|
-
label: "Initiatives",
|
25
|
-
value: "Initiatives",
|
26
|
-
id: "204",
|
27
|
-
},
|
28
|
-
{
|
29
|
-
label: "Learning & Development",
|
30
|
-
value: "Learning & Development",
|
31
|
-
id: "205",
|
32
|
-
},
|
33
|
-
],
|
45
|
+
label: "Installation Office NJ",
|
46
|
+
value: "Installation Office NJ",
|
47
|
+
id: "installationNJ",
|
34
48
|
},
|
35
49
|
{
|
36
|
-
label: "
|
37
|
-
value: "
|
38
|
-
id: "
|
50
|
+
label: "Warehouse NJ",
|
51
|
+
value: "Warehouse NJ",
|
52
|
+
id: "warehouseNJ",
|
39
53
|
},
|
40
54
|
],
|
41
55
|
},
|
42
56
|
{
|
43
|
-
label: "
|
44
|
-
value: "
|
45
|
-
id: "
|
57
|
+
label: "Princeton",
|
58
|
+
value: "Princeton",
|
59
|
+
id: "princeton",
|
46
60
|
children: [
|
47
61
|
{
|
48
|
-
label: "
|
49
|
-
value: "
|
50
|
-
id: "
|
62
|
+
label: "Marketing & Sales Princeton",
|
63
|
+
value: "Marketing & Sales Princeton",
|
64
|
+
id: "marketingPR",
|
51
65
|
},
|
52
66
|
{
|
53
|
-
label: "
|
54
|
-
value: "
|
55
|
-
id: "
|
67
|
+
label: "Installation Office Princeton",
|
68
|
+
value: "Installation Office Princeton",
|
69
|
+
id: "installationPR",
|
56
70
|
},
|
57
71
|
{
|
58
|
-
label: "
|
59
|
-
value: "
|
60
|
-
id: "
|
72
|
+
label: "Warehouse Princeton",
|
73
|
+
value: "Warehouse Princeton",
|
74
|
+
id: "warehousePR",
|
61
75
|
},
|
62
|
-
]
|
76
|
+
]
|
77
|
+
},
|
78
|
+
]
|
79
|
+
},
|
80
|
+
{
|
81
|
+
label: "Maryland",
|
82
|
+
value: "Maryland",
|
83
|
+
id: "MD",
|
84
|
+
children: [
|
85
|
+
{
|
86
|
+
label: "Marketing & Sales MD",
|
87
|
+
value: "Marketing & Sales MD",
|
88
|
+
id: "marketingMD",
|
89
|
+
},
|
90
|
+
{
|
91
|
+
label: "Installation Office MD",
|
92
|
+
value: "Installation Office MD",
|
93
|
+
id: "installationMD",
|
94
|
+
},
|
95
|
+
{
|
96
|
+
label: "Warehouse MD",
|
97
|
+
value: "Warehouse MD",
|
98
|
+
id: "warehouseMD",
|
99
|
+
},
|
100
|
+
]
|
101
|
+
},
|
102
|
+
{
|
103
|
+
label: "Connecticut",
|
104
|
+
value: "Connecticut",
|
105
|
+
id: "CT",
|
106
|
+
children: [
|
107
|
+
{
|
108
|
+
label: "Marketing & Sales CT",
|
109
|
+
value: "Marketing & Sales CT",
|
110
|
+
id: "marketingCT",
|
111
|
+
},
|
112
|
+
{
|
113
|
+
label: "Installation Office CT",
|
114
|
+
value: "Installation Office CT",
|
115
|
+
id: "installationCT",
|
116
|
+
},
|
117
|
+
{
|
118
|
+
label: "Warehouse CT",
|
119
|
+
value: "Warehouse CT",
|
120
|
+
id: "warehouseCT",
|
63
121
|
},
|
64
|
-
]
|
65
|
-
}
|
122
|
+
]
|
123
|
+
},
|
124
|
+
]; %>
|
66
125
|
|
67
126
|
<%= pb_rails("multi_level_select", props: {
|
68
127
|
id: "multi-level-select-single-rails",
|
@@ -3,69 +3,126 @@ import MultiLevelSelect from "../_multi_level_select";
|
|
3
3
|
|
4
4
|
const treeData = [
|
5
5
|
{
|
6
|
-
label: "
|
7
|
-
value: "
|
8
|
-
id: "
|
9
|
-
|
6
|
+
label: "HQ",
|
7
|
+
value: "HQ",
|
8
|
+
id: "hq",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
label: "Philadelphia",
|
12
|
+
value: "Philadelphia",
|
13
|
+
id: "phl",
|
10
14
|
children: [
|
11
15
|
{
|
12
|
-
label: "
|
13
|
-
value: "
|
14
|
-
id: "
|
15
|
-
|
16
|
+
label: "Marketing & Sales PHL",
|
17
|
+
value: "Marketing & Sales PHL",
|
18
|
+
id: "marketingPHL",
|
19
|
+
},
|
20
|
+
{
|
21
|
+
label: "Installation Office PHL",
|
22
|
+
value: "Installation Office PHL",
|
23
|
+
id: "installationPHL",
|
24
|
+
},
|
25
|
+
{
|
26
|
+
label: "Warehouse PHL",
|
27
|
+
value: "Warehouse PHL",
|
28
|
+
id: "warehousePHL",
|
29
|
+
},
|
30
|
+
]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
label: "New Jersey",
|
34
|
+
value: "New Jersey",
|
35
|
+
id: "nj",
|
36
|
+
children: [
|
37
|
+
{
|
38
|
+
label: "New Jersey",
|
39
|
+
value: "New Jersey",
|
40
|
+
id: "nj1",
|
16
41
|
children: [
|
17
42
|
{
|
18
|
-
label: "
|
19
|
-
value: "
|
20
|
-
id: "
|
43
|
+
label: "Marketing & Sales NJ",
|
44
|
+
value: "Marketing & Sales NJ",
|
45
|
+
id: "marketingNJ",
|
21
46
|
},
|
22
47
|
{
|
23
|
-
label: "
|
24
|
-
value: "
|
25
|
-
id: "
|
26
|
-
children: [
|
27
|
-
{
|
28
|
-
label: "Initiatives",
|
29
|
-
value: "Initiatives",
|
30
|
-
id: "initiative2",
|
31
|
-
},
|
32
|
-
{
|
33
|
-
label: "Learning & Development",
|
34
|
-
value: "Learning & Development",
|
35
|
-
id: "development2",
|
36
|
-
},
|
37
|
-
],
|
48
|
+
label: "Installation Office NJ",
|
49
|
+
value: "Installation Office NJ",
|
50
|
+
id: "installationNJ",
|
38
51
|
},
|
39
52
|
{
|
40
|
-
label: "
|
41
|
-
value: "
|
42
|
-
id: "
|
53
|
+
label: "Warehouse NJ",
|
54
|
+
value: "Warehouse NJ",
|
55
|
+
id: "warehouseNJ",
|
43
56
|
},
|
44
57
|
],
|
45
58
|
},
|
46
59
|
{
|
47
|
-
label: "
|
48
|
-
value: "
|
49
|
-
id: "
|
60
|
+
label: "Princeton",
|
61
|
+
value: "Princeton",
|
62
|
+
id: "princeton",
|
50
63
|
children: [
|
51
64
|
{
|
52
|
-
label: "
|
53
|
-
value: "
|
54
|
-
id: "
|
65
|
+
label: "Marketing & Sales Princeton",
|
66
|
+
value: "Marketing & Sales Princeton",
|
67
|
+
id: "marketingPR",
|
55
68
|
},
|
56
69
|
{
|
57
|
-
label: "
|
58
|
-
value: "
|
59
|
-
id: "
|
70
|
+
label: "Installation Office Princeton",
|
71
|
+
value: "Installation Office Princeton",
|
72
|
+
id: "installationPR",
|
60
73
|
},
|
61
74
|
{
|
62
|
-
label: "
|
63
|
-
value: "
|
64
|
-
id: "
|
75
|
+
label: "Warehouse Princeton",
|
76
|
+
value: "Warehouse Princeton",
|
77
|
+
id: "warehousePR",
|
65
78
|
},
|
66
|
-
]
|
79
|
+
]
|
80
|
+
},
|
81
|
+
]
|
82
|
+
},
|
83
|
+
{
|
84
|
+
label: "Maryland",
|
85
|
+
value: "Maryland",
|
86
|
+
id: "MD",
|
87
|
+
children: [
|
88
|
+
{
|
89
|
+
label: "Marketing & Sales MD",
|
90
|
+
value: "Marketing & Sales MD",
|
91
|
+
id: "marketingMD",
|
92
|
+
},
|
93
|
+
{
|
94
|
+
label: "Installation Office MD",
|
95
|
+
value: "Installation Office MD",
|
96
|
+
id: "installationMD",
|
97
|
+
},
|
98
|
+
{
|
99
|
+
label: "Warehouse MD",
|
100
|
+
value: "Warehouse MD",
|
101
|
+
id: "warehouseMD",
|
102
|
+
},
|
103
|
+
]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
label: "Connecticut",
|
107
|
+
value: "Connecticut",
|
108
|
+
id: "CT",
|
109
|
+
children: [
|
110
|
+
{
|
111
|
+
label: "Marketing & Sales CT",
|
112
|
+
value: "Marketing & Sales CT",
|
113
|
+
id: "marketingCT",
|
114
|
+
},
|
115
|
+
{
|
116
|
+
label: "Installation Office CT",
|
117
|
+
value: "Installation Office CT",
|
118
|
+
id: "installationCT",
|
119
|
+
},
|
120
|
+
{
|
121
|
+
label: "Warehouse CT",
|
122
|
+
value: "Warehouse CT",
|
123
|
+
id: "warehouseCT",
|
67
124
|
},
|
68
|
-
]
|
125
|
+
]
|
69
126
|
},
|
70
127
|
];
|
71
128
|
|
@@ -0,0 +1 @@
|
|
1
|
+
Optionally enable the `single` variant to replace checkboxes with radios so the input accepts and returns only a single selection.
|
@@ -0,0 +1,138 @@
|
|
1
|
+
<% treeData = [
|
2
|
+
{
|
3
|
+
label: "HQ",
|
4
|
+
value: "HQ",
|
5
|
+
id: "hq1",
|
6
|
+
},
|
7
|
+
{
|
8
|
+
label: "Philadelphia",
|
9
|
+
value: "Philadelphia",
|
10
|
+
id: "phl1",
|
11
|
+
hideRadio: true,
|
12
|
+
children: [
|
13
|
+
{
|
14
|
+
label: "Marketing & Sales PHL",
|
15
|
+
value: "Marketing & Sales PHL",
|
16
|
+
id: "marketingPHL1",
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Installation Office PHL",
|
20
|
+
value: "Installation Office PHL",
|
21
|
+
id: "installationPHL1",
|
22
|
+
},
|
23
|
+
{
|
24
|
+
label: "Warehouse PHL",
|
25
|
+
value: "Warehouse PHL",
|
26
|
+
id: "warehousePHL1",
|
27
|
+
},
|
28
|
+
]
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: "New Jersey",
|
32
|
+
value: "New Jersey",
|
33
|
+
id: "nj2",
|
34
|
+
hideRadio: true,
|
35
|
+
children: [
|
36
|
+
{
|
37
|
+
label: "New Jersey",
|
38
|
+
value: "New Jersey",
|
39
|
+
id: "nj3",
|
40
|
+
hideRadio: true,
|
41
|
+
children: [
|
42
|
+
{
|
43
|
+
label: "Marketing & Sales NJ",
|
44
|
+
value: "Marketing & Sales NJ",
|
45
|
+
id: "marketingNJ1",
|
46
|
+
},
|
47
|
+
{
|
48
|
+
label: "Installation Office NJ",
|
49
|
+
value: "Installation Office NJ",
|
50
|
+
id: "installationNJ1",
|
51
|
+
},
|
52
|
+
{
|
53
|
+
label: "Warehouse NJ",
|
54
|
+
value: "Warehouse NJ",
|
55
|
+
id: "warehouseNJ1",
|
56
|
+
},
|
57
|
+
],
|
58
|
+
},
|
59
|
+
{
|
60
|
+
label: "Princeton",
|
61
|
+
value: "Princeton",
|
62
|
+
id: "princeton1",
|
63
|
+
hideRadio: true,
|
64
|
+
children: [
|
65
|
+
{
|
66
|
+
label: "Marketing & Sales Princeton",
|
67
|
+
value: "Marketing & Sales Princeton",
|
68
|
+
id: "marketingPR1",
|
69
|
+
},
|
70
|
+
{
|
71
|
+
label: "Installation Office Princeton",
|
72
|
+
value: "Installation Office Princeton",
|
73
|
+
id: "installationPR1",
|
74
|
+
},
|
75
|
+
{
|
76
|
+
label: "Warehouse Princeton",
|
77
|
+
value: "Warehouse Princeton",
|
78
|
+
id: "warehousePR1",
|
79
|
+
},
|
80
|
+
]
|
81
|
+
},
|
82
|
+
]
|
83
|
+
},
|
84
|
+
{
|
85
|
+
label: "Maryland",
|
86
|
+
value: "Maryland",
|
87
|
+
id: "MD1",
|
88
|
+
hideRadio: true,
|
89
|
+
children: [
|
90
|
+
{
|
91
|
+
label: "Marketing & Sales MD",
|
92
|
+
value: "Marketing & Sales MD",
|
93
|
+
id: "marketingMD1",
|
94
|
+
},
|
95
|
+
{
|
96
|
+
label: "Installation Office MD",
|
97
|
+
value: "Installation Office MD",
|
98
|
+
id: "installationMD1",
|
99
|
+
},
|
100
|
+
{
|
101
|
+
label: "Warehouse MD",
|
102
|
+
value: "Warehouse MD",
|
103
|
+
id: "warehouseMD1",
|
104
|
+
},
|
105
|
+
]
|
106
|
+
},
|
107
|
+
{
|
108
|
+
label: "Connecticut",
|
109
|
+
value: "Connecticut",
|
110
|
+
id: "CT1",
|
111
|
+
hideRadio: true,
|
112
|
+
children: [
|
113
|
+
{
|
114
|
+
label: "Marketing & Sales CT",
|
115
|
+
value: "Marketing & Sales CT",
|
116
|
+
id: "marketingCT1",
|
117
|
+
},
|
118
|
+
{
|
119
|
+
label: "Installation Office CT",
|
120
|
+
value: "Installation Office CT",
|
121
|
+
id: "installationCT1",
|
122
|
+
},
|
123
|
+
{
|
124
|
+
label: "Warehouse CT",
|
125
|
+
value: "Warehouse CT",
|
126
|
+
id: "warehouseCT1",
|
127
|
+
},
|
128
|
+
]
|
129
|
+
},
|
130
|
+
]; %>
|
131
|
+
|
132
|
+
<%= pb_rails("multi_level_select", props: {
|
133
|
+
id: "multi-level-select-single-children-only-rails",
|
134
|
+
name: "my_single_children_only_select_array",
|
135
|
+
tree_data: treeData,
|
136
|
+
input_name: "PowerChildren",
|
137
|
+
variant: "single"
|
138
|
+
}) %>
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx
ADDED
@@ -0,0 +1,150 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import MultiLevelSelect from "../_multi_level_select";
|
3
|
+
|
4
|
+
const treeData = [
|
5
|
+
{
|
6
|
+
label: "HQ",
|
7
|
+
value: "HQ",
|
8
|
+
id: "hq1",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
label: "Philadelphia",
|
12
|
+
value: "Philadelphia",
|
13
|
+
id: "phl1",
|
14
|
+
hideRadio: true,
|
15
|
+
children: [
|
16
|
+
{
|
17
|
+
label: "Marketing & Sales PHL",
|
18
|
+
value: "Marketing & Sales PHL",
|
19
|
+
id: "marketingPHL1",
|
20
|
+
},
|
21
|
+
{
|
22
|
+
label: "Installation Office PHL",
|
23
|
+
value: "Installation Office PHL",
|
24
|
+
id: "installationPHL1",
|
25
|
+
},
|
26
|
+
{
|
27
|
+
label: "Warehouse PHL",
|
28
|
+
value: "Warehouse PHL",
|
29
|
+
id: "warehousePHL1",
|
30
|
+
},
|
31
|
+
]
|
32
|
+
},
|
33
|
+
{
|
34
|
+
label: "New Jersey",
|
35
|
+
value: "New Jersey",
|
36
|
+
id: "nj2",
|
37
|
+
hideRadio: true,
|
38
|
+
children: [
|
39
|
+
{
|
40
|
+
label: "New Jersey",
|
41
|
+
value: "New Jersey",
|
42
|
+
id: "nj3",
|
43
|
+
hideRadio: true,
|
44
|
+
children: [
|
45
|
+
{
|
46
|
+
label: "Marketing & Sales NJ",
|
47
|
+
value: "Marketing & Sales NJ",
|
48
|
+
id: "marketingNJ1",
|
49
|
+
},
|
50
|
+
{
|
51
|
+
label: "Installation Office NJ",
|
52
|
+
value: "Installation Office NJ",
|
53
|
+
id: "installationNJ1",
|
54
|
+
},
|
55
|
+
{
|
56
|
+
label: "Warehouse NJ",
|
57
|
+
value: "Warehouse NJ",
|
58
|
+
id: "warehouseNJ1",
|
59
|
+
},
|
60
|
+
],
|
61
|
+
},
|
62
|
+
{
|
63
|
+
label: "Princeton",
|
64
|
+
value: "Princeton",
|
65
|
+
id: "princeton1",
|
66
|
+
hideRadio: true,
|
67
|
+
children: [
|
68
|
+
{
|
69
|
+
label: "Marketing & Sales Princeton",
|
70
|
+
value: "Marketing & Sales Princeton",
|
71
|
+
id: "marketingPR1",
|
72
|
+
},
|
73
|
+
{
|
74
|
+
label: "Installation Office Princeton",
|
75
|
+
value: "Installation Office Princeton",
|
76
|
+
id: "installationPR1",
|
77
|
+
},
|
78
|
+
{
|
79
|
+
label: "Warehouse Princeton",
|
80
|
+
value: "Warehouse Princeton",
|
81
|
+
id: "warehousePR1",
|
82
|
+
},
|
83
|
+
]
|
84
|
+
},
|
85
|
+
]
|
86
|
+
},
|
87
|
+
{
|
88
|
+
label: "Maryland",
|
89
|
+
value: "Maryland",
|
90
|
+
id: "MD1",
|
91
|
+
hideRadio: true,
|
92
|
+
children: [
|
93
|
+
{
|
94
|
+
label: "Marketing & Sales MD",
|
95
|
+
value: "Marketing & Sales MD",
|
96
|
+
id: "marketingMD1",
|
97
|
+
},
|
98
|
+
{
|
99
|
+
label: "Installation Office MD",
|
100
|
+
value: "Installation Office MD",
|
101
|
+
id: "installationMD1",
|
102
|
+
},
|
103
|
+
{
|
104
|
+
label: "Warehouse MD",
|
105
|
+
value: "Warehouse MD",
|
106
|
+
id: "warehouseMD1",
|
107
|
+
},
|
108
|
+
]
|
109
|
+
},
|
110
|
+
{
|
111
|
+
label: "Connecticut",
|
112
|
+
value: "Connecticut",
|
113
|
+
id: "CT1",
|
114
|
+
hideRadio: true,
|
115
|
+
children: [
|
116
|
+
{
|
117
|
+
label: "Marketing & Sales CT",
|
118
|
+
value: "Marketing & Sales CT",
|
119
|
+
id: "marketingCT1",
|
120
|
+
},
|
121
|
+
{
|
122
|
+
label: "Installation Office CT",
|
123
|
+
value: "Installation Office CT",
|
124
|
+
id: "installationCT1",
|
125
|
+
},
|
126
|
+
{
|
127
|
+
label: "Warehouse CT",
|
128
|
+
value: "Warehouse CT",
|
129
|
+
id: "warehouseCT1",
|
130
|
+
},
|
131
|
+
]
|
132
|
+
},
|
133
|
+
];
|
134
|
+
|
135
|
+
const MultiLevelSelectSingleChildrenOnly = (props) => {
|
136
|
+
return (
|
137
|
+
<div>
|
138
|
+
<MultiLevelSelect
|
139
|
+
id="multiselect-single-children-only"
|
140
|
+
inputName="PowerChildren"
|
141
|
+
onSelect={(selectedNode) => console.log("Selected Node", selectedNode)}
|
142
|
+
treeData={treeData}
|
143
|
+
variant="single"
|
144
|
+
{...props}
|
145
|
+
/>
|
146
|
+
</div>
|
147
|
+
)
|
148
|
+
};
|
149
|
+
|
150
|
+
export default MultiLevelSelectSingleChildrenOnly;
|
data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Dynamically control your selectable options by passing `hideRadio: true` to any node within your tree data to omit that node's radio selector. In this example we've hidden all radios except ultimate children (nodes without descendants).
|
@@ -2,6 +2,7 @@ examples:
|
|
2
2
|
rails:
|
3
3
|
- multi_level_select_default: Default
|
4
4
|
- multi_level_select_single: Single Select
|
5
|
+
- multi_level_select_single_children_only: Single Select w/ Hidden Radios
|
5
6
|
- multi_level_select_return_all_selected: Return All Selected
|
6
7
|
- multi_level_select_selected_ids: Selected Ids
|
7
8
|
- multi_level_select_with_form: With Form
|
@@ -9,5 +10,6 @@ examples:
|
|
9
10
|
react:
|
10
11
|
- multi_level_select_default: Default
|
11
12
|
- multi_level_select_single: Single Select
|
13
|
+
- multi_level_select_single_children_only: Single Select w/ Hidden Radios
|
12
14
|
- multi_level_select_return_all_selected: Return All Selected
|
13
15
|
- multi_level_select_selected_ids: Selected Ids
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { default as MultiLevelSelectDefault } from './_multi_level_select_default.jsx'
|
2
2
|
export { default as MultiLevelSelectSingle } from './_multi_level_select_single.jsx'
|
3
|
+
export { default as MultiLevelSelectSingleChildrenOnly } from './_multi_level_select_single_children_only.jsx'
|
3
4
|
export { default as MultiLevelSelectReturnAllSelected } from './_multi_level_select_return_all_selected.jsx'
|
4
5
|
export { default as MultiLevelSelectSelectedIds } from "./_multi_level_select_selected_ids.jsx"
|
@@ -29,6 +29,7 @@ type Editor = {
|
|
29
29
|
type RichTextEditorProps = {
|
30
30
|
aria?: { [key: string]: string },
|
31
31
|
advancedEditor?: any,
|
32
|
+
advancedEditorToolbar?: boolean,
|
32
33
|
toolbarBottom?: Boolean,
|
33
34
|
children?: React.ReactNode | React.ReactNode[]
|
34
35
|
className?: string,
|
@@ -51,6 +52,7 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
51
52
|
const {
|
52
53
|
aria = {},
|
53
54
|
advancedEditor,
|
55
|
+
advancedEditorToolbar = true,
|
54
56
|
toolbarBottom = false,
|
55
57
|
children,
|
56
58
|
className,
|
@@ -163,8 +165,14 @@ const RichTextEditor = (props: RichTextEditorProps) => {
|
|
163
165
|
>
|
164
166
|
{
|
165
167
|
advancedEditor ? (
|
166
|
-
<div
|
167
|
-
|
168
|
+
<div
|
169
|
+
className={classnames("pb_rich_text_editor_advanced_container", {
|
170
|
+
["toolbar-active"]: advancedEditorToolbar,
|
171
|
+
})}
|
172
|
+
>
|
173
|
+
{advancedEditorToolbar && (
|
174
|
+
<EditorToolbar extensions={extensions} editor={advancedEditor}/>
|
175
|
+
)}
|
168
176
|
{ children }
|
169
177
|
</div>
|
170
178
|
) : (
|