playbook_ui 14.24.0 → 14.25.0.pre.alpha.PLAY2361datepickerarrownav10273
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 +8 -2
- data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +1 -2
- data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +40 -6
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +57 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb +43 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +64 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +60 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx +57 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +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_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.html.erb +10 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +2 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.test.js +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +24 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +3 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_collapsible/__snapshots__/collapsible.test.js.snap +1 -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.tsx +5 -3
- data/app/pb_kits/playbook/pb_date/date.html.erb +6 -6
- data/app/pb_kits/playbook/pb_date/date.rb +2 -0
- data/app/pb_kits/playbook/pb_date/date.test.js +506 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +17 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date/docs/index.js +1 -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 +19 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker.html.erb +1 -0
- data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +15 -3
- 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/_dialog.scss +330 -123
- 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 +6 -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 +3 -4
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb +22 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx +43 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md +1 -0
- 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/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +2 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +7 -1
- data/app/pb_kits/playbook/pb_flex/_flex.scss +106 -100
- data/app/pb_kits/playbook/pb_flex/_flex.tsx +38 -28
- 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/docs/_flex_gap.html.erb +12 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +26 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_rails.md +11 -0
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap_react.md +11 -0
- data/app/pb_kits/playbook/pb_flex/flex.rb +22 -28
- data/app/pb_kits/playbook/pb_flex/flex_item.rb +6 -6
- 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.scss +4 -0
- 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.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_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_pagination/_pagination.test.jsx +212 -0
- data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +8 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx +112 -0
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md +3 -0
- data/app/pb_kits/playbook/pb_pagination/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_pagination/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +5 -2
- 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_phone_number_input/_phone_number_input.tsx +11 -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_table/styles/_vertical_border.scss +49 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +5 -5
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +15 -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/app/pb_kits/playbook/utilities/_gap.scss +12 -24
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +2 -0
- data/app/pb_kits/playbook/utilities/globalProps.ts +28 -4
- data/dist/chunks/{_line_graph-BLS62QjW.js → _line_graph-DHO-uYxy.js} +1 -1
- data/dist/chunks/_typeahead-_kMvPVfz.js +6 -0
- data/dist/chunks/_weekday_stacked-B1esXFeA.js +37 -0
- data/dist/chunks/{lib-DgtxnJqa.js → lib-C43ywQsO.js} +2 -2
- data/dist/chunks/{pb_form_validation-_NsOWfBS.js → pb_form_validation-Cqj3itLG.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/menu.yml +2 -8
- 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/classnames.rb +2 -0
- data/lib/playbook/spacing.rb +53 -1
- data/lib/playbook/version.rb +2 -2
- metadata +27 -37
- 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/app/pb_kits/playbook/pb_flex/docs/_flex_gap.md +0 -9
- data/dist/chunks/_typeahead-CZL6rvfn.js +0 -6
- data/dist/chunks/_weekday_stacked-Cv8-Sf6X.js +0 -37
@@ -8,7 +8,8 @@ $pb_multiple_users_border_size: 1px;
|
|
8
8
|
$pb_multiple_users_size: map-get($avatar-sizes, "xs");
|
9
9
|
$pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
|
10
10
|
|
11
|
-
|
11
|
+
.pb_multiple_users_kit,
|
12
|
+
.pb_multiple_users_kit_reverse {
|
12
13
|
display: inline-flex;
|
13
14
|
|
14
15
|
.multiple_users_badge_xs,
|
@@ -53,23 +54,23 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
|
|
53
54
|
border: $pb_multiple_users_border_size solid $white;
|
54
55
|
}
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
}
|
57
|
+
&:nth-child(1) { z-index: 0; }
|
58
|
+
&:nth-child(2) { z-index: 1; }
|
59
|
+
&:nth-child(3) { z-index: 2; }
|
60
|
+
&:nth-child(4) { z-index: 3; }
|
61
|
+
&:nth-child(5) { z-index: 4; }
|
61
62
|
}
|
63
|
+
}
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
+
.pb_multiple_users_kit_reverse {
|
66
|
+
flex-direction: row-reverse;
|
65
67
|
|
66
|
-
|
67
|
-
|
68
|
-
|
68
|
+
.pb_multiple_users_item {
|
69
|
+
margin-left: 0;
|
70
|
+
margin-right: $pb_multiple_users_overlap;
|
69
71
|
|
70
|
-
|
71
|
-
|
72
|
-
}
|
72
|
+
&:first-of-type {
|
73
|
+
margin-right: 0;
|
73
74
|
}
|
74
75
|
}
|
75
|
-
}
|
76
|
+
}
|
@@ -20,7 +20,8 @@ $pb_online_status_statuses: (
|
|
20
20
|
primary: $primary,
|
21
21
|
);
|
22
22
|
|
23
|
-
|
23
|
+
.pb_online_status_kit,
|
24
|
+
.pb_online_status_kit_no_border {
|
24
25
|
box-sizing: content-box;
|
25
26
|
width: $pb_online_status_size;
|
26
27
|
height: $pb_online_status_size;
|
@@ -36,23 +37,26 @@ $pb_online_status_statuses: (
|
|
36
37
|
&.dark {
|
37
38
|
border-color: $bg_dark;
|
38
39
|
}
|
40
|
+
}
|
39
41
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
42
|
+
// Status colors
|
43
|
+
@each $status_name, $status_value in $pb_online_status_statuses {
|
44
|
+
.pb_online_status_#{$status_name} {
|
45
|
+
background: $status_value;
|
44
46
|
}
|
47
|
+
}
|
45
48
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
49
|
+
// Sizes
|
50
|
+
@each $size, $value in $pb_online_status_sizes {
|
51
|
+
.pb_online_status_size_#{$size} {
|
52
|
+
width: $value;
|
53
|
+
height: $value;
|
54
|
+
flex-basis: $value;
|
52
55
|
}
|
56
|
+
}
|
53
57
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
+
// No border
|
59
|
+
.pb_online_status_kit_no_border {
|
60
|
+
border-width: 0;
|
61
|
+
border-style: none;
|
58
62
|
}
|
@@ -33,7 +33,7 @@ const OnlineStatus = (props: OnlineStatusProps) => {
|
|
33
33
|
const dataProps = buildDataProps(data)
|
34
34
|
const htmlProps = buildHtmlProps(htmlOptions)
|
35
35
|
const getBorder = noBorder ? 'no_border' : ''
|
36
|
-
const classes = classnames(buildCss('pb_online_status_kit',
|
36
|
+
const classes = classnames(buildCss('pb_online_status_kit', getBorder ), `${size && "pb_online_status_size_" + size}`, `pb_online_status_${status && status}`,globalProps(props), className)
|
37
37
|
|
38
38
|
return (
|
39
39
|
<div
|
@@ -14,11 +14,12 @@ module Playbook
|
|
14
14
|
prop :no_border, type: Playbook::Props::Boolean, default: false
|
15
15
|
|
16
16
|
def classname
|
17
|
-
|
18
|
-
|
17
|
+
class_names = ["pb_online_status_kit"]
|
18
|
+
class_names << "pb_online_status_no_border" if no_border
|
19
|
+
class_names << "pb_online_status_size_#{size}" if size
|
20
|
+
class_names << "pb_online_status_#{status}" if status
|
19
21
|
|
20
|
-
|
21
|
-
no_border ? "no_border" : nil
|
22
|
+
generate_classname(class_names.compact.join(" "), separator: " ")
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
@@ -11,7 +11,7 @@ test('renders online status with defaults', () => {
|
|
11
11
|
)
|
12
12
|
|
13
13
|
const kit = screen.getByTestId(testId)
|
14
|
-
expect(kit).toHaveClass('
|
14
|
+
expect(kit).toHaveClass('pb_online_status_kit pb_online_status_size_sm pb_online_status_offline')
|
15
15
|
})
|
16
16
|
|
17
17
|
test('renders online status with props', () => {
|
@@ -27,5 +27,5 @@ test('renders online status with props', () => {
|
|
27
27
|
)
|
28
28
|
|
29
29
|
const kit = screen.getByTestId(testId)
|
30
|
-
expect(kit).toHaveClass('
|
30
|
+
expect(kit).toHaveClass('pb_online_status_kit_no_border pb_online_status_size_lg pb_online_status_online dark additional_class')
|
31
31
|
})
|
@@ -0,0 +1,212 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { ensureAccessible, renderKit, render, fireEvent, screen } from '../utilities/test-utils'
|
3
|
+
import Pagination from './_pagination'
|
4
|
+
|
5
|
+
const defaultProps = {
|
6
|
+
data: { testid: 'pagination-test' },
|
7
|
+
total: 10,
|
8
|
+
current: 1,
|
9
|
+
range: 5,
|
10
|
+
}
|
11
|
+
|
12
|
+
describe('Pagination Component', () => {
|
13
|
+
test('returns namespaced class name', () => {
|
14
|
+
const kit = renderKit(Pagination, defaultProps)
|
15
|
+
expect(kit).toBeInTheDocument()
|
16
|
+
expect(kit).toHaveClass('pb_paginate')
|
17
|
+
})
|
18
|
+
|
19
|
+
it("should be accessible", async () => {
|
20
|
+
ensureAccessible(Pagination, defaultProps)
|
21
|
+
})
|
22
|
+
|
23
|
+
test('renders with default props', () => {
|
24
|
+
render(<Pagination {...defaultProps} />)
|
25
|
+
|
26
|
+
const pagination = screen.getByTestId('pagination-test')
|
27
|
+
expect(pagination).toBeInTheDocument()
|
28
|
+
expect(pagination).toHaveClass('pb_paginate')
|
29
|
+
})
|
30
|
+
|
31
|
+
test('renders pagination buttons correctly', () => {
|
32
|
+
render(<Pagination {...defaultProps} />)
|
33
|
+
|
34
|
+
expect(screen.getByText('1')).toBeInTheDocument()
|
35
|
+
expect(screen.getByText('2')).toBeInTheDocument()
|
36
|
+
expect(screen.getByText('3')).toBeInTheDocument()
|
37
|
+
expect(screen.getByText('4')).toBeInTheDocument()
|
38
|
+
expect(screen.getByText('5')).toBeInTheDocument()
|
39
|
+
|
40
|
+
// Check for navigation arrows by looking for the li elements with specific classes
|
41
|
+
const leftArrow = document.querySelector('.pagination-left')
|
42
|
+
const rightArrow = document.querySelector('.pagination-right')
|
43
|
+
expect(leftArrow).toBeInTheDocument()
|
44
|
+
expect(rightArrow).toBeInTheDocument()
|
45
|
+
})
|
46
|
+
|
47
|
+
test('highlights current page as active', () => {
|
48
|
+
render(<Pagination {...defaultProps}
|
49
|
+
current={3}
|
50
|
+
/>)
|
51
|
+
|
52
|
+
const activePage = screen.getByText('3')
|
53
|
+
expect(activePage).toHaveClass('active')
|
54
|
+
})
|
55
|
+
|
56
|
+
test('calls onChange when page is clicked', () => {
|
57
|
+
const mockOnChange = jest.fn()
|
58
|
+
render(<Pagination {...defaultProps}
|
59
|
+
onChange={mockOnChange}
|
60
|
+
/>)
|
61
|
+
|
62
|
+
const pageButton = screen.getByText('3')
|
63
|
+
fireEvent.click(pageButton)
|
64
|
+
|
65
|
+
expect(mockOnChange).toHaveBeenCalledWith(3)
|
66
|
+
})
|
67
|
+
|
68
|
+
test('disables left arrow on first page', () => {
|
69
|
+
render(<Pagination {...defaultProps}
|
70
|
+
current={1}
|
71
|
+
/>)
|
72
|
+
|
73
|
+
const leftArrow = document.querySelector('.pagination-left')
|
74
|
+
expect(leftArrow).toHaveClass('disabled')
|
75
|
+
})
|
76
|
+
|
77
|
+
test('disables right arrow on last page', () => {
|
78
|
+
render(<Pagination {...defaultProps}
|
79
|
+
current={10}
|
80
|
+
/>)
|
81
|
+
|
82
|
+
const rightArrow = document.querySelector('.pagination-right')
|
83
|
+
expect(rightArrow).toHaveClass('disabled')
|
84
|
+
})
|
85
|
+
|
86
|
+
test('does not render when total is 1 or less', () => {
|
87
|
+
const { container } = render(<Pagination {...defaultProps}
|
88
|
+
total={1}
|
89
|
+
/>)
|
90
|
+
|
91
|
+
expect(container.firstChild).toBeNull()
|
92
|
+
})
|
93
|
+
|
94
|
+
test('renders with custom className', () => {
|
95
|
+
render(<Pagination {...defaultProps}
|
96
|
+
className="custom-class"
|
97
|
+
/>)
|
98
|
+
|
99
|
+
const pagination = screen.getByTestId('pagination-test')
|
100
|
+
expect(pagination).toHaveClass('custom-class')
|
101
|
+
})
|
102
|
+
|
103
|
+
test('renders with custom id', () => {
|
104
|
+
render(<Pagination {...defaultProps}
|
105
|
+
id="custom-id"
|
106
|
+
/>)
|
107
|
+
|
108
|
+
const pagination = screen.getByTestId('pagination-test')
|
109
|
+
expect(pagination).toHaveAttribute('id', 'custom-id')
|
110
|
+
})
|
111
|
+
|
112
|
+
test('renders with custom range', () => {
|
113
|
+
render(<Pagination {...defaultProps}
|
114
|
+
range={3}
|
115
|
+
/>)
|
116
|
+
|
117
|
+
expect(screen.getByText('1')).toBeInTheDocument()
|
118
|
+
expect(screen.getByText('2')).toBeInTheDocument()
|
119
|
+
expect(screen.getByText('3')).toBeInTheDocument()
|
120
|
+
expect(screen.getByText('9')).toBeInTheDocument()
|
121
|
+
expect(screen.getByText('10')).toBeInTheDocument()
|
122
|
+
})
|
123
|
+
|
124
|
+
test('handles large number of pages correctly', () => {
|
125
|
+
render(<Pagination {...defaultProps}
|
126
|
+
current={50}
|
127
|
+
range={5}
|
128
|
+
total={100}
|
129
|
+
/>)
|
130
|
+
|
131
|
+
const pagination = screen.getByTestId('pagination-test')
|
132
|
+
expect(pagination).toBeInTheDocument()
|
133
|
+
expect(pagination).toHaveClass('pb_paginate')
|
134
|
+
|
135
|
+
|
136
|
+
expect(screen.getByText('48')).toBeInTheDocument()
|
137
|
+
expect(screen.getByText('49')).toBeInTheDocument()
|
138
|
+
expect(screen.getByText('50')).toBeInTheDocument()
|
139
|
+
expect(screen.getByText('51')).toBeInTheDocument()
|
140
|
+
expect(screen.getByText('52')).toBeInTheDocument()
|
141
|
+
})
|
142
|
+
|
143
|
+
test('syncs with external current prop changes', () => {
|
144
|
+
const { rerender } = render(<Pagination {...defaultProps}
|
145
|
+
current={1}
|
146
|
+
/>)
|
147
|
+
|
148
|
+
expect(screen.getByText('1')).toHaveClass('active')
|
149
|
+
|
150
|
+
rerender(<Pagination {...defaultProps}
|
151
|
+
current={3}
|
152
|
+
/>)
|
153
|
+
|
154
|
+
expect(screen.getByText('3')).toHaveClass('active')
|
155
|
+
expect(screen.getByText('1')).not.toHaveClass('active')
|
156
|
+
})
|
157
|
+
|
158
|
+
test('validates current prop is within valid range', () => {
|
159
|
+
const { rerender } = render(<Pagination {...defaultProps}
|
160
|
+
current={1}
|
161
|
+
/>)
|
162
|
+
|
163
|
+
rerender(<Pagination {...defaultProps}
|
164
|
+
current={0}
|
165
|
+
/>)
|
166
|
+
|
167
|
+
expect(screen.getByText('1')).toHaveClass('active')
|
168
|
+
|
169
|
+
rerender(<Pagination {...defaultProps}
|
170
|
+
current={15}
|
171
|
+
/>)
|
172
|
+
|
173
|
+
expect(screen.getByText('1')).toHaveClass('active')
|
174
|
+
})
|
175
|
+
|
176
|
+
test('handles htmlOptions props', () => {
|
177
|
+
const htmlOptions = { 'data-test': 'test-value' }
|
178
|
+
render(<Pagination {...defaultProps}
|
179
|
+
htmlOptions={htmlOptions}
|
180
|
+
/>)
|
181
|
+
|
182
|
+
const pagination = screen.getByTestId('pagination-test')
|
183
|
+
expect(pagination).toHaveAttribute('data-test', 'test-value')
|
184
|
+
})
|
185
|
+
|
186
|
+
test('renders first and last page buttons when range is small', () => {
|
187
|
+
render(<Pagination {...defaultProps}
|
188
|
+
current={10}
|
189
|
+
range={3}
|
190
|
+
total={20}
|
191
|
+
/>)
|
192
|
+
|
193
|
+
expect(screen.getByText('1')).toBeInTheDocument()
|
194
|
+
expect(screen.getByText('20')).toBeInTheDocument()
|
195
|
+
|
196
|
+
expect(screen.getByText('9')).toBeInTheDocument()
|
197
|
+
expect(screen.getByText('10')).toBeInTheDocument()
|
198
|
+
expect(screen.getByText('11')).toBeInTheDocument()
|
199
|
+
})
|
200
|
+
|
201
|
+
test('renders second and second-to-last page buttons when needed', () => {
|
202
|
+
render(<Pagination {...defaultProps}
|
203
|
+
current={10}
|
204
|
+
range={3}
|
205
|
+
total={20}
|
206
|
+
/>)
|
207
|
+
|
208
|
+
expect(screen.getByText('2')).toBeInTheDocument()
|
209
|
+
|
210
|
+
expect(screen.getByText('19')).toBeInTheDocument()
|
211
|
+
})
|
212
|
+
})
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState } from "react";
|
1
|
+
import React, { useState, useEffect } from "react";
|
2
2
|
import classnames from 'classnames'
|
3
3
|
import { GlobalProps, globalProps } from '../utilities/globalProps'
|
4
4
|
import { buildAriaProps, buildCss, buildDataProps, buildHtmlProps } from '../utilities/props'
|
@@ -123,6 +123,13 @@ const Pagination = ( props: PaginationProps) => {
|
|
123
123
|
|
124
124
|
return buttons;
|
125
125
|
};
|
126
|
+
|
127
|
+
// Sync internal state with external current prop
|
128
|
+
useEffect(() => {
|
129
|
+
if (current >= 1 && current <= total) {
|
130
|
+
setCurrentPage(current);
|
131
|
+
}
|
132
|
+
}, [current, total]);
|
126
133
|
|
127
134
|
|
128
135
|
const ariaProps = buildAriaProps(aria)
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import Flex from '../../pb_flex/_flex'
|
3
|
+
import Pagination from '../../pb_pagination/_pagination'
|
4
|
+
import Select from '../../pb_select/_select'
|
5
|
+
import Table from '../../pb_table/_table'
|
6
|
+
|
7
|
+
import { data } from "./data";
|
8
|
+
|
9
|
+
const PaginationExternalControl = (props) => {
|
10
|
+
const [totalItems, setTotalItems] = useState(20);
|
11
|
+
const [itemsPerPage, setItemsPerPage] = useState(5);
|
12
|
+
const [currentPage, setCurrentPage] = useState(1);
|
13
|
+
|
14
|
+
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
15
|
+
|
16
|
+
const handlePageChange = (page) => {
|
17
|
+
setCurrentPage(page);
|
18
|
+
};
|
19
|
+
|
20
|
+
const limitedData = data.slice(0, totalItems);
|
21
|
+
const startIndex = (currentPage - 1) * itemsPerPage;
|
22
|
+
const paginatedItems = limitedData.slice(startIndex, startIndex + itemsPerPage);
|
23
|
+
|
24
|
+
const handleTotalItemsChange = (event) => {
|
25
|
+
const value = Number(event.target.value);
|
26
|
+
setTotalItems(value);
|
27
|
+
setCurrentPage(1);
|
28
|
+
};
|
29
|
+
|
30
|
+
const handleItemsPerPageChange = (event) => {
|
31
|
+
const value = Number(event.target.value);
|
32
|
+
setItemsPerPage(value);
|
33
|
+
setCurrentPage(1);
|
34
|
+
};
|
35
|
+
|
36
|
+
return (
|
37
|
+
<>
|
38
|
+
<Flex gap="sm">
|
39
|
+
<Select
|
40
|
+
label="Total Items"
|
41
|
+
onChange={handleTotalItemsChange}
|
42
|
+
options={[
|
43
|
+
{ value: "5", text: "5" },
|
44
|
+
{ value: "10", text: "10" },
|
45
|
+
{ value: "20", text: "20" }
|
46
|
+
]}
|
47
|
+
size="sm"
|
48
|
+
value={String(totalItems)}
|
49
|
+
{...props}
|
50
|
+
/>
|
51
|
+
|
52
|
+
<Select
|
53
|
+
label="Items per Page"
|
54
|
+
onChange={handleItemsPerPageChange}
|
55
|
+
options={[
|
56
|
+
{ value: "3", text: "3" },
|
57
|
+
{ value: "5", text: "5" },
|
58
|
+
{ value: "10", text: "10" }
|
59
|
+
]}
|
60
|
+
size="sm"
|
61
|
+
value={String(itemsPerPage)}
|
62
|
+
{...props}
|
63
|
+
/>
|
64
|
+
</Flex>
|
65
|
+
|
66
|
+
<Pagination
|
67
|
+
current={currentPage}
|
68
|
+
key={`pagination-top-${currentPage}`}
|
69
|
+
marginBottom="xs"
|
70
|
+
onChange={handlePageChange}
|
71
|
+
range={5}
|
72
|
+
total={totalPages}
|
73
|
+
{...props}
|
74
|
+
/>
|
75
|
+
<Table
|
76
|
+
marginBottom="xs"
|
77
|
+
responsive="none"
|
78
|
+
size="sm"
|
79
|
+
{...props}
|
80
|
+
>
|
81
|
+
<Table.Head>
|
82
|
+
<Table.Row>
|
83
|
+
<Table.Header>{"Column 1"}</Table.Header>
|
84
|
+
<Table.Header>{"Column 2"}</Table.Header>
|
85
|
+
<Table.Header>{"Column 3"}</Table.Header>
|
86
|
+
<Table.Header>{"Column 4"}</Table.Header>
|
87
|
+
<Table.Header>{"Column 5"}</Table.Header>
|
88
|
+
</Table.Row>
|
89
|
+
</Table.Head>
|
90
|
+
<Table.Body>
|
91
|
+
{paginatedItems.map((row, index) => (
|
92
|
+
<Table.Row key={index}>
|
93
|
+
{row.map((cell, cellIndex) => (
|
94
|
+
<Table.Cell key={cellIndex}>{cell}</Table.Cell>
|
95
|
+
))}
|
96
|
+
</Table.Row>
|
97
|
+
))}
|
98
|
+
</Table.Body>
|
99
|
+
</Table>
|
100
|
+
<Pagination
|
101
|
+
current={currentPage}
|
102
|
+
key={`pagination-bottom-${currentPage}`}
|
103
|
+
onChange={handlePageChange}
|
104
|
+
range={5}
|
105
|
+
total={totalPages}
|
106
|
+
{...props}
|
107
|
+
/>
|
108
|
+
</>
|
109
|
+
)
|
110
|
+
}
|
111
|
+
|
112
|
+
export default PaginationExternalControl
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The Pagination component supports external control of the current page. This allows for programmatically reseting or changing the current page when filters or other criteria change, without needing to unmount and remount the component.
|
2
|
+
|
3
|
+
In this example, changing the "Total Items" or "Items per Page" dropdowns will automatically reset the pagination to page 1, demonstrating how external control works. The pagination component will update its internal state to reflect the new `current` prop value.
|
@@ -9,7 +9,11 @@
|
|
9
9
|
display: inline;
|
10
10
|
}
|
11
11
|
|
12
|
-
|
12
|
+
.show-below-xs,
|
13
|
+
.show-below-sm,
|
14
|
+
.show-below-md,
|
15
|
+
.show-below-lg,
|
16
|
+
.show-below-xl {
|
13
17
|
display: none;
|
14
18
|
}
|
15
19
|
@each $breakpoint_name, $breakpoint in $breakpoints {
|
@@ -74,4 +78,3 @@
|
|
74
78
|
}
|
75
79
|
}
|
76
80
|
}
|
77
|
-
|
@@ -197,13 +197,22 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
|
|
197
197
|
}
|
198
198
|
|
199
199
|
const validateMissingAreaCode = (itiInit: any) => {
|
200
|
-
if (!
|
200
|
+
if (!itiInit) return
|
201
201
|
if (itiInit.getValidationError() === ValidationError.MissingAreaCode) {
|
202
202
|
showFormattedError('missing area code')
|
203
203
|
return true
|
204
204
|
}
|
205
205
|
}
|
206
206
|
|
207
|
+
const validateRepeatCountryCode = (itiInit: any) => {
|
208
|
+
if (!itiInit) return
|
209
|
+
const countryDialCode = itiInit.getSelectedCountryData().dialCode;
|
210
|
+
if (unformatNumber(inputValue).startsWith(countryDialCode)) {
|
211
|
+
return showFormattedError('repeat country code')
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
|
207
216
|
const validateErrors = () => {
|
208
217
|
if (!hasTyped && !error) return
|
209
218
|
|
@@ -213,6 +222,7 @@ const PhoneNumberInput = (props: PhoneNumberInputProps, ref?: React.Ref<unknown>
|
|
213
222
|
if (validateTooShortNumber(itiRef.current)) return
|
214
223
|
if (validateUnhandledError(itiRef.current)) return
|
215
224
|
if (validateMissingAreaCode(itiRef.current)) return
|
225
|
+
if (validateRepeatCountryCode(itiRef.current)) return
|
216
226
|
}
|
217
227
|
|
218
228
|
const getCurrentSelectedData = (itiInit: any, inputValue: string) => {
|
@@ -5,30 +5,32 @@
|
|
5
5
|
|
6
6
|
$pb_pill_height: 22px;
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
// Base styles for all pill variations
|
9
|
+
@each $color_name, $color_value in $status_color_text {
|
10
|
+
.pb_pill_kit_#{$color_name}_lowercase,
|
11
|
+
.pb_pill_kit_#{$color_name}_none {
|
12
|
+
display: inline-flex;
|
13
|
+
justify-content: center;
|
14
|
+
align-items: center;
|
15
|
+
padding: 0 $space-sm/1.8;
|
16
|
+
height: $pb_pill_height;
|
17
|
+
border-radius: $pb_pill_height/2;
|
18
|
+
white-space: nowrap;
|
19
|
+
background: rgba($color_value, $opacity-1);
|
16
20
|
|
17
|
-
|
18
|
-
|
21
|
+
.pb_pill_text {
|
22
|
+
color: $color_value !important;
|
23
|
+
}
|
19
24
|
}
|
25
|
+
}
|
20
26
|
|
21
|
-
|
22
|
-
|
27
|
+
// Text transform specific styles
|
28
|
+
@each $color_name, $color_value in $status_color_text {
|
29
|
+
.pb_pill_kit_#{$color_name}_lowercase {
|
30
|
+
text-transform: lowercase;
|
23
31
|
}
|
24
32
|
|
25
|
-
|
26
|
-
|
27
|
-
background: rgba($color_value, $opacity-1);
|
28
|
-
|
29
|
-
.pb_pill_text {
|
30
|
-
color: $color_value !important;
|
31
|
-
}
|
32
|
-
}
|
33
|
+
.pb_pill_kit_#{$color_name}_none {
|
34
|
+
text-transform: none;
|
33
35
|
}
|
34
|
-
}
|
36
|
+
}
|