playbook_ui 14.18.1.pre.rc.0 → 14.19.0.pre.alpha.PLAY1968typeaheadpreservesearchreact7796
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/_playbook.scss +0 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +11 -1
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableActionBar.tsx +148 -15
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +20 -3
- data/app/pb_kits/playbook/pb_advanced_table/Hooks/useTableState.ts +23 -13
- data/app/pb_kits/playbook/pb_advanced_table/Utilities/VisibilityTree.ts +47 -0
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +313 -21
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.tsx +12 -3
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.rb +6 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.md +0 -6
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx +62 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx +82 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx +65 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_no_subrows_rails.md +5 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.jsx → _advanced_table_selectable_rows_no_subrows_react.jsx} +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_selectable_rows_rails.md +3 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +10 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +7 -2
- data/app/pb_kits/playbook/pb_advanced_table/flat_advanced_table.js +106 -0
- data/app/pb_kits/playbook/pb_advanced_table/index.js +228 -11
- data/app/pb_kits/playbook/pb_advanced_table/scss_partials/advanced_table_sticky_mixin.scss +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/table_body.rb +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_header.rb +0 -3
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -2
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +4 -0
- data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +3 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.html.erb +3 -3
- data/app/pb_kits/playbook/pb_avatar/avatar.rb +2 -0
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +18 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_grayscale.html.erb +5 -0
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_grayscale.jsx +16 -0
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_avatar/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_card/card.rb +12 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +22 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line.html.erb +55 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_line_rails.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_rails.md +5 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners.jsx +59 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_event_listeners_react.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_container.rb +11 -1
- data/app/pb_kits/playbook/pb_draggable/draggable_item.rb +11 -1
- data/app/pb_kits/playbook/pb_draggable/index.js +4 -2
- data/app/pb_kits/playbook/pb_draggable/subcomponents/DraggableItem.tsx +33 -5
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +5 -0
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.tsx +5 -16
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +5 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +28 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +17 -64
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +58 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/{_dropdown_with_autocomplete_and_custom_display.jsx → _dropdown_with_autocomplete_with_subcomponents.jsx} +11 -25
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +11 -0
- 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 +33 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.md +3 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +61 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.md +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +52 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.md +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +7 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +4 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +45 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_container.rb +3 -0
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.html.erb +12 -2
- data/app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb +3 -1
- data/app/pb_kits/playbook/pb_dropdown/index.js +71 -1
- data/app/pb_kits/playbook/pb_dropdown/keyboard_accessibility.js +26 -0
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownContainer.tsx +3 -4
- data/app/pb_kits/playbook/pb_dropdown/subcomponents/DropdownTrigger.tsx +5 -5
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +8 -1
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_alignment.html.erb +27 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_default.html.erb +7 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_orientation.html.erb +12 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/_empty_state_size.html.erb +23 -0
- data/app/pb_kits/playbook/pb_empty_state/docs/example.yml +5 -1
- data/app/pb_kits/playbook/pb_empty_state/empty_state.html.erb +19 -0
- data/app/pb_kits/playbook/pb_empty_state/empty_state.rb +123 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +13 -0
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +11 -1
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.html.erb +1 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.jsx +41 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_file_upload/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -0
- data/app/pb_kits/playbook/pb_file_upload/file_upload.rb +7 -1
- data/app/pb_kits/playbook/pb_file_upload/fileupload.test.js +18 -0
- 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 +19 -12
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +13 -7
- data/app/pb_kits/playbook/pb_message/_message.tsx +3 -0
- data/app/pb_kits/playbook/pb_message/docs/_message_grayscale.html.erb +9 -0
- data/app/pb_kits/playbook/pb_message/docs/_message_grayscale.jsx +21 -0
- data/app/pb_kits/playbook/pb_message/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_message/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_message/message.html.erb +2 -1
- data/app/pb_kits/playbook/pb_message/message.rb +1 -0
- 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 +2 -0
- 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 +3 -1
- 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_overlay/_overlay.scss +2 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_vertical_dynamic_multi_directional.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx +5 -4
- data/app/pb_kits/playbook/pb_person/_person.tsx +12 -2
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +9 -9
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +2 -2
- data/app/pb_kits/playbook/pb_select/_select.scss +10 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_error.html.erb +1 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +7 -7
- data/app/pb_kits/playbook/pb_table/subcomponents/_table_row.tsx +5 -5
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +4 -2
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.html.erb +1 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +5 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +70 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.jsx +23 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_preserve_input.md +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/_user.tsx +3 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_grayscale.html.erb +6 -0
- data/app/pb_kits/playbook/pb_user/docs/_user_grayscale.jsx +16 -0
- data/app/pb_kits/playbook/pb_user/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_user/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_user/user.html.erb +2 -1
- data/app/pb_kits/playbook/pb_user/user.rb +1 -0
- data/dist/chunks/_typeahead-D8guY7O0.js +22 -0
- data/dist/chunks/_weekday_stacked-8LDnfK3v.js +45 -0
- data/dist/chunks/{lib-BmTAc7Nc.js → lib-B20MXZcW.js} +2 -2
- data/dist/chunks/{pb_form_validation-BWjy4bFn.js → pb_form_validation-WWvUXPKD.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +6 -14
- 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 +2 -2
- metadata +56 -21
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.md +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx +0 -79
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.scss +0 -3
- data/app/pb_kits/playbook/pb_gantt_chart/_gantt_chart.tsx +0 -72
- data/app/pb_kits/playbook/pb_gantt_chart/docs/_gantt_chart_default.jsx +0 -53
- data/app/pb_kits/playbook/pb_gantt_chart/docs/example.yml +0 -7
- data/app/pb_kits/playbook/pb_gantt_chart/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_gantt_chart/gantt_chart.test.jsx +0 -19
- data/dist/chunks/_typeahead-D8CsVBZO.js +0 -22
- data/dist/chunks/_weekday_stacked-CHQsoCdP.js +0 -45
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_react.md → _advanced_table_selectable_rows.md} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows_no_subrows.html.erb → _advanced_table_selectable_rows_no_subrows_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_advanced_table/docs/{_advanced_table_selectable_rows.html.erb → _advanced_table_selectable_rows_rails.html.erb} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_line.md → _draggable_drop_zones_line_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_event_listeners.md → _draggable_event_listeners_rails.md} +0 -0
@@ -5,25 +5,25 @@ import Badge from "../../pb_badge/_badge";
|
|
5
5
|
const treeData = [
|
6
6
|
{
|
7
7
|
label: "Power Home Remodeling",
|
8
|
-
value: "
|
8
|
+
value: "powerHomeRemodeling",
|
9
9
|
id: "powerhome1",
|
10
10
|
expanded: true,
|
11
11
|
children: [
|
12
12
|
{
|
13
13
|
label: "People",
|
14
|
-
value: "
|
14
|
+
value: "people",
|
15
15
|
id: "people1",
|
16
16
|
expanded: true,
|
17
17
|
status: "active",
|
18
18
|
children: [
|
19
19
|
{
|
20
20
|
label: "Talent Acquisition",
|
21
|
-
value: "
|
21
|
+
value: "talentAcquisition",
|
22
22
|
id: "talent1",
|
23
23
|
},
|
24
24
|
{
|
25
25
|
label: "Business Affairs",
|
26
|
-
value: "
|
26
|
+
value: "businessAffairs",
|
27
27
|
id: "business1",
|
28
28
|
status: "active",
|
29
29
|
variant: "primary",
|
@@ -31,12 +31,12 @@ const treeData = [
|
|
31
31
|
children: [
|
32
32
|
{
|
33
33
|
label: "Initiatives",
|
34
|
-
value: "
|
34
|
+
value: "initiatives",
|
35
35
|
id: "initiative1",
|
36
36
|
},
|
37
37
|
{
|
38
38
|
label: "Learning & Development",
|
39
|
-
value: "
|
39
|
+
value: "learningAndDevelopment",
|
40
40
|
id: "development1",
|
41
41
|
status: "Inactive",
|
42
42
|
},
|
@@ -44,31 +44,31 @@ const treeData = [
|
|
44
44
|
},
|
45
45
|
{
|
46
46
|
label: "People Experience",
|
47
|
-
value: "
|
47
|
+
value: "peopleExperience",
|
48
48
|
id: "experience1",
|
49
49
|
},
|
50
50
|
],
|
51
51
|
},
|
52
52
|
{
|
53
53
|
label: "Contact Center",
|
54
|
-
value: "
|
54
|
+
value: "contactCenter",
|
55
55
|
id: "contact1",
|
56
56
|
status: "Inactive",
|
57
57
|
variant: "error",
|
58
58
|
children: [
|
59
59
|
{
|
60
60
|
label: "Appointment Management",
|
61
|
-
value: "
|
61
|
+
value: "appointmentManagement",
|
62
62
|
id: "appointment1",
|
63
63
|
},
|
64
64
|
{
|
65
65
|
label: "Customer Service",
|
66
|
-
value: "
|
66
|
+
value: "customerService",
|
67
67
|
id: "customer1",
|
68
68
|
},
|
69
69
|
{
|
70
70
|
label: "Energy",
|
71
|
-
value: "
|
71
|
+
value: "energy",
|
72
72
|
id: "energy1",
|
73
73
|
},
|
74
74
|
],
|
@@ -2,62 +2,62 @@
|
|
2
2
|
|
3
3
|
<% treeData = [{
|
4
4
|
label: "Power Home Remodeling",
|
5
|
-
value: "
|
5
|
+
value: "powerHomeRemodeling",
|
6
6
|
id: "powerhome1",
|
7
7
|
expanded: true,
|
8
8
|
children: [
|
9
9
|
{
|
10
10
|
label: "People",
|
11
|
-
value: "
|
11
|
+
value: "people",
|
12
12
|
id: "people1",
|
13
13
|
children: [
|
14
14
|
{
|
15
15
|
label: "Talent Acquisition",
|
16
|
-
value: "
|
16
|
+
value: "talentAcquisition",
|
17
17
|
id: "talent1",
|
18
18
|
},
|
19
19
|
{
|
20
20
|
label: "Business Affairs",
|
21
|
-
value: "
|
21
|
+
value: "businessAffairs",
|
22
22
|
id: "business1",
|
23
23
|
children: [
|
24
24
|
{
|
25
25
|
label: "Initiatives",
|
26
|
-
value: "
|
26
|
+
value: "initiatives",
|
27
27
|
id: "initiative1",
|
28
28
|
},
|
29
29
|
{
|
30
30
|
label: "Learning & Development",
|
31
|
-
value: "
|
31
|
+
value: "learningAndDevelopment",
|
32
32
|
id: "development1",
|
33
33
|
},
|
34
34
|
],
|
35
35
|
},
|
36
36
|
{
|
37
37
|
label: "People Experience",
|
38
|
-
value: "
|
38
|
+
value: "peopleExperience",
|
39
39
|
id: "experience1",
|
40
40
|
},
|
41
41
|
],
|
42
42
|
},
|
43
43
|
{
|
44
44
|
label: "Contact Center",
|
45
|
-
value: "
|
45
|
+
value: "contactCenter",
|
46
46
|
id: "contact1",
|
47
47
|
children: [
|
48
48
|
{
|
49
49
|
label: "Appointment Management",
|
50
|
-
value: "
|
50
|
+
value: "appointmentManagement",
|
51
51
|
id: "appointment1",
|
52
52
|
},
|
53
53
|
{
|
54
54
|
label: "Customer Service",
|
55
|
-
value: "
|
55
|
+
value: "customerService",
|
56
56
|
id: "customer1",
|
57
57
|
},
|
58
58
|
{
|
59
59
|
label: "Energy",
|
60
|
-
value: "
|
60
|
+
value: "energy",
|
61
61
|
id: "energy1",
|
62
62
|
},
|
63
63
|
],
|
@@ -78,7 +78,8 @@ $overlay_colors: (
|
|
78
78
|
&.overlay-hide-scrollbar {
|
79
79
|
& [class*="overflow_x_auto"],
|
80
80
|
& [class*="overflow_y_auto"],
|
81
|
-
& [class*="overflow_auto"]
|
81
|
+
& [class*="overflow_auto"],
|
82
|
+
.overlay_token_container {
|
82
83
|
&::-webkit-scrollbar {
|
83
84
|
display: none !important;
|
84
85
|
}
|
@@ -30,7 +30,7 @@ const OverlayToken = (props: OverlayChildrenProps) => {
|
|
30
30
|
if (container) {
|
31
31
|
const { scrollLeft, scrollWidth, clientWidth } = container;
|
32
32
|
const atStart = scrollLeft === 0;
|
33
|
-
const atEnd = scrollLeft + clientWidth >= scrollWidth - 1;
|
33
|
+
const atEnd = scrollLeft + clientWidth >= scrollWidth - 1;
|
34
34
|
|
35
35
|
setIsAtStart(atStart);
|
36
36
|
setIsAtEnd(atEnd);
|
@@ -64,16 +64,17 @@ const OverlayToken = (props: OverlayChildrenProps) => {
|
|
64
64
|
return (
|
65
65
|
<>
|
66
66
|
<div className={dynamic ? isAtStart ? '' : previousOverlayClassName : previousOverlayClassName} />
|
67
|
-
{dynamic ?
|
67
|
+
{dynamic ?
|
68
68
|
<div
|
69
|
+
className="overlay_token_container"
|
69
70
|
ref={scrollContainerRef}
|
70
71
|
style={{
|
71
|
-
overflowX: 'auto',
|
72
|
+
overflowX: 'auto',
|
72
73
|
}}
|
73
74
|
>
|
74
75
|
{children}
|
75
76
|
</div>
|
76
|
-
:
|
77
|
+
:
|
77
78
|
children
|
78
79
|
}
|
79
80
|
{hasSubsequentOverlay &&
|
@@ -41,6 +41,16 @@ const Person = (props: PersonProps): React.ReactElement => {
|
|
41
41
|
className
|
42
42
|
)
|
43
43
|
|
44
|
+
const hasAllEmptyProps = [firstName, lastName].every(field => field === undefined || field === null || field === '')
|
45
|
+
|
46
|
+
if (hasAllEmptyProps) {
|
47
|
+
return (
|
48
|
+
<>
|
49
|
+
—
|
50
|
+
</>
|
51
|
+
)
|
52
|
+
}
|
53
|
+
|
44
54
|
return (
|
45
55
|
<div
|
46
56
|
{...ariaProps}
|
@@ -53,13 +63,13 @@ const Person = (props: PersonProps): React.ReactElement => {
|
|
53
63
|
className="pb_person_first"
|
54
64
|
tag="span"
|
55
65
|
>
|
56
|
-
{firstName}
|
66
|
+
{firstName ?? ''}
|
57
67
|
</Body>
|
58
68
|
{lastName &&
|
59
69
|
<Title
|
60
70
|
className="pb_person_first"
|
61
71
|
size={4}
|
62
|
-
text={` ${lastName}`}
|
72
|
+
text={lastName ? ` ${lastName}` : ''}
|
63
73
|
/>
|
64
74
|
}
|
65
75
|
</div>
|
@@ -42,7 +42,7 @@ $flag-min-resolution: 192dpi;
|
|
42
42
|
.iti__country-list {
|
43
43
|
min-width: $dropdown-min-width;
|
44
44
|
}
|
45
|
-
// iti-spacer-horizontal's default is 8px, or $space_xs
|
45
|
+
// iti-spacer-horizontal's default is 8px, or $space_xs
|
46
46
|
.iti__country-list .iti__flag, .iti__country-name {
|
47
47
|
margin-right: $space_xs;
|
48
48
|
}
|
@@ -60,7 +60,7 @@ $flag-min-resolution: 192dpi;
|
|
60
60
|
color: $focus_input_light;
|
61
61
|
}
|
62
62
|
|
63
|
-
.dropdown_open {
|
63
|
+
.dropdown_open:not(.error) {
|
64
64
|
.text_input {
|
65
65
|
border-color: $primary !important;
|
66
66
|
}
|
@@ -76,7 +76,7 @@ $flag-min-resolution: 192dpi;
|
|
76
76
|
}
|
77
77
|
|
78
78
|
.iti__divider {
|
79
|
-
border-bottom: 1px solid $border_light !important;
|
79
|
+
border-bottom: 1px solid $border_light !important;
|
80
80
|
}
|
81
81
|
|
82
82
|
.iti__selected-country-primary {
|
@@ -96,7 +96,7 @@ $flag-min-resolution: 192dpi;
|
|
96
96
|
justify-content: center;
|
97
97
|
align-items: center;
|
98
98
|
border-width: 0;
|
99
|
-
border-radius: $space_xxs;
|
99
|
+
border-radius: $space_xxs;
|
100
100
|
|
101
101
|
&[aria-expanded="true"] {
|
102
102
|
color: $primary_action;
|
@@ -199,7 +199,7 @@ $flag-min-resolution: 192dpi;
|
|
199
199
|
}
|
200
200
|
|
201
201
|
.iti__dropdown-content {
|
202
|
-
border-radius: $space_xs;
|
202
|
+
border-radius: $space_xs;
|
203
203
|
border: 1px solid $border_light !important;
|
204
204
|
position: absolute;
|
205
205
|
top: 100%;
|
@@ -228,13 +228,13 @@ $flag-min-resolution: 192dpi;
|
|
228
228
|
}
|
229
229
|
|
230
230
|
.iti__dropdown-content {
|
231
|
-
border-radius: $space_xs;
|
231
|
+
border-radius: $space_xs;
|
232
232
|
border: 1px solid $border_dark !important;
|
233
233
|
.iti__search-input {
|
234
234
|
background-color: $bg_dark_card;
|
235
235
|
&:hover {
|
236
236
|
background-color: $bg_dark_card;
|
237
|
-
}
|
237
|
+
}
|
238
238
|
&:active,
|
239
239
|
&:focus {
|
240
240
|
background-color: $card_dark;
|
@@ -243,7 +243,7 @@ $flag-min-resolution: 192dpi;
|
|
243
243
|
}
|
244
244
|
|
245
245
|
.iti__divider {
|
246
|
-
border-bottom: 1px solid $border_dark !important;
|
246
|
+
border-bottom: 1px solid $border_dark !important;
|
247
247
|
}
|
248
248
|
|
249
249
|
.iti__country-list {
|
@@ -278,7 +278,7 @@ $flag-min-resolution: 192dpi;
|
|
278
278
|
color: $white;
|
279
279
|
}
|
280
280
|
}
|
281
|
-
|
281
|
+
|
282
282
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
283
283
|
.iti__flag {
|
284
284
|
background-image: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags@2x.png");
|
@@ -2,7 +2,7 @@ import React from 'react'
|
|
2
2
|
import classnames from 'classnames'
|
3
3
|
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
5
|
-
import { globalProps, globalInlineProps } from '../utilities/globalProps'
|
5
|
+
import { globalProps, globalInlineProps, GlobalProps } from '../utilities/globalProps'
|
6
6
|
|
7
7
|
import Caption from '../pb_caption/_caption'
|
8
8
|
|
@@ -19,7 +19,7 @@ type SectionSeparatorProps = {
|
|
19
19
|
orientation?: "horizontal" | "vertical",
|
20
20
|
text?: string,
|
21
21
|
variant?: "card" | "background",
|
22
|
-
}
|
22
|
+
} & GlobalProps
|
23
23
|
|
24
24
|
const SectionSeparator = (props: SectionSeparatorProps): React.ReactElement => {
|
25
25
|
const {
|
@@ -143,6 +143,16 @@
|
|
143
143
|
select {
|
144
144
|
font-size: 12px;
|
145
145
|
}
|
146
|
+
.pb_select_kit_wrapper.error {
|
147
|
+
.pb_select_kit_caret {
|
148
|
+
top: 13.7px;
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
.pb_select_kit_wrapper.error {
|
153
|
+
.pb_select_kit_caret {
|
154
|
+
top: 16.2px;
|
155
|
+
}
|
146
156
|
}
|
147
157
|
}
|
148
158
|
}
|
@@ -8,7 +8,7 @@ const TableWithCollapsibleWithCustomClick = (props) => {
|
|
8
8
|
|
9
9
|
const Content = () => {
|
10
10
|
return (
|
11
|
-
<Card
|
11
|
+
<Card
|
12
12
|
borderNone
|
13
13
|
borderRadius="none"
|
14
14
|
padding="md"
|
@@ -37,7 +37,7 @@ return (
|
|
37
37
|
|
38
38
|
</Table.Head>
|
39
39
|
<Table.Body>
|
40
|
-
<Table.Row collapsible
|
40
|
+
<Table.Row collapsible
|
41
41
|
collapsibleContent={<Content/>}
|
42
42
|
toggleCellId="cell-1"
|
43
43
|
{...props}
|
@@ -47,7 +47,7 @@ return (
|
|
47
47
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
48
48
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
49
49
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
50
|
-
<Table.Cell cursor="pointer"
|
50
|
+
<Table.Cell cursor="pointer"
|
51
51
|
id="cell-1"
|
52
52
|
textAlign="right"
|
53
53
|
>
|
@@ -59,7 +59,7 @@ return (
|
|
59
59
|
</Table.Cell>
|
60
60
|
|
61
61
|
</Table.Row>
|
62
|
-
<Table.Row collapsible
|
62
|
+
<Table.Row collapsible
|
63
63
|
collapsibleContent={<Content/>}
|
64
64
|
toggleCellId="cell-2"
|
65
65
|
{...props}
|
@@ -69,7 +69,7 @@ return (
|
|
69
69
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
70
70
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
71
71
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
72
|
-
<Table.Cell cursor="pointer"
|
72
|
+
<Table.Cell cursor="pointer"
|
73
73
|
id="cell-2"
|
74
74
|
textAlign="right"
|
75
75
|
>
|
@@ -81,7 +81,7 @@ return (
|
|
81
81
|
</Table.Cell>
|
82
82
|
|
83
83
|
</Table.Row>
|
84
|
-
<Table.Row collapsible
|
84
|
+
<Table.Row collapsible
|
85
85
|
collapsibleContent={<Content/>}
|
86
86
|
toggleCellId="cell-3"
|
87
87
|
{...props}
|
@@ -91,7 +91,7 @@ return (
|
|
91
91
|
<Table.Cell>{'Value 3'}</Table.Cell>
|
92
92
|
<Table.Cell>{'Value 4'}</Table.Cell>
|
93
93
|
<Table.Cell>{'Value 5'}</Table.Cell>
|
94
|
-
<Table.Cell cursor="pointer"
|
94
|
+
<Table.Cell cursor="pointer"
|
95
95
|
id="cell-3"
|
96
96
|
textAlign="right"
|
97
97
|
>
|
@@ -55,7 +55,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
55
55
|
const htmlProps = buildHtmlProps(htmlOptions);
|
56
56
|
const sideHighlightClass =
|
57
57
|
sideHighlightColor != "" ? `side_highlight_${sideHighlightColor}` : null;
|
58
|
-
|
58
|
+
|
59
59
|
const [isCollapsed, setIsCollapsed] = useCollapsible(true);
|
60
60
|
|
61
61
|
const collapsibleRow = collapsible && isCollapsed === true ? "collapsible_table_row" : null;
|
@@ -83,14 +83,14 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
83
83
|
target instanceof SVGElement &&
|
84
84
|
(target.matches("svg.pb_custom_icon") || target.closest("svg.pb_custom_icon"));
|
85
85
|
|
86
|
-
if (clickedCell || isIconClick) {
|
86
|
+
if (clickedCell || (clickedCell && isIconClick)) {
|
87
87
|
setIsCollapsed(!isCollapsed);
|
88
88
|
}
|
89
89
|
} else {
|
90
90
|
setIsCollapsed(!isCollapsed);
|
91
91
|
}
|
92
92
|
};
|
93
|
-
|
93
|
+
|
94
94
|
return (
|
95
95
|
<>
|
96
96
|
{collapsible ? (
|
@@ -116,7 +116,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
116
116
|
tag="td"
|
117
117
|
>
|
118
118
|
<tr/>
|
119
|
-
<Collapsible.Content
|
119
|
+
<Collapsible.Content
|
120
120
|
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
121
121
|
dark={dark}
|
122
122
|
margin="none"
|
@@ -149,7 +149,7 @@ const TableRow = (props: TableRowPropTypes): React.ReactElement => {
|
|
149
149
|
tag="td"
|
150
150
|
>
|
151
151
|
<tr/>
|
152
|
-
<Collapsible.Content
|
152
|
+
<Collapsible.Content
|
153
153
|
className={collapsibleSideHighlight ? `table_collapsible_side_highlight` : ''}
|
154
154
|
dark={dark}
|
155
155
|
margin="none"
|
@@ -71,7 +71,8 @@
|
|
71
71
|
}
|
72
72
|
&.error {
|
73
73
|
.text_input_wrapper {
|
74
|
-
input
|
74
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
75
|
+
input:not(.iti__search-input),
|
75
76
|
.text_input {
|
76
77
|
border-color: $error_dark;
|
77
78
|
}
|
@@ -102,7 +103,8 @@
|
|
102
103
|
[class*="pb_body_kit"] {
|
103
104
|
margin-top: $space_xs / 2;
|
104
105
|
}
|
105
|
-
input
|
106
|
+
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
107
|
+
input:not(.iti__search-input),
|
106
108
|
.text_input {
|
107
109
|
border-color: $error;
|
108
110
|
}
|
@@ -29,6 +29,7 @@ import { GenericObject, Noop } from '../types'
|
|
29
29
|
* @prop {boolean} async - whether Typeahead should fetch data from
|
30
30
|
* a remote location to populate the options
|
31
31
|
* @prop {string} label - the text for the optional typeahead input label
|
32
|
+
* @prop {boolean} preserveSearchInput - whether Typeahed should preserve input when the field loses focus
|
32
33
|
*/
|
33
34
|
|
34
35
|
type TypeaheadProps = {
|
@@ -54,6 +55,7 @@ type TypeaheadProps = {
|
|
54
55
|
optionsByContext?: Record<string, Array<{ label: string; value?: string }>>
|
55
56
|
searchContextSelector?: string,
|
56
57
|
clearOnContextChange?: boolean,
|
58
|
+
preserveSearchInput?: boolean,
|
57
59
|
} & GlobalProps
|
58
60
|
|
59
61
|
export type SelectValueType = {
|
@@ -93,8 +95,12 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
93
95
|
optionsByContext = {},
|
94
96
|
searchContextSelector,
|
95
97
|
clearOnContextChange = false,
|
98
|
+
preserveSearchInput = false,
|
96
99
|
...props
|
97
100
|
}: TypeaheadProps) => {
|
101
|
+
// State to manage input value for preserveSearchInput prop
|
102
|
+
const [inputValue, setInputValue] = useState("")
|
103
|
+
|
98
104
|
const selectProps = {
|
99
105
|
cacheOptions: true,
|
100
106
|
components: {
|
@@ -127,8 +133,55 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
127
133
|
...props,
|
128
134
|
}
|
129
135
|
|
136
|
+
// If preserveSearchInput is true, manage the input value
|
137
|
+
if (preserveSearchInput) {
|
138
|
+
selectProps.inputValue = inputValue
|
139
|
+
selectProps.onInputChange = (newValue: string, actionMeta: {action: string}) => {
|
140
|
+
// Only update the input value for certain actions
|
141
|
+
if (actionMeta.action === 'input-change') {
|
142
|
+
setInputValue(newValue)
|
143
|
+
} else if (actionMeta.action === 'menu-close' && !props.value) {
|
144
|
+
// Don't clear the input when the menu closes without a selection
|
145
|
+
// unless the component is controlled and has a value
|
146
|
+
} else if (actionMeta.action === 'set-value') {
|
147
|
+
// When an option is selected, clear the input
|
148
|
+
setInputValue('')
|
149
|
+
}
|
150
|
+
|
151
|
+
// If the original onInputChange was provided, call it too
|
152
|
+
if (props.onInputChange) {
|
153
|
+
return props.onInputChange(newValue, actionMeta)
|
154
|
+
}
|
155
|
+
return newValue
|
156
|
+
}
|
157
|
+
|
158
|
+
// Handle blur events
|
159
|
+
const originalOnBlur = props.onBlur
|
160
|
+
selectProps.onBlur = (event: React.FocusEvent<HTMLInputElement>) => {
|
161
|
+
// Do not clear input on blur - the value is preserved in our state
|
162
|
+
if (originalOnBlur) {
|
163
|
+
originalOnBlur(event)
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
|
130
168
|
const [contextValue, setContextValue] = useState("")
|
131
169
|
|
170
|
+
// Add listener for clearing
|
171
|
+
useEffect(() => {
|
172
|
+
const handleClear = () => {
|
173
|
+
if (preserveSearchInput) {
|
174
|
+
setInputValue('')
|
175
|
+
}
|
176
|
+
}
|
177
|
+
|
178
|
+
document.addEventListener(`pb-typeahead-kit-${selectProps.id}:clear`, handleClear)
|
179
|
+
|
180
|
+
return () => {
|
181
|
+
document.removeEventListener(`pb-typeahead-kit-${selectProps.id}:clear`, handleClear)
|
182
|
+
}
|
183
|
+
}, [selectProps.id, preserveSearchInput])
|
184
|
+
|
132
185
|
useEffect(() => {
|
133
186
|
if (searchContextSelector) {
|
134
187
|
const searchContextElement = document.getElementById(searchContextSelector)
|
@@ -137,7 +190,12 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
137
190
|
const handleContextChange = (e: Event) => {
|
138
191
|
const target = e.target as HTMLInputElement;
|
139
192
|
setContextValue(target.value);
|
140
|
-
if (clearOnContextChange)
|
193
|
+
if (clearOnContextChange) {
|
194
|
+
document.dispatchEvent(new CustomEvent(`pb-typeahead-kit-${selectProps.id}:clear`))
|
195
|
+
if (preserveSearchInput) {
|
196
|
+
setInputValue('')
|
197
|
+
}
|
198
|
+
}
|
141
199
|
}
|
142
200
|
|
143
201
|
if (searchContextElement) searchContextElement.addEventListener('change', handleContextChange)
|
@@ -146,7 +204,7 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
146
204
|
if (searchContextElement) searchContextElement.removeEventListener('change', handleContextChange)
|
147
205
|
}
|
148
206
|
}
|
149
|
-
}, [searchContextSelector])
|
207
|
+
}, [searchContextSelector, clearOnContextChange, selectProps.id, preserveSearchInput])
|
150
208
|
|
151
209
|
const contextArray = optionsByContext[contextValue]
|
152
210
|
if (Array.isArray(contextArray) && contextArray.length > 0) {
|
@@ -168,7 +226,12 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
168
226
|
onChange(_data)
|
169
227
|
}
|
170
228
|
}
|
171
|
-
|
229
|
+
|
230
|
+
// If a value is selected and we're preserving input on blur, clear the input
|
231
|
+
if (action === 'select-option' && preserveSearchInput) {
|
232
|
+
setInputValue('')
|
233
|
+
}
|
234
|
+
|
172
235
|
if (action === 'select-option') {
|
173
236
|
if (selectProps.onMultiValueClick) selectProps.onMultiValueClick(option)
|
174
237
|
const multiValueClearEvent = new CustomEvent(`pb-typeahead-kit-${selectProps.id}-result-option-select`, { detail: option ? option : _data })
|
@@ -181,6 +244,10 @@ const Typeahead = forwardRef<HTMLInputElement, TypeaheadProps>(({
|
|
181
244
|
if (action === 'clear') {
|
182
245
|
const multiValueClearEvent = new CustomEvent(`pb-typeahead-kit-${selectProps.id}-result-clear`)
|
183
246
|
document.dispatchEvent(multiValueClearEvent)
|
247
|
+
// If preserving input on blur, also clear input on explicit clear
|
248
|
+
if (preserveSearchInput) {
|
249
|
+
setInputValue('')
|
250
|
+
}
|
184
251
|
}
|
185
252
|
}
|
186
253
|
|
@@ -8,7 +8,14 @@
|
|
8
8
|
|
9
9
|
%>
|
10
10
|
|
11
|
-
<%= pb_rails("typeahead", props: {
|
11
|
+
<%= pb_rails("typeahead", props: {
|
12
|
+
id: "typeahead-error-example",
|
13
|
+
options: options,
|
14
|
+
error: "Please make a valid selection",
|
15
|
+
label: "Products",
|
16
|
+
name: :foo,
|
17
|
+
is_multi: false
|
18
|
+
}) %>
|
12
19
|
|
13
20
|
<!-- This section is an example of the available JavaScript event hooks -->
|
14
21
|
<%= javascript_tag defer: "defer" do %>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
|
3
|
+
import Typeahead from '../_typeahead'
|
4
|
+
|
5
|
+
const options = [
|
6
|
+
{ label: 'Orange', value: '#FFA500' },
|
7
|
+
{ label: 'Red', value: '#FF0000' },
|
8
|
+
{ label: 'Green', value: '#00FF00' },
|
9
|
+
{ label: 'Blue', value: '#0000FF' },
|
10
|
+
]
|
11
|
+
|
12
|
+
const TypeaheadPreserveInput = (props) => {
|
13
|
+
return (
|
14
|
+
<Typeahead
|
15
|
+
label="Colors"
|
16
|
+
options={options}
|
17
|
+
preserveSearchInput
|
18
|
+
{...props}
|
19
|
+
/>
|
20
|
+
)
|
21
|
+
}
|
22
|
+
|
23
|
+
export default TypeaheadPreserveInput
|