playbook_ui 14.26.0.pre.rc.0 → 15.0.0.pre.alpha.PLAY2316advancedtablerightsidedoubleborder10507
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 +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +10 -8
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.scss +60 -65
- data/app/pb_kits/playbook/pb_avatar/avatar.test.js +1 -1
- data/app/pb_kits/playbook/pb_background/_background.scss +3 -3
- data/app/pb_kits/playbook/pb_badge/_badge.scss +135 -29
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_body/_body.scss +108 -35
- data/app/pb_kits/playbook/pb_body/_body_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +17 -30
- data/app/pb_kits/playbook/pb_button/_button.scss +39 -31
- data/app/pb_kits/playbook/pb_button/_button.tsx +12 -12
- data/app/pb_kits/playbook/pb_button/_button_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_button/button.rb +11 -18
- data/app/pb_kits/playbook/pb_button/button.test.js +3 -3
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.scss +82 -73
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_dark.scss +32 -33
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +2 -2
- data/app/pb_kits/playbook/pb_caption/_caption.scss +100 -17
- data/app/pb_kits/playbook/pb_caption/_caption_mixin.scss +1 -8
- data/app/pb_kits/playbook/pb_card/_card.scss +116 -79
- data/app/pb_kits/playbook/pb_card/_card.tsx +26 -11
- data/app/pb_kits/playbook/pb_card/_card_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_card/card.rb +8 -7
- data/app/pb_kits/playbook/pb_card/card_header.rb +6 -2
- data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.scss +11 -2
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.scss +7 -7
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +1 -1
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +2 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +4 -4
- data/app/pb_kits/playbook/pb_copy_button/copy_button.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_currency/_currency.scss +124 -39
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.scss +16 -6
- data/app/pb_kits/playbook/pb_date/_date.scss +16 -18
- data/app/pb_kits/playbook/pb_date/date.test.js +506 -0
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.scss +1 -1
- data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +6 -4
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +48 -4
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_inline_styles.scss +12 -12
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +2 -2
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_time_selection_styles.scss +6 -5
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +29 -23
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +1 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.scss +1 -1
- data/app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.scss +66 -26
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.rb +1 -1
- data/app/pb_kits/playbook/pb_date_stacked/date_stacked.test.js +2 -2
- data/app/pb_kits/playbook/pb_date_time/_date_time.scss +8 -15
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +6 -7
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.scss +17 -14
- data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_detail/_detail.scss +86 -21
- data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +5 -1
- data/app/pb_kits/playbook/pb_dialog/_dialog.scss +330 -123
- data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +6 -8
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +2 -2
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb +16 -2
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.scss +10 -7
- data/app/pb_kits/playbook/pb_draggable/draggable.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/_dropdown.scss +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +6 -6
- data/app/pb_kits/playbook/pb_dropdown/index.js +3 -3
- data/app/pb_kits/playbook/pb_empty_state/_empty_state.scss +4 -4
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.scss +20 -9
- data/app/pb_kits/playbook/pb_file_upload/file_upload.html.erb +1 -1
- data/app/pb_kits/playbook/pb_filter/_filter.scss +8 -8
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.scss +65 -29
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +10 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_props_swift.md +3 -2
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +3 -3
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -1
- data/app/pb_kits/playbook/pb_flex/_flex.scss +106 -100
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +32 -25
- data/app/pb_kits/playbook/pb_flex/_flex_item.scss +146 -51
- data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +19 -8
- data/app/pb_kits/playbook/pb_flex/flex.rb +16 -16
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +6 -6
- data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +1 -0
- data/app/pb_kits/playbook/pb_form_group/_form_group.scss +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +381 -344
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +4 -4
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +8 -7
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +9 -2
- data/app/pb_kits/playbook/pb_gauge/_gauge.scss +5 -5
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.scss +1 -1
- data/app/pb_kits/playbook/pb_highlight/_highlight.scss +1 -1
- data/app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js +2 -2
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +13 -2
- data/app/pb_kits/playbook/pb_icon/icon.rb +9 -1
- data/app/pb_kits/playbook/pb_icon_button/_icon_button.scss +4 -4
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +40 -39
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.html.erb +1 -1
- data/app/pb_kits/playbook/pb_icon_circle/icon_circle.rb +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.scss +16 -15
- data/app/pb_kits/playbook/pb_image/_image.scss +41 -36
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.scss +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +3 -2
- data/app/pb_kits/playbook/pb_label_value/label_value.test.js +2 -2
- data/app/pb_kits/playbook/pb_layout/_layout.scss +336 -305
- data/app/pb_kits/playbook/pb_layout/_layout.tsx +14 -11
- data/app/pb_kits/playbook/pb_layout/item.rb +1 -7
- data/app/pb_kits/playbook/pb_layout/layout.rb +16 -25
- data/app/pb_kits/playbook/pb_layout/layout.test.js +3 -3
- data/app/pb_kits/playbook/pb_legend/_legend.scss +66 -16
- data/app/pb_kits/playbook/pb_legend/legend.test.js +1 -1
- data/app/pb_kits/playbook/pb_lightbox/lightbox.scss +4 -4
- data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_link/_link.scss +113 -19
- data/app/pb_kits/playbook/pb_list/_list.scss +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.scss +13 -11
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +3 -1
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.html.erb +5 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_variant.jsx +24 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_loading_inline/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.rb +11 -0
- data/app/pb_kits/playbook/pb_map/_map.scss +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_with_custom_button.jsx +1 -1
- data/app/pb_kits/playbook/pb_map/docs/_map_with_plugin.jsx +1 -1
- data/app/pb_kits/playbook/pb_message/_message.scss +21 -16
- data/app/pb_kits/playbook/pb_message/_message.tsx +1 -0
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +5 -12
- data/app/pb_kits/playbook/pb_message/message.html.erb +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.scss +6 -3
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +16 -15
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.scss +1 -1
- data/app/pb_kits/playbook/pb_nav/_bold_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_nav/_collapsible_nav.scss +1 -1
- data/app/pb_kits/playbook/pb_online_status/_online_status.scss +19 -15
- data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
- data/app/pb_kits/playbook/pb_online_status/online_status.rb +5 -4
- data/app/pb_kits/playbook/pb_online_status/online_status.test.js +2 -2
- data/app/pb_kits/playbook/pb_overlay/_overlay.scss +1 -1
- data/app/pb_kits/playbook/pb_overlay/overlay.rb +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +5 -2
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.scss +0 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/_pb_bar_graph.tsx +62 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.html.erb +35 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors.jsx +49 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_rails.md +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_colors_react.md +2 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.html.erb +38 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_default.jsx +51 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.html.erb +46 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.jsx +62 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_height.md +3 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.html.erb +47 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_horizontal.jsx +60 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.html.erb +25 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend.jsx +36 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_non_clickable.jsx +44 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.html.erb +100 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_legend_position.jsx +126 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.html.erb +32 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_negative_numbers.jsx +48 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.html.erb +68 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_secondary_y_axis.jsx +81 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.html.erb +31 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.jsx +42 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_spline.md +2 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.html.erb +35 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/_pb_bar_graph_stacked.jsx +51 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/example.yml +27 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/docs/index.js +11 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbBarGraphTheme.ts +106 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.html.erb +1 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pb_bar_graph.rb +28 -0
- data/app/pb_kits/playbook/pb_pb_bar_graph/pbbargraph.test.jsx +31 -0
- data/app/pb_kits/playbook/pb_person/_person.scss +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +1 -1
- data/app/pb_kits/playbook/pb_pill/_pill.scss +23 -21
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.scss +15 -13
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +108 -33
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.scss +1 -1
- data/app/pb_kits/playbook/pb_radio/_radio.scss +71 -52
- data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_react_hook.jsx +0 -3
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +4 -4
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.scss +81 -70
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +9 -1
- data/app/pb_kits/playbook/pb_section_separator/_section_separator_mixin.scss +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_color.jsx +3 -1
- data/app/pb_kits/playbook/pb_section_separator/section_separator.rb +7 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +4 -4
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +6 -2
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +17 -8
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +39 -29
- data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +2 -0
- data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.scss +8 -11
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list.test.js +2 -3
- data/app/pb_kits/playbook/pb_selectable_list/selectable_list_item.html.erb +2 -2
- data/app/pb_kits/playbook/pb_source/_source.scss +8 -8
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +1 -1
- data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +1 -1
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.scss +2 -2
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +5 -5
- data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.html.erb +41 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.jsx +80 -0
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_autocomplete.md +1 -0
- data/app/pb_kits/playbook/pb_text_input/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +2 -3
- data/app/pb_kits/playbook/pb_text_input/text_input.test.js +38 -0
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +6 -6
- data/app/pb_kits/playbook/pb_time/_time.scss +44 -17
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +44 -23
- data/app/pb_kits/playbook/pb_time_range_inline/time_range_inline.rb +1 -1
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.scss +5 -8
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.scss +16 -10
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -4
- data/app/pb_kits/playbook/pb_timestamp/timestamp.rb +1 -1
- data/app/pb_kits/playbook/pb_timestamp/timestamp.test.js +2 -2
- data/app/pb_kits/playbook/pb_title/_title.scss +44 -39
- data/app/pb_kits/playbook/pb_title/_title.tsx +17 -8
- data/app/pb_kits/playbook/pb_title/_title_mixin.scss +2 -2
- data/app/pb_kits/playbook/pb_title/title.rb +20 -10
- data/app/pb_kits/playbook/pb_title/title.test.js +4 -4
- data/app/pb_kits/playbook/pb_title_count/_title_count.scss +19 -8
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.scss +10 -11
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +4 -1
- data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +3 -4
- data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.test.jsx +3 -3
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.html.erb +1 -22
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb +2 -2
- data/app/pb_kits/playbook/pb_user/_user.scss +83 -33
- data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +14 -7
- data/app/pb_kits/playbook/pb_user/user.test.js +1 -1
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.scss +23 -8
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.scss +10 -10
- data/app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.test.jsx +3 -3
- data/dist/chunks/{_line_graph-CiVc-Cod.js → _line_graph-BBny-YYZ.js} +1 -1
- data/dist/chunks/_typeahead-CeyJ6-GF.js +6 -0
- data/dist/chunks/_weekday_stacked-CUUNTwVc.js +37 -0
- data/dist/chunks/{lib-CY5ZPzic.js → lib-BTs5acfO.js} +1 -1
- data/dist/chunks/{pb_form_validation-D3b0JKHH.js → pb_form_validation-CKkaQFX3.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +9 -7
- 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/forms/builder/form_field_builder.rb +9 -1
- data/lib/playbook/version.rb +2 -2
- metadata +46 -37
- data/app/pb_kits/playbook/pb_dialog/dialogHelper.js +0 -65
- data/app/pb_kits/playbook/pb_drawer/_close_icon.tsx +0 -25
- data/app/pb_kits/playbook/pb_drawer/_drawer.scss +0 -381
- data/app/pb_kits/playbook/pb_drawer/_drawer.tsx +0 -231
- data/app/pb_kits/playbook/pb_drawer/_drawer_context.tsx +0 -3
- data/app/pb_kits/playbook/pb_drawer/context.ts +0 -11
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.html.erb +0 -8
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_behavior.jsx +0 -41
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.html.erb +0 -33
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_borders.jsx +0 -78
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.html.erb +0 -3
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_breakpoints.jsx +0 -26
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.html.erb +0 -20
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_default.jsx +0 -59
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.html.erb +0 -24
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.jsx +0 -61
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_menu.md +0 -24
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.html.erb +0 -21
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.jsx +0 -54
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_overlay.md +0 -1
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.html.erb +0 -49
- data/app/pb_kits/playbook/pb_drawer/docs/_drawer_sizes.jsx +0 -99
- data/app/pb_kits/playbook/pb_drawer/docs/example.yml +0 -20
- data/app/pb_kits/playbook/pb_drawer/docs/index.js +0 -7
- data/app/pb_kits/playbook/pb_drawer/drawer.html.erb +0 -20
- data/app/pb_kits/playbook/pb_drawer/drawer.rb +0 -56
- data/app/pb_kits/playbook/pb_drawer/drawer.test.jsx +0 -81
- data/app/pb_kits/playbook/pb_drawer/hooks/useBreakpoint.tsx +0 -60
- data/app/pb_kits/playbook/pb_drawer/hooks/useDrawerAnimation.tsx +0 -21
- data/app/pb_kits/playbook/pb_drawer/index.js +0 -257
- data/dist/chunks/_typeahead-BQnvz-Ks.js +0 -6
- data/dist/chunks/_weekday_stacked-CX4YxAHz.js +0 -37
@@ -28,7 +28,11 @@ $pb_selectable_paddings: (
|
|
28
28
|
py: ("padding-top", "padding-bottom")
|
29
29
|
);
|
30
30
|
|
31
|
-
|
31
|
+
.pb_selectable_card_kit,
|
32
|
+
.pb_selectable_card_kit_checked_disabled,
|
33
|
+
.pb_selectable_card_kit_checked_enabled,
|
34
|
+
.pb_selectable_card_kit_disabled,
|
35
|
+
.pb_selectable_card_kit_enabled {
|
32
36
|
display: block;
|
33
37
|
margin-bottom: 0;
|
34
38
|
|
@@ -212,4 +216,4 @@ $pb_selectable_paddings: (
|
|
212
216
|
background: $error;
|
213
217
|
}
|
214
218
|
}
|
215
|
-
}
|
219
|
+
}
|
@@ -1,9 +1,13 @@
|
|
1
|
-
|
1
|
+
.pb_selectable_card_icon_kit,
|
2
|
+
.pb_selectable_card_icon_kit_checked_disabled,
|
3
|
+
.pb_selectable_card_icon_kit_checked_enabled,
|
4
|
+
.pb_selectable_card_icon_kit_disabled,
|
5
|
+
.pb_selectable_card_icon_kit_enabled {
|
2
6
|
|
3
7
|
text-align: center;
|
4
8
|
user-select: none;
|
5
9
|
|
6
|
-
.buffer >
|
10
|
+
.buffer > .pb_selectable_icon_kit::before {
|
7
11
|
content: '';
|
8
12
|
position: absolute;
|
9
13
|
width: 100%;
|
@@ -12,7 +16,7 @@
|
|
12
16
|
left: 0;
|
13
17
|
}
|
14
18
|
|
15
|
-
.buffer >
|
19
|
+
.buffer > .pb_selectable_icon_kit {
|
16
20
|
@media (hover:hover) {
|
17
21
|
&:hover * {
|
18
22
|
transition: transform $transition_short ease;
|
@@ -42,7 +46,8 @@
|
|
42
46
|
}
|
43
47
|
}
|
44
48
|
|
45
|
-
|
49
|
+
&.pb_selectable_card_icon_kit_disabled,
|
50
|
+
&.pb_selectable_card_icon_kit_checked_disabled {
|
46
51
|
opacity: $opacity_6;
|
47
52
|
cursor: not-allowed;
|
48
53
|
|
@@ -79,15 +84,19 @@
|
|
79
84
|
}
|
80
85
|
}
|
81
86
|
|
82
|
-
|
87
|
+
.pb_selectable_icon_kit {
|
83
88
|
margin-bottom: 0px;
|
84
89
|
}
|
85
90
|
|
86
|
-
|
91
|
+
.pb_body_kit_light {
|
87
92
|
margin-top: $space_xs;
|
88
93
|
}
|
89
94
|
|
90
|
-
|
95
|
+
.pb_selectable_card_kit,
|
96
|
+
.pb_selectable_card_kit_checked_disabled,
|
97
|
+
.pb_selectable_card_kit_checked_enabled,
|
98
|
+
.pb_selectable_card_kit_disabled,
|
99
|
+
.pb_selectable_card_kit_enabled {
|
91
100
|
margin-bottom: 0px !important;
|
92
101
|
}
|
93
|
-
}
|
102
|
+
}
|
@@ -1,6 +1,11 @@
|
|
1
1
|
@import "../tokens/transition";
|
2
2
|
|
3
|
-
|
3
|
+
.pb_selectable_icon_kit,
|
4
|
+
.pb_selectable_icon_kit_checked,
|
5
|
+
.pb_selectable_icon_kit_enabled,
|
6
|
+
.pb_selectable_icon_kit_disabled,
|
7
|
+
.pb_selectable_icon_kit_checked_enabled,
|
8
|
+
.pb_selectable_icon_kit_checked_disabled {
|
4
9
|
|
5
10
|
text-align: center;
|
6
11
|
cursor: pointer;
|
@@ -27,14 +32,6 @@
|
|
27
32
|
transition: color $transition_short ease;
|
28
33
|
}
|
29
34
|
|
30
|
-
&[class*=_disabled] {
|
31
|
-
opacity: $opacity_6;
|
32
|
-
cursor: not-allowed;
|
33
|
-
* {
|
34
|
-
cursor: not-allowed;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
|
38
35
|
input[type="checkbox"],
|
39
36
|
input[type="radio"] {
|
40
37
|
-webkit-appearance: none;
|
@@ -54,33 +51,46 @@
|
|
54
51
|
|
55
52
|
}
|
56
53
|
}
|
54
|
+
}
|
57
55
|
|
56
|
+
.pb_selectable_icon_kit_disabled,
|
57
|
+
.pb_selectable_icon_kit_checked_disabled {
|
58
|
+
opacity: $opacity_6;
|
59
|
+
cursor: not-allowed;
|
60
|
+
* {
|
61
|
+
cursor: not-allowed;
|
62
|
+
}
|
63
|
+
}
|
58
64
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
65
|
+
.pb_selectable_icon_kit.dark,
|
66
|
+
.pb_selectable_icon_kit_checked.dark,
|
67
|
+
.pb_selectable_icon_kit_enabled.dark,
|
68
|
+
.pb_selectable_icon_kit_disabled.dark,
|
69
|
+
.pb_selectable_icon_kit_checked_enabled.dark,
|
70
|
+
.pb_selectable_icon_kit_checked_disabled.dark {
|
71
|
+
input[type="checkbox"],
|
72
|
+
input[type="radio"] {
|
73
|
+
-webkit-appearance: none;
|
74
|
+
-moz-appearance: none;
|
75
|
+
display: none;
|
76
|
+
appearance: none;
|
77
|
+
transition: color $transition_short ease;
|
78
|
+
|
79
|
+
&:checked ~ label * {
|
66
80
|
transition: color $transition_short ease;
|
81
|
+
color: $active_dark !important;
|
82
|
+
}
|
67
83
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}
|
72
|
-
|
73
|
-
&:not(:checked) ~ label {
|
74
|
-
transition: color $transition_short ease;
|
75
|
-
color: $text_dk_lighter;
|
84
|
+
&:not(:checked) ~ label {
|
85
|
+
transition: color $transition_short ease;
|
86
|
+
color: $text_dk_lighter;
|
76
87
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
}
|
88
|
+
h4 {
|
89
|
+
transition: color $transition_short ease;
|
90
|
+
color: $text_dk_default;
|
81
91
|
}
|
82
92
|
}
|
83
|
-
|
93
|
+
}
|
84
94
|
}
|
85
95
|
|
86
96
|
|
@@ -82,6 +82,7 @@ const SelectableListItem = ({
|
|
82
82
|
<Checkbox
|
83
83
|
checked={checkedState}
|
84
84
|
id={id}
|
85
|
+
marginLeft="xs"
|
85
86
|
name={name}
|
86
87
|
onChange={handleChecked}
|
87
88
|
// eslint suppressor, text is needed to display on screen
|
@@ -98,6 +99,7 @@ const SelectableListItem = ({
|
|
98
99
|
{variant == "radio" && (
|
99
100
|
<>
|
100
101
|
<Radio
|
102
|
+
className="ml_xs"
|
101
103
|
defaultChecked={defaultChecked}
|
102
104
|
id={id}
|
103
105
|
label={label}
|
@@ -1,20 +1,17 @@
|
|
1
1
|
@import "../tokens/colors";
|
2
2
|
@import "../tokens/spacing";
|
3
3
|
|
4
|
-
|
4
|
+
.pb_selectable_list_kit {
|
5
5
|
margin-bottom: 0px;
|
6
|
-
|
6
|
+
|
7
|
+
.pb_item_kit,
|
8
|
+
.pb_item_kit_checked_item {
|
7
9
|
&:hover {
|
8
10
|
background-color: $bg_light;
|
9
11
|
}
|
10
|
-
&[class*=checked_item] {
|
11
|
-
background-color: $active_light;
|
12
|
-
}
|
13
|
-
}
|
14
|
-
[class^=pb_radio_kit] {
|
15
|
-
margin-left: $space_xs;
|
16
12
|
}
|
17
|
-
|
18
|
-
|
13
|
+
|
14
|
+
.checked_item {
|
15
|
+
background-color: $active_light;
|
19
16
|
}
|
20
|
-
}
|
17
|
+
}
|
@@ -35,7 +35,6 @@ const SelectableListRadio = () => {
|
|
35
35
|
value="1"
|
36
36
|
/>
|
37
37
|
<SelectableList.Item
|
38
|
-
defaultChecked
|
39
38
|
label="Medium"
|
40
39
|
name="radio"
|
41
40
|
value="2"
|
@@ -62,7 +61,7 @@ test("renders variant checkbox", () => {
|
|
62
61
|
test("renders variant radio", () => {
|
63
62
|
render(<SelectableListRadio />)
|
64
63
|
const kit = screen.getByTestId("selectable-list-test")
|
65
|
-
const
|
66
|
-
expect(
|
64
|
+
const radio = kit.querySelector("input[type='radio']")
|
65
|
+
expect(radio).toBeInTheDocument()
|
67
66
|
|
68
67
|
})
|
@@ -12,12 +12,12 @@
|
|
12
12
|
</span>
|
13
13
|
<% end %>
|
14
14
|
<% if object.variant == "radio"%>
|
15
|
-
<%= pb_rails("radio", props: { text: object.text, checked: object.checked, input_options: object.input_options } ) %>
|
15
|
+
<%= pb_rails("radio", props: { margin_left:"xs", text: object.text, checked: object.checked, input_options: object.input_options } ) %>
|
16
16
|
<% if content.present? %>
|
17
17
|
<%= content %>
|
18
18
|
<% end %>
|
19
19
|
<% else %>
|
20
|
-
<%= pb_rails("checkbox", props: { text: object.text, checked: object.checked, input_options: object.input_options } ) %>
|
20
|
+
<%= pb_rails("checkbox", props: { margin_left:"xs", text: object.text, checked: object.checked, input_options: object.input_options } ) %>
|
21
21
|
<% if content.present? %>
|
22
22
|
<%= content %>
|
23
23
|
<% end %>
|
@@ -1,29 +1,29 @@
|
|
1
1
|
@import "../tokens/spacing";
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
.pb_source_kit {
|
4
|
+
.pb__source_layout {
|
5
5
|
display: flex;
|
6
6
|
justify-content: flex-start;
|
7
7
|
align-items: flex-start;
|
8
8
|
}
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
.pb_icon_circle_kit_size_sm_default,
|
11
|
+
.pb_avatar_kit_size_sm {
|
12
12
|
margin-right: $space-sm;
|
13
13
|
}
|
14
14
|
|
15
|
-
|
15
|
+
.pb__source_content {
|
16
16
|
display: block;
|
17
17
|
flex-grow: 1;
|
18
18
|
|
19
|
-
|
19
|
+
.pb__source_value {
|
20
20
|
display: flex;
|
21
21
|
justify-content: flex-start;
|
22
22
|
align-items: baseline;
|
23
23
|
|
24
|
-
|
24
|
+
.pb_body_kit {
|
25
25
|
margin-right: $space-xs;
|
26
26
|
}
|
27
27
|
}
|
28
28
|
}
|
29
|
-
}
|
29
|
+
}
|
@@ -65,7 +65,7 @@ describe("Star Rating Kit", () => {
|
|
65
65
|
const stars = highlight.querySelectorAll(".pb_star_lg")
|
66
66
|
const count = stars.length
|
67
67
|
|
68
|
-
expect(title.className).toBe("
|
68
|
+
expect(title.className).toBe("pb_title_kit pb_title_2 pb_title_light pb_title_thin pr_sm pb_star_rating_number_lg")
|
69
69
|
expect(count).toBe(5)
|
70
70
|
})
|
71
71
|
})
|
@@ -2,7 +2,7 @@
|
|
2
2
|
@import "../tokens/titles";
|
3
3
|
@import "../tokens/colors";
|
4
4
|
|
5
|
-
|
5
|
+
.pb_text_input_kit {
|
6
6
|
.pb_text_input_kit_label {
|
7
7
|
margin-bottom: $space_xs;
|
8
8
|
display: block;
|
@@ -76,7 +76,7 @@
|
|
76
76
|
.text_input {
|
77
77
|
border-color: $error_dark;
|
78
78
|
}
|
79
|
-
|
79
|
+
.pb_body_kit_negative {
|
80
80
|
color: $error_dark;
|
81
81
|
}
|
82
82
|
}
|
@@ -100,7 +100,7 @@
|
|
100
100
|
}
|
101
101
|
&.error {
|
102
102
|
.text_input_wrapper {
|
103
|
-
|
103
|
+
.pb_body_kit_negative {
|
104
104
|
margin-top: $space_xs / 2;
|
105
105
|
}
|
106
106
|
// The `:not` here prevents error styling from affecting the country search input in the Phone Number Input Kit.
|
@@ -174,9 +174,9 @@
|
|
174
174
|
}
|
175
175
|
|
176
176
|
.text_input_wrapper_add_on {
|
177
|
-
& >
|
177
|
+
& > .pb_text_input_kit:not(:last-child) {
|
178
178
|
.text_input_wrapper_add_on input,
|
179
|
-
|
179
|
+
.pb_text_input_kit .text_input_wrapper_add_on .text_input {
|
180
180
|
border-bottom-right-radius: 0;
|
181
181
|
border-top-right-radius: 0;
|
182
182
|
border-right-width: 0;
|
@@ -36,6 +36,7 @@ type TextInputProps = {
|
|
36
36
|
alignment?: "right" | "left",
|
37
37
|
border?: boolean,
|
38
38
|
},
|
39
|
+
autoComplete?: boolean | string,
|
39
40
|
} & GlobalProps
|
40
41
|
|
41
42
|
const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>) => {
|
@@ -59,6 +60,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
59
60
|
type = 'text',
|
60
61
|
value = '',
|
61
62
|
children = null,
|
63
|
+
autoComplete = true,
|
62
64
|
} = props
|
63
65
|
|
64
66
|
const ariaProps = buildAriaProps(aria)
|
@@ -142,6 +144,7 @@ const TextInput = (props: TextInputProps, ref: React.LegacyRef<HTMLInputElement>
|
|
142
144
|
childInput ? React.cloneElement(children, { className: "text_input" }) :
|
143
145
|
(<input
|
144
146
|
{...domSafeProps(props)}
|
147
|
+
autoComplete={typeof autoComplete === "string" ? autoComplete : ( autoComplete ? undefined : "off" )}
|
145
148
|
className="text_input"
|
146
149
|
disabled={disabled}
|
147
150
|
id={id}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<%= pb_rails("text_input", props: {
|
2
|
+
autocomplete: false,
|
3
|
+
label: "autocomplete='off'",
|
4
|
+
name: "firstName",
|
5
|
+
placeholder: "Enter first name",
|
6
|
+
}) %>
|
7
|
+
|
8
|
+
<%= pb_rails("text_input", props: {
|
9
|
+
label: "no autocomplete attribute (let browser decide- basically 'on')",
|
10
|
+
name: "lastName",
|
11
|
+
placeholder: "Enter last name"
|
12
|
+
}) %>
|
13
|
+
|
14
|
+
<%= pb_rails("text_input", props: {
|
15
|
+
autocomplete: true,
|
16
|
+
label: "autocomplete='on'",
|
17
|
+
name: "phone",
|
18
|
+
type: "phone",
|
19
|
+
placeholder: "Enter phone number"
|
20
|
+
}) %>
|
21
|
+
|
22
|
+
<%= pb_rails("body", props: { margin_bottom: "sm" }) do %>
|
23
|
+
The following have the same autocomplete attributes (email), but have
|
24
|
+
different name attributes (email and emailAlt). Many browsers will
|
25
|
+
open autocomplete based on name attributes instead of autocomplete:
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<%= pb_rails("text_input", props: {
|
29
|
+
autocomplete: "email",
|
30
|
+
label: "autocomplete='email' name='email'",
|
31
|
+
name: "email",
|
32
|
+
placeholder: "Enter email address"
|
33
|
+
}) %>
|
34
|
+
|
35
|
+
<%= pb_rails("text_input", props: {
|
36
|
+
autocomplete: "email",
|
37
|
+
label: "autocomplete='email' name='emailAlt'",
|
38
|
+
name: "emailAlt",
|
39
|
+
type: "email",
|
40
|
+
placeholder: "Enter email address"
|
41
|
+
}) %>
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
|
3
|
+
import TextInput from '../../pb_text_input/_text_input'
|
4
|
+
import Body from '../../pb_body/_body'
|
5
|
+
|
6
|
+
|
7
|
+
const TextInputAutocomplete = (props) => {
|
8
|
+
const [formFields, setFormFields] = useState({
|
9
|
+
firstName: "",
|
10
|
+
lastName: "",
|
11
|
+
phone: "",
|
12
|
+
emailTest: "",
|
13
|
+
email: "",
|
14
|
+
});
|
15
|
+
|
16
|
+
const handleOnChangeFormField = ({ target }) => {
|
17
|
+
const { name, value } = target;
|
18
|
+
setFormFields({ ...formFields, [name]: value });
|
19
|
+
};
|
20
|
+
|
21
|
+
return (
|
22
|
+
<div>
|
23
|
+
<TextInput
|
24
|
+
autoComplete={false}
|
25
|
+
label="autocomplete='off'"
|
26
|
+
name="firstName"
|
27
|
+
onChange={handleOnChangeFormField}
|
28
|
+
placeholder="Enter first name"
|
29
|
+
value={formFields.firstName}
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
<TextInput
|
33
|
+
label="no autocomplete attribute (let browser decide- basically 'on')"
|
34
|
+
name="lastName"
|
35
|
+
onChange={handleOnChangeFormField}
|
36
|
+
placeholder="Enter last name"
|
37
|
+
value={formFields.lastName}
|
38
|
+
{...props}
|
39
|
+
/>
|
40
|
+
<TextInput
|
41
|
+
autoComplete
|
42
|
+
label="autocomplete='on'"
|
43
|
+
name="phone"
|
44
|
+
onChange={handleOnChangeFormField}
|
45
|
+
placeholder="Enter phone number"
|
46
|
+
type="phone"
|
47
|
+
value={formFields.phone}
|
48
|
+
{...props}
|
49
|
+
/>
|
50
|
+
<Body marginBottom="sm">
|
51
|
+
The following have the same autocomplete attributes (email), but have
|
52
|
+
different name attributes (email and emailAlt). Many browsers will
|
53
|
+
open autocomplete based on name attributes instead of autocomplete:
|
54
|
+
</Body>
|
55
|
+
<TextInput
|
56
|
+
autoComplete="email"
|
57
|
+
label="autocomplete='email' name='email'"
|
58
|
+
name="email"
|
59
|
+
onChange={handleOnChangeFormField}
|
60
|
+
placeholder="Enter email address"
|
61
|
+
type="email"
|
62
|
+
value={formFields.email}
|
63
|
+
{...props}
|
64
|
+
/>
|
65
|
+
<TextInput
|
66
|
+
autoComplete="email"
|
67
|
+
label="autocomplete='email' name='emailAlt'"
|
68
|
+
marginTop="sm"
|
69
|
+
name="emailTest"
|
70
|
+
onChange={handleOnChangeFormField}
|
71
|
+
placeholder="Enter email address"
|
72
|
+
type="email"
|
73
|
+
value={formFields.emailTest}
|
74
|
+
{...props}
|
75
|
+
/>
|
76
|
+
</div>
|
77
|
+
);
|
78
|
+
};
|
79
|
+
|
80
|
+
export default TextInputAutocomplete;
|
@@ -0,0 +1 @@
|
|
1
|
+
Set this prop to `false` or `"off"` to remove autocomplete from text inputs. You can also set it to a string, but browsers will often defer to other attributes like `name`.
|
@@ -9,6 +9,8 @@ examples:
|
|
9
9
|
- text_input_no_label: No Label
|
10
10
|
- text_input_options: Input Options
|
11
11
|
- text_input_mask: Mask
|
12
|
+
- text_input_autocomplete: Autocomplete
|
13
|
+
|
12
14
|
react:
|
13
15
|
- text_input_default: Default
|
14
16
|
- text_input_error: With Error
|
@@ -19,6 +21,7 @@ examples:
|
|
19
21
|
- text_input_no_label: No Label
|
20
22
|
- text_input_mask: Mask
|
21
23
|
- text_input_sanitize: Sanitized Masked Input
|
24
|
+
- text_input_autocomplete: Autocomplete
|
22
25
|
|
23
26
|
|
24
27
|
swift:
|
@@ -7,3 +7,4 @@ export { default as TextInputInline } from './_text_input_inline.jsx'
|
|
7
7
|
export { default as TextInputNoLabel } from './_text_input_no_label.jsx'
|
8
8
|
export { default as TextInputMask } from './_text_input_mask.jsx'
|
9
9
|
export { default as TextInputSanitize } from './_text_input_sanitize.jsx'
|
10
|
+
export { default as TextInputAutocomplete } from './_text_input_autocomplete.jsx'
|
@@ -15,8 +15,7 @@ module Playbook
|
|
15
15
|
"cvv" => '\d{3,4}',
|
16
16
|
}.freeze
|
17
17
|
|
18
|
-
prop :autocomplete,
|
19
|
-
default: true
|
18
|
+
prop :autocomplete, default: true
|
20
19
|
prop :disabled, type: Playbook::Props::Boolean,
|
21
20
|
default: false
|
22
21
|
prop :error
|
@@ -69,7 +68,7 @@ module Playbook
|
|
69
68
|
|
70
69
|
def all_input_options
|
71
70
|
{
|
72
|
-
autocomplete: autocomplete ? nil : "off",
|
71
|
+
autocomplete: autocomplete == true ? nil : (autocomplete.presence || "off"),
|
73
72
|
class: "text_input #{input_options.dig(:classname) || ''}",
|
74
73
|
data: validation_data,
|
75
74
|
disabled: disabled,
|
@@ -306,3 +306,41 @@ test('returns masked CVV value', () => {
|
|
306
306
|
|
307
307
|
expect(input.value).toBe('')
|
308
308
|
})
|
309
|
+
|
310
|
+
test('adds autocomplete string attribute', () => {
|
311
|
+
render(
|
312
|
+
<TextInput
|
313
|
+
autoComplete="family-name"
|
314
|
+
data={{ testid: testId }}
|
315
|
+
/>
|
316
|
+
)
|
317
|
+
|
318
|
+
const kit = screen.getByTestId(testId)
|
319
|
+
const input = within(kit).getByRole('textbox')
|
320
|
+
expect(input).toHaveAttribute("autocomplete", "family-name")
|
321
|
+
})
|
322
|
+
|
323
|
+
test('adds autocomplete "off" attribute', () => {
|
324
|
+
render(
|
325
|
+
<TextInput
|
326
|
+
autoComplete={false}
|
327
|
+
data={{ testid: testId }}
|
328
|
+
/>
|
329
|
+
)
|
330
|
+
|
331
|
+
const kit = screen.getByTestId(testId)
|
332
|
+
const input = within(kit).getByRole('textbox')
|
333
|
+
expect(input).toHaveAttribute("autocomplete", "off")
|
334
|
+
})
|
335
|
+
|
336
|
+
test('does not add autocomplete attribute otherwise', () => {
|
337
|
+
render(
|
338
|
+
<TextInput
|
339
|
+
data={{ testid: testId }}
|
340
|
+
/>
|
341
|
+
)
|
342
|
+
|
343
|
+
const kit = screen.getByTestId(testId)
|
344
|
+
const input = within(kit).getByRole('textbox')
|
345
|
+
expect(input).not.toHaveAttribute("autocomplete")
|
346
|
+
})
|
@@ -3,11 +3,11 @@
|
|
3
3
|
@import "../tokens/spacing";
|
4
4
|
@import "../tokens/titles";
|
5
5
|
|
6
|
-
|
6
|
+
.pb_textarea_kit {
|
7
7
|
margin-bottom: $space_sm;
|
8
8
|
|
9
|
-
|
10
|
-
margin-bottom: $space_xs;
|
9
|
+
.pb_caption_kit_md {
|
10
|
+
margin-bottom: $space_xs !important;
|
11
11
|
display: block;
|
12
12
|
}
|
13
13
|
textarea::placeholder,
|
@@ -59,8 +59,8 @@
|
|
59
59
|
}
|
60
60
|
|
61
61
|
&.error {
|
62
|
-
|
63
|
-
margin-top: $space_xs / 2;
|
62
|
+
.pb_body_kit_negative {
|
63
|
+
margin-top: $space_xs / 2 !important;
|
64
64
|
}
|
65
65
|
textarea {
|
66
66
|
border-color: $error;
|
@@ -81,4 +81,4 @@
|
|
81
81
|
.pb_caption_kit_xs {
|
82
82
|
text-align: right;
|
83
83
|
}
|
84
|
-
}
|
84
|
+
}
|