playbook_ui 14.18.0 → 14.19.0.pre.alpha.PLAY1973formpillinternalsizing7728
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_circle_chart/_circle_chart.tsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/circleChart.test.js +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/circleChartTheme.ts +53 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.html.erb +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_custom_tooltip.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +2 -2
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.jsx +38 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +1 -1
- data/app/pb_kits/playbook/pb_circle_chart/docs/example.yml +2 -3
- data/app/pb_kits/playbook/pb_circle_chart/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +12 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +12 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +50 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.html.erb +2 -2
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +4 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_rails.md +4 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_range_limit.md +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.md +5 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.jsx +34 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern.md +14 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +20 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +14 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +10 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +64 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
- 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 +4 -1
- data/app/pb_kits/playbook/pb_draggable/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/draggable.rb +9 -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 +141 -142
- 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_error.jsx +4 -1
- 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_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 +57 -0
- 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 +4 -4
- 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_filter/docs/_filter_within_turbo_frames.html.erb +41 -0
- data/app/pb_kits/playbook/pb_filter/docs/_filter_within_turbo_frames.md +1 -0
- data/app/pb_kits/playbook/pb_filter/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_form_group/_error_state_mixin.scss +22 -18
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +19 -12
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_pb_styles.jsx +0 -1
- data/app/pb_kits/playbook/pb_gauge/gaugeTheme.ts +3 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_line_graph/lineGraphTheme.ts +110 -0
- 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_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_phone_number_input/_phone_number_input.scss +21 -8
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +3 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +10 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +20 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +8 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +3 -0
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +19 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.html.erb +46 -0
- data/app/pb_kits/playbook/pb_popover/docs/_popover_append_to.md +1 -0
- data/app/pb_kits/playbook/pb_popover/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_popover/index.ts +13 -1
- data/app/pb_kits/playbook/pb_popover/popover.rb +2 -0
- 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_select/docs/_select_error.jsx +7 -2
- 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_text_input/docs/_text_input_error.jsx +9 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.html.erb +5 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +7 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb +8 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +6 -2
- 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-BPSIWtFT.js +22 -0
- data/dist/chunks/_weekday_stacked-PfWrqC3z.js +45 -0
- data/dist/chunks/lazysizes-B7xYodB-.js +1 -0
- data/dist/chunks/lib-B20MXZcW.js +29 -0
- data/dist/chunks/{pb_form_validation-BRjyJrKh.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 +77 -24
- 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-C_FX7o_S.js +0 -22
- data/dist/chunks/_weekday_stacked-B4RLTeDo.js +0 -45
- data/dist/chunks/lazysizes-DHz07jlL.js +0 -1
- data/dist/chunks/lib-ySl8uEpT.js +0 -29
- /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_colors.md → _draggable_drop_zones_colors_react.md} +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_drop_zones.md → _draggable_drop_zones_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_event_listeners.md → _draggable_event_listeners_rails.md} +0 -0
@@ -50,3 +50,21 @@ test('displays custom message', () => {
|
|
50
50
|
const kit = screen.getByTestId(testid)
|
51
51
|
expect(kit).toHaveTextContent('Hello world!')
|
52
52
|
})
|
53
|
+
|
54
|
+
test('handles error state with error prop', () => {
|
55
|
+
const errorText = "Test error message"
|
56
|
+
render(
|
57
|
+
<FileUpload
|
58
|
+
data={{ testid: testid }}
|
59
|
+
error={errorText}
|
60
|
+
/>
|
61
|
+
)
|
62
|
+
|
63
|
+
const kit = screen.getByTestId(testid)
|
64
|
+
|
65
|
+
expect(kit).toHaveClass('pb_file_upload_kit')
|
66
|
+
expect(kit).toHaveClass('error')
|
67
|
+
|
68
|
+
const errorElement = screen.getByText(errorText)
|
69
|
+
expect(errorElement).toBeInTheDocument()
|
70
|
+
})
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<%=
|
2
|
+
pb_rails("filter", props: {
|
3
|
+
id: "filter_within_trubo_frames",
|
4
|
+
position: "top",
|
5
|
+
filters: [
|
6
|
+
{ name: "name", value: "John Wick" },
|
7
|
+
{ name: "city", value: "San Francisco"}
|
8
|
+
],
|
9
|
+
sort_menu: [
|
10
|
+
{ item: "Popularity", link: "?q[sorts]=managers_popularity+asc", active: true, direction: "desc" },
|
11
|
+
{ item: "Mananger's Title", link: "?q[sorts]=managers_title+asc", active: false },
|
12
|
+
{ item: "Manager's Name", link: "?q[sorts]=managers_name+asc", active: false },
|
13
|
+
],
|
14
|
+
template: "default",
|
15
|
+
results: 1,
|
16
|
+
popover_props: { append_to: "parent" },
|
17
|
+
}) do
|
18
|
+
%>
|
19
|
+
<%
|
20
|
+
example_collection = [
|
21
|
+
OpenStruct.new(name: "USA", value: 1),
|
22
|
+
OpenStruct.new(name: "Canada", value: 2),
|
23
|
+
OpenStruct.new(name: "Brazil", value: 3),
|
24
|
+
OpenStruct.new(name: "Philippines", value: 4),
|
25
|
+
OpenStruct.new(name: "A galaxy far far away, like really far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far far away...", value: 5)
|
26
|
+
]
|
27
|
+
%>
|
28
|
+
<%= pb_rails("form", props: { form_system_options: { scope: :example, method: :get } }) do |form| %>
|
29
|
+
<%= form.text_field :example_text_field, props: { label: true } %>
|
30
|
+
<%= form.collection_select :example_collection_select, example_collection, :value, :name, props: {max_width: "sm", label: true } %>
|
31
|
+
|
32
|
+
<%= form.actions do |action| %>
|
33
|
+
<%= action.submit props: {
|
34
|
+
text: "Apply",
|
35
|
+
data: {
|
36
|
+
disable_with: "pb_rails('icon', props: { icon: 'spinner', spin: true, fixed_width: true })Searching...".html_safe
|
37
|
+
},}%>
|
38
|
+
<%= action.button props: { type: "reset", text: "Clear", variant: "secondary" } %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
By default, the filter popover attaches to the `<body>`. To attach it elsewhere, like inside a Turbo Frame, pass the `append_to` prop through `popover_props`. Set it to `"parent"` to place the tooltip inside its parent element, or pass any CSS selector (`#id` or `.class`) to specify a custom container.
|
@@ -23,35 +23,39 @@
|
|
23
23
|
@mixin error-state-right-side-select-kit {
|
24
24
|
&:has(.pb_text_input_kit:not(.error)):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper.error),
|
25
25
|
&:has(.pb_text_input_kit.error):has(.pb_text_input_kit_label):has(.pb_select_kit_wrapper) {
|
26
|
-
|
27
|
-
|
28
|
-
.pb_select_kit_wrapper {
|
29
|
-
padding-top: $space_md;
|
30
|
-
margin-top: 2px;
|
26
|
+
&:not(:has(.pb_phone_number_input)) {
|
27
|
+
align-items: flex-start;
|
31
28
|
|
32
|
-
.
|
29
|
+
.pb_select_kit_wrapper {
|
33
30
|
padding-top: $space_md;
|
31
|
+
margin-top: 2px;
|
32
|
+
|
33
|
+
.pb_select_kit_caret {
|
34
|
+
padding-top: $space_md;
|
35
|
+
}
|
34
36
|
}
|
35
|
-
}
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
.pb_select_kit_wrapper.error {
|
39
|
+
padding-top: $space_md;
|
40
|
+
margin-top: 2px;
|
40
41
|
|
41
|
-
|
42
|
-
|
42
|
+
.pb_select_kit_caret {
|
43
|
+
padding-top: $space_xl;
|
44
|
+
}
|
43
45
|
}
|
44
46
|
}
|
45
47
|
}
|
46
48
|
}
|
47
49
|
|
48
50
|
@mixin error-state-left-side-select-kit {
|
49
|
-
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.
|
50
|
-
|
51
|
+
&:has(.pb_select_kit_label):has(.pb_select_kit_wrapper):has(.pb_text_input_kit.error) {
|
52
|
+
&:not(:has(.pb_phone_number_input)) {
|
53
|
+
align-items: flex-start;
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
+
.pb_text_input_kit.error {
|
56
|
+
padding-top: $space_md;
|
57
|
+
margin-top: 2px;
|
58
|
+
}
|
55
59
|
}
|
56
60
|
}
|
57
|
-
}
|
61
|
+
}
|
@@ -20,9 +20,12 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
|
|
20
20
|
margin-bottom: 2px;
|
21
21
|
margin-top: 2px;
|
22
22
|
cursor: pointer;
|
23
|
-
.pb_form_pill_text, .
|
23
|
+
.pb_form_pill_text, .pb_form_pill_tag {
|
24
24
|
font-size: $font_small !important;
|
25
25
|
}
|
26
|
+
.pb_form_pill_close {
|
27
|
+
font-size: 17px;
|
28
|
+
}
|
26
29
|
|
27
30
|
&[class*=wrapped] {
|
28
31
|
height: max-content;
|
@@ -96,7 +99,9 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
|
|
96
99
|
display: flex;
|
97
100
|
align-items: center;
|
98
101
|
height: 17px;
|
99
|
-
|
102
|
+
width: 17px;
|
103
|
+
justify-content: center;
|
104
|
+
border-radius: 50%;
|
100
105
|
cursor: pointer;
|
101
106
|
@if ($color_name == "neutral") {
|
102
107
|
color: $text_lt_default;
|
@@ -146,8 +151,7 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
|
|
146
151
|
outline-offset: -1px;
|
147
152
|
}
|
148
153
|
.pb_form_pill_icon {
|
149
|
-
height:
|
150
|
-
width: 12px !important;
|
154
|
+
height: 0.875em;
|
151
155
|
padding-right: $space_xs;
|
152
156
|
+ .pb_form_pill_text, + .pb_form_pill_tag,
|
153
157
|
+ .pb_tooltip_kit .pb_form_pill_text, + .pb_tooltip_kit .pb_form_pill_tag,
|
@@ -158,7 +162,7 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
|
|
158
162
|
&.small {
|
159
163
|
height: 17px;
|
160
164
|
padding: 0 $space-xs;
|
161
|
-
.pb_form_pill_text, .
|
165
|
+
.pb_form_pill_text, .pb_form_pill_tag {
|
162
166
|
font-size: $font_smallest !important;
|
163
167
|
}
|
164
168
|
.pb_form_pill_text, .pb_form_pill_tag {
|
@@ -166,17 +170,20 @@ $form_pill_colors: map-merge($status_color_text, map-merge($data_colors, $produc
|
|
166
170
|
padding: 0 $space_xxs;
|
167
171
|
}
|
168
172
|
.pb_form_pill_close {
|
169
|
-
height:
|
170
|
-
|
173
|
+
height: 14px;
|
174
|
+
width: 14px;
|
175
|
+
font-size: 15px;
|
176
|
+
border-radius: 50%;
|
171
177
|
}
|
172
178
|
[class^=pb_avatar_kit] .avatar_wrapper {
|
173
|
-
flex-basis:
|
174
|
-
height:
|
175
|
-
margin-top:
|
176
|
-
width:
|
177
|
-
&::before { line-height:
|
179
|
+
flex-basis: 14px;
|
180
|
+
height: 14px;
|
181
|
+
margin-top: 3px;
|
182
|
+
width: 14px;
|
183
|
+
&::before { line-height: 15px; }
|
178
184
|
}
|
179
185
|
.pb_form_pill_icon {
|
186
|
+
height: 0.75em;
|
180
187
|
padding-right: $space_xxs;
|
181
188
|
+ .pb_form_pill_text, + .pb_form_pill_tag,
|
182
189
|
+ .pb_tooltip_kit .pb_form_pill_text, + .pb_tooltip_kit .pb_form_pill_tag,
|
@@ -2,6 +2,7 @@ import colors from '../tokens/exports/_colors.module.scss'
|
|
2
2
|
import typography from '../tokens/exports/_typography.module.scss'
|
3
3
|
|
4
4
|
const gaugeTheme = {
|
5
|
+
title: { text: "" },
|
5
6
|
chart: {
|
6
7
|
type: "solidgauge",
|
7
8
|
events: {
|
@@ -77,7 +78,8 @@ const gaugeTheme = {
|
|
77
78
|
y: -26,
|
78
79
|
},
|
79
80
|
},
|
80
|
-
}
|
81
|
+
},
|
82
|
+
credits: { enabled: false }
|
81
83
|
}
|
82
84
|
|
83
85
|
export default gaugeTheme;
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import lineGraphTheme from '../lineGraphTheme'
|
3
|
+
import Highcharts from "highcharts"
|
4
|
+
import HighchartsReact from "highcharts-react-official"
|
5
|
+
|
6
|
+
const data = [{
|
7
|
+
name: 'Installation',
|
8
|
+
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
9
|
+
}, {
|
10
|
+
name: 'Manufacturing',
|
11
|
+
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
|
12
|
+
}, {
|
13
|
+
name: 'Sales & Distribution',
|
14
|
+
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
|
15
|
+
}, {
|
16
|
+
name: 'Project Development',
|
17
|
+
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
|
18
|
+
}, {
|
19
|
+
name: 'Other',
|
20
|
+
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
21
|
+
}]
|
22
|
+
|
23
|
+
const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
24
|
+
|
25
|
+
const baseOptions = {
|
26
|
+
series: data,
|
27
|
+
title: { text: "Solar Employment Growth by Sector, 2010-2016" },
|
28
|
+
subtitle: { text: "Source: thesolarfoundation.com" },
|
29
|
+
xAxis: {
|
30
|
+
categories: categories,
|
31
|
+
},
|
32
|
+
yAxis: {
|
33
|
+
title: {
|
34
|
+
text: "Number of Employees",
|
35
|
+
},
|
36
|
+
},
|
37
|
+
}
|
38
|
+
|
39
|
+
const LineGraphPbStyles = () => {
|
40
|
+
const options = Highcharts.merge({}, lineGraphTheme, baseOptions)
|
41
|
+
|
42
|
+
return(
|
43
|
+
<div>
|
44
|
+
<HighchartsReact
|
45
|
+
highcharts={Highcharts}
|
46
|
+
options={options}
|
47
|
+
/>
|
48
|
+
</div>
|
49
|
+
)
|
50
|
+
}
|
51
|
+
|
52
|
+
export default LineGraphPbStyles
|
@@ -0,0 +1 @@
|
|
1
|
+
You don't need to use the Line Graph Kit to apply Playbook styles to your Highcharts line graph. Just import lineGraphTheme.ts and merge it with your graph options—Playbook’s styling will apply automatically.
|
@@ -4,3 +4,4 @@ export { default as LineGraphLegendPosition } from './_line_graph_legend_positio
|
|
4
4
|
export { default as LineGraphLegendNonclickable } from './_line_graph_legend_nonclickable.jsx'
|
5
5
|
export { default as LineGraphHeight } from './_line_graph_height.jsx'
|
6
6
|
export { default as LineGraphColors } from './_line_graph_colors.jsx'
|
7
|
+
export { default as LineGraphPbStyles } from './_line_graph_pb_styles.jsx'
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import colors from '../tokens/exports/_colors.module.scss'
|
2
|
+
import typography from '../tokens/exports/_typography.module.scss'
|
3
|
+
|
4
|
+
const lineGraphTheme = {
|
5
|
+
title: {
|
6
|
+
text: "",
|
7
|
+
style: {
|
8
|
+
color: colors.text_lt_default,
|
9
|
+
fontFamily: typography.font_family_base,
|
10
|
+
fontWeight: typography.bold,
|
11
|
+
fontSize: typography.heading_3,
|
12
|
+
},
|
13
|
+
},
|
14
|
+
subtitle: {
|
15
|
+
text: "" ,
|
16
|
+
style: {
|
17
|
+
fontFamily: typography.font_family_base,
|
18
|
+
color: colors.text_lt_light,
|
19
|
+
fontWeight: typography.regular,
|
20
|
+
fontSize: typography.text_base,
|
21
|
+
},
|
22
|
+
},
|
23
|
+
chart: {
|
24
|
+
type: "line",
|
25
|
+
},
|
26
|
+
tooltip: {
|
27
|
+
backgroundColor: {
|
28
|
+
linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
|
29
|
+
stops: [
|
30
|
+
[0, colors.bg_dark],
|
31
|
+
[1, colors.bg_dark],
|
32
|
+
],
|
33
|
+
},
|
34
|
+
followPointer: true,
|
35
|
+
shadow: false,
|
36
|
+
borderWidth: 0,
|
37
|
+
borderRadius: 10,
|
38
|
+
style: {
|
39
|
+
fontFamily: typography.font_family_base,
|
40
|
+
color: colors.text_dk_default,
|
41
|
+
fontWeight: typography.regular,
|
42
|
+
fontSize: typography.text_smaller,
|
43
|
+
},
|
44
|
+
},
|
45
|
+
plotOptions: {
|
46
|
+
line: {
|
47
|
+
dataLabels: {
|
48
|
+
enabled: false,
|
49
|
+
},
|
50
|
+
},
|
51
|
+
},
|
52
|
+
credits: { enabled: false },
|
53
|
+
legend: { enabled: false },
|
54
|
+
colors: [
|
55
|
+
colors.data_1,
|
56
|
+
colors.data_2,
|
57
|
+
colors.data_3,
|
58
|
+
colors.data_4,
|
59
|
+
colors.data_5,
|
60
|
+
colors.data_6,
|
61
|
+
colors.data_7,
|
62
|
+
],
|
63
|
+
xAxis: {
|
64
|
+
gridLineWidth: 0,
|
65
|
+
lineColor: colors.border_light,
|
66
|
+
tickColor: colors.border_light,
|
67
|
+
labels: {
|
68
|
+
style: {
|
69
|
+
fontFamily: typography.font_family_base,
|
70
|
+
color: colors.text_lt_lighter,
|
71
|
+
fontWeight: typography.bold,
|
72
|
+
fontSize: typography.text_smaller,
|
73
|
+
},
|
74
|
+
},
|
75
|
+
title: {
|
76
|
+
style: {
|
77
|
+
color: colors.text_lt_default,
|
78
|
+
fontFamily: typography.font_family_base,
|
79
|
+
fontWeight: typography.regular,
|
80
|
+
fontSize: typography.heading_4,
|
81
|
+
},
|
82
|
+
},
|
83
|
+
},
|
84
|
+
yAxis: {
|
85
|
+
alternateGridColor: undefined as string | undefined,
|
86
|
+
minorTickInterval: null as number | null,
|
87
|
+
gridLineColor: colors.border_light,
|
88
|
+
minorGridLineColor: colors.border_light,
|
89
|
+
lineWidth: 0,
|
90
|
+
tickWidth: 0,
|
91
|
+
labels: {
|
92
|
+
style: {
|
93
|
+
fontFamily: typography.font_family_base,
|
94
|
+
color: colors.text_lt_lighter,
|
95
|
+
fontWeight: typography.bold,
|
96
|
+
fontSize: typography.text_smaller,
|
97
|
+
},
|
98
|
+
},
|
99
|
+
title: {
|
100
|
+
style: {
|
101
|
+
fontFamily: typography.font_family_base,
|
102
|
+
color: colors.text_lt_lighter,
|
103
|
+
fontWeight: typography.bold,
|
104
|
+
fontSize: typography.text_smaller,
|
105
|
+
},
|
106
|
+
},
|
107
|
+
},
|
108
|
+
}
|
109
|
+
|
110
|
+
export default lineGraphTheme;
|
@@ -13,6 +13,7 @@ import MessageMention from './_message_mention'
|
|
13
13
|
|
14
14
|
type MessageProps = {
|
15
15
|
aria: { [key: string]: string },
|
16
|
+
avatarGrayscale?: boolean,
|
16
17
|
avatarName?: string,
|
17
18
|
avatarStatus?: "away" | "offline" | "online",
|
18
19
|
avatarUrl?: string,
|
@@ -32,6 +33,7 @@ type MessageProps = {
|
|
32
33
|
const Message = (props: MessageProps) => {
|
33
34
|
const {
|
34
35
|
aria = {},
|
36
|
+
avatarGrayscale = false,
|
35
37
|
avatarName,
|
36
38
|
avatarStatus = null,
|
37
39
|
avatarUrl,
|
@@ -71,6 +73,7 @@ const Message = (props: MessageProps) => {
|
|
71
73
|
>
|
72
74
|
{shouldDisplayAvatar &&
|
73
75
|
<Avatar
|
76
|
+
grayscale={avatarGrayscale}
|
74
77
|
imageUrl={avatarUrl}
|
75
78
|
name={avatarName}
|
76
79
|
size="xs"
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%= pb_rails("message", props: {
|
2
|
+
label: "Mike Bishop",
|
3
|
+
message: "So long, and thanks for all the fish!",
|
4
|
+
timestamp: "3 months ago",
|
5
|
+
avatar_name: "Mike Bishop",
|
6
|
+
avatar_url: "https://randomuser.me/api/portraits/men/50.jpg",
|
7
|
+
avatar_status: "offline",
|
8
|
+
avatar_grayscale: true,
|
9
|
+
}) %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import React from "react"
|
2
|
+
|
3
|
+
import Message from "../_message"
|
4
|
+
|
5
|
+
const MessageGrayscale = (props) => {
|
6
|
+
return (
|
7
|
+
<Message
|
8
|
+
avatarGrayscale
|
9
|
+
avatarName='Mike Bishop'
|
10
|
+
avatarStatus='offline'
|
11
|
+
avatarUrl='https://randomuser.me/api/portraits/men/50.jpg'
|
12
|
+
borderRadius='rounded'
|
13
|
+
label='Mike Bishop'
|
14
|
+
message='So long, and thanks for all the fish!'
|
15
|
+
timestamp='3 months ago'
|
16
|
+
{...props}
|
17
|
+
/>
|
18
|
+
)
|
19
|
+
}
|
20
|
+
|
21
|
+
export default MessageGrayscale
|
@@ -5,12 +5,14 @@ examples:
|
|
5
5
|
- message_timestamp: With Timestamp Hover
|
6
6
|
- message_hover: Hover
|
7
7
|
- message_mentions: Mentions
|
8
|
+
- message_grayscale: Grayscale Avatar
|
8
9
|
|
9
10
|
react:
|
10
11
|
- message_default: Default
|
11
12
|
- message_timestamp: With Timestamp Hover
|
12
13
|
- message_hover: Hover
|
13
14
|
- message_mentions: Mentions
|
15
|
+
- message_grayscale: Grayscale Avatar
|
14
16
|
|
15
17
|
swift:
|
16
18
|
- message_default_swift: Default
|
@@ -2,3 +2,4 @@ export { default as MessageDefault } from './_message_default.jsx'
|
|
2
2
|
export { default as MessageTimestamp } from './_message_timestamp.jsx'
|
3
3
|
export { default as MessageHover } from './_message_hover.jsx'
|
4
4
|
export { default as MessageMentions } from './_message_mentions.jsx'
|
5
|
+
export { default as MessageGrayscale } from './_message_grayscale.jsx'
|
@@ -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 &&
|
@@ -39,7 +39,10 @@ $flag-min-resolution: 192dpi;
|
|
39
39
|
color: $charcoal;
|
40
40
|
}
|
41
41
|
|
42
|
-
|
42
|
+
.iti__country-list {
|
43
|
+
min-width: $dropdown-min-width;
|
44
|
+
}
|
45
|
+
// iti-spacer-horizontal's default is 8px, or $space_xs
|
43
46
|
.iti__country-list .iti__flag, .iti__country-name {
|
44
47
|
margin-right: $space_xs;
|
45
48
|
}
|
@@ -57,7 +60,7 @@ $flag-min-resolution: 192dpi;
|
|
57
60
|
color: $focus_input_light;
|
58
61
|
}
|
59
62
|
|
60
|
-
.dropdown_open {
|
63
|
+
.dropdown_open:not(.error) {
|
61
64
|
.text_input {
|
62
65
|
border-color: $primary !important;
|
63
66
|
}
|
@@ -73,7 +76,7 @@ $flag-min-resolution: 192dpi;
|
|
73
76
|
}
|
74
77
|
|
75
78
|
.iti__divider {
|
76
|
-
border-bottom: 1px solid $border_light !important;
|
79
|
+
border-bottom: 1px solid $border_light !important;
|
77
80
|
}
|
78
81
|
|
79
82
|
.iti__selected-country-primary {
|
@@ -93,7 +96,7 @@ $flag-min-resolution: 192dpi;
|
|
93
96
|
justify-content: center;
|
94
97
|
align-items: center;
|
95
98
|
border-width: 0;
|
96
|
-
border-radius: $space_xxs;
|
99
|
+
border-radius: $space_xxs;
|
97
100
|
|
98
101
|
&[aria-expanded="true"] {
|
99
102
|
color: $primary_action;
|
@@ -196,7 +199,7 @@ $flag-min-resolution: 192dpi;
|
|
196
199
|
}
|
197
200
|
|
198
201
|
.iti__dropdown-content {
|
199
|
-
border-radius: $space_xs;
|
202
|
+
border-radius: $space_xs;
|
200
203
|
border: 1px solid $border_light !important;
|
201
204
|
position: absolute;
|
202
205
|
top: 100%;
|
@@ -225,12 +228,22 @@ $flag-min-resolution: 192dpi;
|
|
225
228
|
}
|
226
229
|
|
227
230
|
.iti__dropdown-content {
|
228
|
-
border-radius: $space_xs;
|
231
|
+
border-radius: $space_xs;
|
229
232
|
border: 1px solid $border_dark !important;
|
233
|
+
.iti__search-input {
|
234
|
+
background-color: $bg_dark_card;
|
235
|
+
&:hover {
|
236
|
+
background-color: $bg_dark_card;
|
237
|
+
}
|
238
|
+
&:active,
|
239
|
+
&:focus {
|
240
|
+
background-color: $card_dark;
|
241
|
+
}
|
242
|
+
}
|
230
243
|
}
|
231
244
|
|
232
245
|
.iti__divider {
|
233
|
-
border-bottom: 1px solid $border_dark !important;
|
246
|
+
border-bottom: 1px solid $border_dark !important;
|
234
247
|
}
|
235
248
|
|
236
249
|
.iti__country-list {
|
@@ -265,7 +278,7 @@ $flag-min-resolution: 192dpi;
|
|
265
278
|
color: $white;
|
266
279
|
}
|
267
280
|
}
|
268
|
-
|
281
|
+
|
269
282
|
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: $flag-min-resolution) {
|
270
283
|
.iti__flag {
|
271
284
|
background-image: url("https://unpkg.com/intl-tel-input@24.6.0/build/img/flags@2x.png");
|
@@ -37,6 +37,7 @@ type PhoneNumberInputProps = {
|
|
37
37
|
required?: boolean,
|
38
38
|
value?: string,
|
39
39
|
formatAsYouType?: boolean,
|
40
|
+
countrySearch?: boolean,
|
40
41
|
}
|
41
42
|
|
42
43
|
enum ValidationError {
|
@@ -91,6 +92,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
91
92
|
preferredCountries = [],
|
92
93
|
value = "",
|
93
94
|
formatAsYouType = false,
|
95
|
+
countrySearch = false,
|
94
96
|
} = props
|
95
97
|
|
96
98
|
const ariaProps = buildAriaProps(aria)
|
@@ -242,7 +244,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.MutableRefOb
|
|
242
244
|
autoInsertDialCode: false,
|
243
245
|
initialCountry: initialCountry || fallbackCountry,
|
244
246
|
onlyCountries,
|
245
|
-
countrySearch:
|
247
|
+
countrySearch: countrySearch,
|
246
248
|
fixDropdownWidth: false,
|
247
249
|
formatAsYouType: formatAsYouType,
|
248
250
|
hiddenInput: hiddenInputs ? () => ({
|