playbook_ui 14.19.0.pre.alpha.PLAY2171advancedtable7832 → 14.19.0.pre.alpha.PLAY2172homeaddressstreetundefinedstatebug7716
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_advanced_table/Components/TableActionBar.tsx +35 -61
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +22 -36
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +19 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +1 -3
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +19 -77
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +0 -11
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +2 -33
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +1 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +1 -11
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +0 -5
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +3 -3
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +2 -16
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +13 -34
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb +1 -3
- data/app/pb_kits/playbook/pb_dropdown/hooks/useHandleOnKeydown.tsx +6 -0
- data/app/pb_kits/playbook/pb_dropdown/index.js +30 -336
- data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +12 -39
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx +12 -16
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +13 -79
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -1
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with_validate.html.erb +0 -1
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +12 -19
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +3 -7
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +2 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_color.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_default.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_default.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_disabled_options_parent_default.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_error.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_label.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_react_hook.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_reset.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_return_all_selected.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.html.erb +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids.md +0 -2
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_selected_ids_react.md +1 -3
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.html.erb +22 -22
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single.jsx +22 -22
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.html.erb +22 -22
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_single_children_only.jsx +22 -22
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_children_with_radios.jsx +11 -11
- data/app/pb_kits/playbook/pb_multi_level_select/docs/_multi_level_select_with_form.html.erb +11 -11
- data/app/pb_kits/playbook/pb_person/_person.tsx +2 -12
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +3 -73
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/dist/chunks/_typeahead-BPSIWtFT.js +22 -0
- data/dist/chunks/_weekday_stacked-rph2mGIB.js +45 -0
- data/dist/chunks/lib-B20MXZcW.js +29 -0
- data/dist/chunks/{pb_form_validation-BZ2AVAi_.js → pb_form_validation-WWvUXPKD.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-doc.js +2 -2
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/version.rb +1 -1
- metadata +7 -26
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +0 -31
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.md +0 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx +0 -56
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.md +0 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx +0 -58
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.md +0 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb +0 -20
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb +0 -19
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.md +0 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb +0 -20
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx +0 -57
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb +0 -50
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx +0 -105
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb +0 -22
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx +0 -67
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/MultiSelectTriggerDisplay.tsx +0 -58
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.jsx +0 -23
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.md +0 -1
- data/dist/chunks/_typeahead-BmOWdDtp.js +0 -22
- data/dist/chunks/_weekday_stacked-CvcuQyr9.js +0 -45
- data/dist/chunks/lib-D5R1BjUn.js +0 -29
data/lib/playbook/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playbook_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.19.0.pre.alpha.
|
4
|
+
version: 14.19.0.pre.alpha.PLAY2172homeaddressstreetundefinedstatebug7716
|
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: 2025-05-
|
12
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -1318,29 +1318,13 @@ files:
|
|
1318
1318
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx
|
1319
1319
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx
|
1320
1320
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.md
|
1321
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.html.erb
|
1321
1322
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx
|
1322
1323
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.md
|
1323
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb
|
1324
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.md
|
1325
1324
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb
|
1326
1325
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx
|
1327
1326
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb
|
1328
1327
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx
|
1329
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx
|
1330
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.md
|
1331
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx
|
1332
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.md
|
1333
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb
|
1334
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.md
|
1335
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb
|
1336
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.md
|
1337
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb
|
1338
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx
|
1339
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.md
|
1340
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb
|
1341
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx
|
1342
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb
|
1343
|
-
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
|
1344
1328
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
|
1345
1329
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
|
1346
1330
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
|
@@ -1399,7 +1383,6 @@ files:
|
|
1399
1383
|
- app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx
|
1400
1384
|
- app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownOption.tsx
|
1401
1385
|
- app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx
|
1402
|
-
- app/pb_kits/playbook/pb_dropdown/subcomponents/MultiSelectTriggerDisplay.tsx
|
1403
1386
|
- app/pb_kits/playbook/pb_dropdown/utilities/clickOutsideHelper.tsx
|
1404
1387
|
- app/pb_kits/playbook/pb_dropdown/utilities/index.ts
|
1405
1388
|
- app/pb_kits/playbook/pb_dropdown/utilities/subComponentHelper.tsx
|
@@ -3378,8 +3361,6 @@ files:
|
|
3378
3361
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_margin_bottom.jsx
|
3379
3362
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.html.erb
|
3380
3363
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx
|
3381
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.jsx
|
3382
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.md
|
3383
3364
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx
|
3384
3365
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.md
|
3385
3366
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_truncated_text.html.erb
|
@@ -3586,11 +3567,11 @@ files:
|
|
3586
3567
|
- app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
|
3587
3568
|
- app/pb_kits/playbook/utilities/text.ts
|
3588
3569
|
- app/pb_kits/playbook/utilities/validEmojiChecker.ts
|
3589
|
-
- dist/chunks/_typeahead-
|
3590
|
-
- dist/chunks/_weekday_stacked-
|
3570
|
+
- dist/chunks/_typeahead-BPSIWtFT.js
|
3571
|
+
- dist/chunks/_weekday_stacked-rph2mGIB.js
|
3591
3572
|
- dist/chunks/lazysizes-B7xYodB-.js
|
3592
|
-
- dist/chunks/lib-
|
3593
|
-
- dist/chunks/pb_form_validation-
|
3573
|
+
- dist/chunks/lib-B20MXZcW.js
|
3574
|
+
- dist/chunks/pb_form_validation-WWvUXPKD.js
|
3594
3575
|
- dist/chunks/vendor.js
|
3595
3576
|
- dist/menu.yml
|
3596
3577
|
- dist/playbook-doc.js
|
@@ -1,31 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
-
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
-
]
|
7
|
-
|
8
|
-
%>
|
9
|
-
|
10
|
-
<%
|
11
|
-
options2 = [
|
12
|
-
{ label: 'India', value: 'India', id: 'in' },
|
13
|
-
{ label: 'Mexico', value: 'Mexico', id: 'mx' },
|
14
|
-
{ label: 'Brazil', value: 'Brazil', id: 'br' },
|
15
|
-
{ label: 'Argentina', value: 'Argentina', id: 'ar' },
|
16
|
-
{ label: 'Colombia', value: 'Colombia', id: 'co' },
|
17
|
-
{ label: 'Chile', value: 'Chile', id: 'cl' },
|
18
|
-
{ label: 'Peru', value: 'Peru', id: 'pe' },
|
19
|
-
]
|
20
|
-
|
21
|
-
%>
|
22
|
-
|
23
|
-
<%= pb_rails("dropdown", props: {options: options}) %>
|
24
|
-
|
25
|
-
<script>
|
26
|
-
document.addEventListener("pb:dropdown:selected", (e) => {
|
27
|
-
const option = e.detail;
|
28
|
-
const dropdown = e.target;
|
29
|
-
console.log("Selected option:", option);
|
30
|
-
})
|
31
|
-
</script>
|
@@ -1,5 +0,0 @@
|
|
1
|
-
This kit's `options` prop requires an array of objects, each of which will be used as the selectable options within the dropdown. Each option object can support any number of key-value pairs, but each MUST contain `label`, `value` and `id`.
|
2
|
-
|
3
|
-
The kit also comes with a custom event called "pb:dropdown:selected" which updates dynamically with the selection as it changes. See code snippet to see this in action.
|
4
|
-
|
5
|
-
In addition, a data attribute called `data-option-selected` with the selection is also rendered on the parent dropdown div.
|
@@ -1,56 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
3
|
-
|
4
|
-
const DropdownMultiSelect = (props) => {
|
5
|
-
|
6
|
-
const options = [
|
7
|
-
{
|
8
|
-
label: "United States",
|
9
|
-
value: "United States",
|
10
|
-
},
|
11
|
-
{
|
12
|
-
label: "United Kingdom",
|
13
|
-
value: "United Kingdom",
|
14
|
-
},
|
15
|
-
{
|
16
|
-
label: "Canada",
|
17
|
-
value: "Canada",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
label: "Pakistan",
|
21
|
-
value: "Pakistan",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
label: "India",
|
25
|
-
value: "India",
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: "Australia",
|
29
|
-
value: "Australia",
|
30
|
-
},
|
31
|
-
{
|
32
|
-
label: "New Zealand",
|
33
|
-
value: "New Zealand",
|
34
|
-
},
|
35
|
-
{
|
36
|
-
label: "Italy",
|
37
|
-
value: "Italy",
|
38
|
-
},
|
39
|
-
{
|
40
|
-
label: "Spain",
|
41
|
-
value: "Spain",
|
42
|
-
}
|
43
|
-
];
|
44
|
-
|
45
|
-
return (
|
46
|
-
<div>
|
47
|
-
<Dropdown
|
48
|
-
multiSelect
|
49
|
-
options={options}
|
50
|
-
{...props}
|
51
|
-
/>
|
52
|
-
</div>
|
53
|
-
)
|
54
|
-
}
|
55
|
-
|
56
|
-
export default DropdownMultiSelect
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
3
|
-
|
4
|
-
const DropdownMultiSelectDisplay = (props) => {
|
5
|
-
|
6
|
-
const options = [
|
7
|
-
{
|
8
|
-
label: "United States",
|
9
|
-
value: "United States",
|
10
|
-
},
|
11
|
-
{
|
12
|
-
label: "United Kingdom",
|
13
|
-
value: "United Kingdom",
|
14
|
-
},
|
15
|
-
{
|
16
|
-
label: "Canada",
|
17
|
-
value: "Canada",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
label: "Pakistan",
|
21
|
-
value: "Pakistan",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
label: "India",
|
25
|
-
value: "India",
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: "Australia",
|
29
|
-
value: "Australia",
|
30
|
-
},
|
31
|
-
{
|
32
|
-
label: "New Zealand",
|
33
|
-
value: "New Zealand",
|
34
|
-
},
|
35
|
-
{
|
36
|
-
label: "Italy",
|
37
|
-
value: "Italy",
|
38
|
-
},
|
39
|
-
{
|
40
|
-
label: "Spain",
|
41
|
-
value: "Spain",
|
42
|
-
}
|
43
|
-
];
|
44
|
-
|
45
|
-
|
46
|
-
return (
|
47
|
-
<div>
|
48
|
-
<Dropdown
|
49
|
-
formPillProps={{size:"small", color:"neutral"}}
|
50
|
-
multiSelect
|
51
|
-
options={options}
|
52
|
-
{...props}
|
53
|
-
/>
|
54
|
-
</div>
|
55
|
-
)
|
56
|
-
}
|
57
|
-
|
58
|
-
export default DropdownMultiSelectDisplay
|
@@ -1,3 +0,0 @@
|
|
1
|
-
By default, the `multiSelect` prop will render selected options as the default FormPill. `FormPillProps` however can be used to customize these Pills with any props that exist for the FormPill.
|
2
|
-
|
3
|
-
This prop must be an object that contains valid FormPill props. For a full list of FormPill props, see [here](https://playbook.powerapp.cloud/kits/form_pill/react).
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
-
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
-
{ label: 'India', value: 'India', id: 'in' },
|
7
|
-
{ label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
|
8
|
-
{ label: 'Australia', value: 'Australia', id: 'au' },
|
9
|
-
{ label: 'New Zealand', value: 'New Zealand', id: 'nz' },
|
10
|
-
{ label: 'Germany', value: 'Germany', id: 'de' },
|
11
|
-
{ label: 'France', value: 'France', id: 'fr' },
|
12
|
-
{ label: 'Italy', value: 'Italy', id: 'it' },
|
13
|
-
]
|
14
|
-
%>
|
15
|
-
|
16
|
-
<%= pb_rails("dropdown", props: {
|
17
|
-
options: options,
|
18
|
-
multi_select: true,
|
19
|
-
form_pill_props: { size:"small", color:"neutral" },
|
20
|
-
}) %>
|
@@ -1 +0,0 @@
|
|
1
|
-
By default, the `multi_select` prop will render selected options as the default form_pill. `form_pill_props` however can be used to customize these Pills with props that exist for the form_pill. Currently, only the '[color](https://playbook.powerapp.cloud/kits/form_pill/rails#form-pill-colors)' and '[size](https://playbook.powerapp.cloud/kits/form_pill/rails#form-pill-size)' props are supported as shown here.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
-
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
-
{ label: 'India', value: 'India', id: 'in' },
|
7
|
-
{ label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
|
8
|
-
{ label: 'Australia', value: 'Australia', id: 'au' },
|
9
|
-
{ label: 'New Zealand', value: 'New Zealand', id: 'nz' },
|
10
|
-
{ label: 'Germany', value: 'Germany', id: 'de' },
|
11
|
-
{ label: 'France', value: 'France', id: 'fr' },
|
12
|
-
{ label: 'Italy', value: 'Italy', id: 'it' },
|
13
|
-
]
|
14
|
-
%>
|
15
|
-
|
16
|
-
<%= pb_rails("dropdown", props: {
|
17
|
-
options: options,
|
18
|
-
multi_select: true,
|
19
|
-
}) %>
|
data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
-
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
-
{ label: 'India', value: 'India', id: 'in' },
|
7
|
-
{ label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
|
8
|
-
{ label: 'Australia', value: 'Australia', id: 'au' },
|
9
|
-
{ label: 'New Zealand', value: 'New Zealand', id: 'nz' },
|
10
|
-
{ label: 'Germany', value: 'Germany', id: 'de' },
|
11
|
-
{ label: 'France', value: 'France', id: 'fr' },
|
12
|
-
{ label: 'Italy', value: 'Italy', id: 'it' },
|
13
|
-
]
|
14
|
-
%>
|
15
|
-
|
16
|
-
<%= pb_rails("dropdown", props: {
|
17
|
-
autocomplete: true,
|
18
|
-
options: options,
|
19
|
-
multi_select: true,
|
20
|
-
}) %>
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
3
|
-
|
4
|
-
const DropdownMultiSelectWithAutocomplete = (props) => {
|
5
|
-
|
6
|
-
const options = [
|
7
|
-
{
|
8
|
-
label: "United States",
|
9
|
-
value: "United States",
|
10
|
-
},
|
11
|
-
{
|
12
|
-
label: "United Kingdom",
|
13
|
-
value: "United Kingdom",
|
14
|
-
},
|
15
|
-
{
|
16
|
-
label: "Canada",
|
17
|
-
value: "Canada",
|
18
|
-
},
|
19
|
-
{
|
20
|
-
label: "Pakistan",
|
21
|
-
value: "Pakistan",
|
22
|
-
},
|
23
|
-
{
|
24
|
-
label: "India",
|
25
|
-
value: "India",
|
26
|
-
},
|
27
|
-
{
|
28
|
-
label: "Australia",
|
29
|
-
value: "Australia",
|
30
|
-
},
|
31
|
-
{
|
32
|
-
label: "New Zealand",
|
33
|
-
value: "New Zealand",
|
34
|
-
},
|
35
|
-
{
|
36
|
-
label: "Italy",
|
37
|
-
value: "Italy",
|
38
|
-
},
|
39
|
-
{
|
40
|
-
label: "Spain",
|
41
|
-
value: "Spain",
|
42
|
-
}
|
43
|
-
];
|
44
|
-
|
45
|
-
return (
|
46
|
-
<div>
|
47
|
-
<Dropdown
|
48
|
-
autocomplete
|
49
|
-
multiSelect
|
50
|
-
options={options}
|
51
|
-
{...props}
|
52
|
-
/>
|
53
|
-
</div>
|
54
|
-
)
|
55
|
-
}
|
56
|
-
|
57
|
-
export default DropdownMultiSelectWithAutocomplete
|
@@ -1 +0,0 @@
|
|
1
|
-
`multiSelect` can also be used with the `autocomplete` functionality.
|
data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{
|
4
|
-
label: "United States",
|
5
|
-
value: "United States",
|
6
|
-
areaCode: "+1",
|
7
|
-
icon: "🇺🇸",
|
8
|
-
id: "us"
|
9
|
-
},
|
10
|
-
{
|
11
|
-
label: "Canada",
|
12
|
-
value: "Canada",
|
13
|
-
areaCode: "+1",
|
14
|
-
icon: "🇨🇦",
|
15
|
-
id: "ca"
|
16
|
-
},
|
17
|
-
{
|
18
|
-
label: "Pakistan",
|
19
|
-
value: "Pakistan",
|
20
|
-
areaCode: "+92",
|
21
|
-
icon: "🇵🇰",
|
22
|
-
id: "pk"
|
23
|
-
}
|
24
|
-
]
|
25
|
-
|
26
|
-
%>
|
27
|
-
|
28
|
-
<%= pb_rails("dropdown", props: { options: options, multi_select: true }) do %>
|
29
|
-
<%= pb_rails("dropdown/dropdown_trigger", props:{ multi_select: true }) %>
|
30
|
-
<%= pb_rails("dropdown/dropdown_container") do %>
|
31
|
-
<% options.each do |option| %>
|
32
|
-
<%= pb_rails("dropdown/dropdown_option", props: {option: option}) do %>
|
33
|
-
<%= pb_rails("flex", props: {
|
34
|
-
align: "center",
|
35
|
-
justify: "between",
|
36
|
-
}) do %>
|
37
|
-
<%= pb_rails("flex/flex_item") do %>
|
38
|
-
<%= pb_rails("flex") do %>
|
39
|
-
<%= pb_rails("icon", props: {icon: option[:icon]}) %>
|
40
|
-
<%= pb_rails("body", props: {text: option[:label], padding_left:"xs"}) %>
|
41
|
-
<% end %>
|
42
|
-
<% end %>
|
43
|
-
<%= pb_rails("flex/flex_item") do %>
|
44
|
-
<%= pb_rails("body", props: {color:"light", text: option[:areaCode]}) %>
|
45
|
-
<% end %>
|
46
|
-
<% end %>
|
47
|
-
<% end %>
|
48
|
-
<% end %>
|
49
|
-
<% end %>
|
50
|
-
<% end %>
|
@@ -1,105 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
import Dropdown from '../../pb_dropdown/_dropdown'
|
3
|
-
import Body from '../../pb_body/_body'
|
4
|
-
import Flex from '../../pb_flex/_flex'
|
5
|
-
import FlexItem from '../../pb_flex/_flex_item'
|
6
|
-
import Icon from '../../pb_icon/_icon'
|
7
|
-
|
8
|
-
const DropdownMultiSelectWithCustomOptions = (props) => {
|
9
|
-
|
10
|
-
const options = [
|
11
|
-
{
|
12
|
-
label: "United States",
|
13
|
-
value: "United States",
|
14
|
-
areaCode: "+1",
|
15
|
-
icon: "🇺🇸",
|
16
|
-
id: "United-states"
|
17
|
-
},
|
18
|
-
{
|
19
|
-
label: "Canada",
|
20
|
-
value: "Canada",
|
21
|
-
areaCode: "+1",
|
22
|
-
icon: "🇨🇦",
|
23
|
-
id: "canada"
|
24
|
-
},
|
25
|
-
{
|
26
|
-
label: "Pakistan",
|
27
|
-
value: "Pakistan",
|
28
|
-
areaCode: "+92",
|
29
|
-
icon: "🇵🇰",
|
30
|
-
id: "pakistan"
|
31
|
-
},
|
32
|
-
{
|
33
|
-
label: "India",
|
34
|
-
value: "India",
|
35
|
-
areaCode: "+91",
|
36
|
-
icon: "🇮🇳",
|
37
|
-
id: "india"
|
38
|
-
},
|
39
|
-
{
|
40
|
-
label: "Australia",
|
41
|
-
value: "Australia",
|
42
|
-
areaCode: "+61",
|
43
|
-
icon: "🇦🇺",
|
44
|
-
id: "australia"
|
45
|
-
},
|
46
|
-
{
|
47
|
-
label: "New Zealand",
|
48
|
-
value: "New Zealand",
|
49
|
-
areaCode: "+64",
|
50
|
-
icon: "🇳🇿",
|
51
|
-
id: "new-zealand"
|
52
|
-
},
|
53
|
-
{
|
54
|
-
label: "Italy",
|
55
|
-
value: "Italy",
|
56
|
-
areaCode: "+39",
|
57
|
-
icon: "🇮🇹",
|
58
|
-
id: "italy"
|
59
|
-
},
|
60
|
-
{
|
61
|
-
label: "Spain",
|
62
|
-
value: "Spain",
|
63
|
-
areaCode: "+34",
|
64
|
-
icon: "🇪🇸",
|
65
|
-
id: "spain"
|
66
|
-
}
|
67
|
-
];
|
68
|
-
|
69
|
-
return (
|
70
|
-
<div>
|
71
|
-
<Dropdown
|
72
|
-
multiSelect
|
73
|
-
options={options}
|
74
|
-
{...props}
|
75
|
-
>
|
76
|
-
{options.map((option) => (
|
77
|
-
<Dropdown.Option key={option.id}
|
78
|
-
option={option}
|
79
|
-
>
|
80
|
-
<Flex
|
81
|
-
align="center"
|
82
|
-
justify="between"
|
83
|
-
>
|
84
|
-
<FlexItem>
|
85
|
-
<Flex>
|
86
|
-
<Icon icon={option.icon}
|
87
|
-
paddingRight="xs"
|
88
|
-
/>
|
89
|
-
<Body text={option.label} />
|
90
|
-
</Flex>
|
91
|
-
</FlexItem>
|
92
|
-
<FlexItem>
|
93
|
-
<Body color="light"
|
94
|
-
text={option.areaCode}
|
95
|
-
/>
|
96
|
-
</FlexItem>
|
97
|
-
</Flex>
|
98
|
-
</Dropdown.Option>
|
99
|
-
))}
|
100
|
-
</Dropdown>
|
101
|
-
</div>
|
102
|
-
)
|
103
|
-
}
|
104
|
-
|
105
|
-
export default DropdownMultiSelectWithCustomOptions
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<%
|
2
|
-
options = [
|
3
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
-
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
-
{ label: 'India', value: 'India', id: 'in' },
|
7
|
-
{ label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
|
8
|
-
{ label: 'Australia', value: 'Australia', id: 'au' },
|
9
|
-
{ label: 'New Zealand', value: 'New Zealand', id: 'nz' },
|
10
|
-
{ label: 'Germany', value: 'Germany', id: 'de' },
|
11
|
-
{ label: 'France', value: 'France', id: 'fr' },
|
12
|
-
{ label: 'Italy', value: 'Italy', id: 'it' },
|
13
|
-
]
|
14
|
-
%>
|
15
|
-
|
16
|
-
<%
|
17
|
-
default_value = [
|
18
|
-
{ label: 'United States', value: 'United States', id: 'us' },
|
19
|
-
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
20
|
-
]
|
21
|
-
%>
|
22
|
-
<%= pb_rails("dropdown", props: {options: options, multi_select: true, default_value: default_value}) %>
|
@@ -1,67 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import Dropdown from "../../pb_dropdown/_dropdown";
|
3
|
-
|
4
|
-
const DropdownMultiSelectWithDefault = (props) => {
|
5
|
-
const options = [
|
6
|
-
{
|
7
|
-
label: "United States",
|
8
|
-
value: "United States",
|
9
|
-
},
|
10
|
-
{
|
11
|
-
label: "United Kingdom",
|
12
|
-
value: "United Kingdom",
|
13
|
-
},
|
14
|
-
{
|
15
|
-
label: "Canada",
|
16
|
-
value: "Canada",
|
17
|
-
},
|
18
|
-
{
|
19
|
-
label: "Pakistan",
|
20
|
-
value: "Pakistan",
|
21
|
-
},
|
22
|
-
{
|
23
|
-
label: "India",
|
24
|
-
value: "India",
|
25
|
-
},
|
26
|
-
{
|
27
|
-
label: "Australia",
|
28
|
-
value: "Australia",
|
29
|
-
},
|
30
|
-
{
|
31
|
-
label: "New Zealand",
|
32
|
-
value: "New Zealand",
|
33
|
-
},
|
34
|
-
{
|
35
|
-
label: "Italy",
|
36
|
-
value: "Italy",
|
37
|
-
},
|
38
|
-
{
|
39
|
-
label: "Spain",
|
40
|
-
value: "Spain",
|
41
|
-
},
|
42
|
-
];
|
43
|
-
|
44
|
-
const defaultSelectedOptions = [
|
45
|
-
{
|
46
|
-
label: "United States",
|
47
|
-
value: "United States",
|
48
|
-
},
|
49
|
-
{
|
50
|
-
label: "Italy",
|
51
|
-
value: "Italy",
|
52
|
-
},
|
53
|
-
];
|
54
|
-
|
55
|
-
return (
|
56
|
-
<div>
|
57
|
-
<Dropdown
|
58
|
-
defaultValue={defaultSelectedOptions}
|
59
|
-
multiSelect
|
60
|
-
options={options}
|
61
|
-
{...props}
|
62
|
-
/>
|
63
|
-
</div>
|
64
|
-
);
|
65
|
-
};
|
66
|
-
|
67
|
-
export default DropdownMultiSelectWithDefault;
|