playbook_ui 13.33.1.pre.alpha.PLAY14143340 → 13.33.1.pre.alpha.play1407statvaluekitinconsistencies3352
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/_playbook.scss +17 -17
- data/app/pb_kits/playbook/index.js +151 -0
- data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_expanded_control.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sort_control.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_badge_component_overlay.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_circle_icon_component_overlay.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_monogram.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_no_image.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_status.jsx +1 -1
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +3 -3
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +2 -0
- data/app/pb_kits/playbook/pb_background/_background.tsx +7 -13
- data/app/pb_kits/playbook/pb_background/background.html.erb +2 -11
- data/app/pb_kits/playbook/pb_background/docs/_background_category.jsx +2 -2
- data/app/pb_kits/playbook/pb_background/docs/_background_gradient.jsx +1 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_image.jsx +2 -2
- data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +1 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_background/docs/_background_status.jsx +2 -2
- data/app/pb_kits/playbook/pb_background/docs/_background_status_subtle.jsx +2 -2
- data/app/pb_kits/playbook/pb_background/docs/_background_white.jsx +1 -1
- data/app/pb_kits/playbook/pb_badge/_badge.scss +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/barGraphSettings.js +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +1 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_body/_body.scss +1 -1
- data/app/pb_kits/playbook/pb_body/body.html.erb +1 -6
- data/app/pb_kits/playbook/pb_body/docs/_body_articles.jsx +1 -1
- data/app/pb_kits/playbook/pb_body/docs/_body_block.jsx +1 -1
- data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +1 -1
- data/app/pb_kits/playbook/pb_body/docs/_body_styled.jsx +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +2 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.scss +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.html.erb +1 -6
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.html.erb +1 -6
- data/app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.test.js +1 -1
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_block_content.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_form.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_full_width.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_hover.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_icon_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_link.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_reaction.jsx +1 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +2 -0
- data/app/pb_kits/playbook/pb_button_toolbar/button_toolbar.test.js +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +1 -1
- data/app/pb_kits/playbook/pb_caption/caption.html.erb +1 -6
- data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +1 -1
- data/app/pb_kits/playbook/pb_caption/docs/_caption_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx +1 -1
- data/app/pb_kits/playbook/pb_card/_card.scss +1 -1
- data/app/pb_kits/playbook/pb_card/card.html.erb +1 -7
- data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.jsx +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_icon_button/_circle_icon_button.scss +3 -3
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/_collapsible.scss +1 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_color.jsx +3 -3
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main.jsx +31 -32
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_rails.html.erb +3 -2
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon.jsx +33 -32
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_custom_main_with_icon_rails.html.erb +3 -7
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_icons.jsx +2 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_collapsible/docs/_collapsible_state.jsx +10 -1
- data/app/pb_kits/playbook/pb_contact/_contact.tsx +25 -19
- data/app/pb_kits/playbook/pb_contact/contact.html.erb +6 -3
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_unstyled.jsx +1 -1
- data/app/pb_kits/playbook/pb_dashboard/commonSettings.js +2 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +2 -2
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +2 -2
- data/app/pb_kits/playbook/pb_dashboard_value/dashboardValueSettings.ts +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_alignment.jsx +1 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/docs/_date_unstyled.jsx +1 -1
- data/app/pb_kits/playbook/pb_date/docs/_date_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_close.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_input_styles.scss +1 -1
- data/app/pb_kits/playbook/pb_date_picker/sass_partials/_overrides.scss +4 -2
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.scss +4 -4
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +71 -64
- data/app/pb_kits/playbook/pb_date_range_stacked/docs/_date_range_stacked_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.scss +4 -4
- data/app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.test.js +1 -1
- data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_detail/detail.html.erb +1 -6
- data/app/pb_kits/playbook/pb_detail/docs/_detail_bold.jsx +1 -1
- data/app/pb_kits/playbook/pb_detail/docs/_detail_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_detail/docs/_detail_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_detail/docs/_detail_styled.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog.html.erb +1 -6
- data/app/pb_kits/playbook/pb_dialog/dialog.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/dialog_body.html.erb +1 -6
- data/app/pb_kits/playbook/pb_dialog/dialog_footer.html.erb +2 -5
- data/app/pb_kits/playbook/pb_dialog/dialog_header.html.erb +1 -6
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_compound_components.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_separators.jsx +3 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_should_close_on_overlay.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes.jsx +2 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_stacked_alert.jsx +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +29 -30
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +1 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +1 -1
- 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/docs/_dropdown_blank_selection.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_and_custom_display.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_hook.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.html.erb +7 -3
- data/app/pb_kits/playbook/pb_dropdown/dropdown.rb +1 -1
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_dropdown/index.js +37 -31
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +3 -2
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_description.jsx +3 -2
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx +3 -2
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx +3 -2
- data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx +4 -3
- data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_max_width.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_only.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx +1 -1
- data/app/pb_kits/playbook/pb_filter/filter.test.js +1 -1
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_align.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_gap.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_item_align_self.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_item_example.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_justify.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_reverse.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/docs/_flex_wrap.jsx +1 -1
- data/app/pb_kits/playbook/pb_flex/flex.html.erb +1 -5
- data/app/pb_kits/playbook/pb_form_group/form_group.test.js +1 -1
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.scss +9 -5
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.test.jsx +11 -0
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +53 -17
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_icon.html.erb +5 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_icon.jsx +19 -0
- data/app/pb_kits/playbook/pb_form_pill/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_form_pill/docs/index.js +1 -1
- data/app/pb_kits/playbook/pb_form_pill/form_pill.html.erb +16 -9
- data/app/pb_kits/playbook/pb_form_pill/form_pill.rb +6 -1
- data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +2 -2
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +1 -1
- data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/docs/_hashtag_link.jsx +1 -1
- data/app/pb_kits/playbook/pb_hashtag/hashtag.html.erb +1 -6
- data/app/pb_kits/playbook/pb_hashtag/hashtag.test.js +1 -1
- data/app/pb_kits/playbook/pb_highlight/highlight.html.erb +1 -5
- data/app/pb_kits/playbook/pb_home_address_street/home_address_street.html.erb +1 -5
- data/app/pb_kits/playbook/pb_home_address_street/home_adress_street.test.js +1 -1
- data/app/pb_kits/playbook/pb_icon/_icon.scss +17 -0
- data/app/pb_kits/playbook/pb_icon/_icon.tsx +3 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.html.erb +5 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.jsx +34 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_color.md +1 -0
- data/app/pb_kits/playbook/pb_icon/docs/_icon_custom.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_icon/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_icon/icon.rb +9 -1
- data/app/pb_kits/playbook/pb_icon/icon.test.js +22 -9
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.scss +2 -2
- data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.scss +0 -11
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_sizes.jsx +1 -1
- data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_vertical.jsx +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.scss +1 -1
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details.jsx +1 -1
- data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_examples.jsx +1 -1
- data/app/pb_kits/playbook/pb_layout/layout.test.js +1 -1
- data/app/pb_kits/playbook/pb_legend/docs/_legend_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_legend/docs/_legend_custom_colors.jsx +1 -1
- data/app/pb_kits/playbook/pb_legend/docs/_legend_prefix.jsx +1 -1
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slide.tsx +2 -0
- data/app/pb_kits/playbook/pb_lightbox/Carousel/Slides.tsx +2 -0
- data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -0
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_compound_component.jsx +2 -1
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_current_photo.jsx +2 -1
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_custom_header.jsx +2 -1
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_default.jsx +2 -1
- data/app/pb_kits/playbook/pb_lightbox/docs/_lightbox_multiple.jsx +2 -1
- data/app/pb_kits/playbook/pb_lightbox/lightbox.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_position.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/lineGraphSettings.js +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_map/map.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_map/pbMapTheme.ts +1 -1
- data/app/pb_kits/playbook/pb_message/_message.tsx +2 -0
- data/app/pb_kits/playbook/pb_message/_message_mixins.scss +1 -1
- data/app/pb_kits/playbook/pb_message/docs/_message_timestamp.jsx +1 -1
- data/app/pb_kits/playbook/pb_multi_level_select/multi_level_select.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.scss +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +2 -0
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse.jsx +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_custom.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_item_spacing.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_collapsible_nav_with_all_options.jsx +1 -1
- data/app/pb_kits/playbook/pb_nav/docs/_nav_with_font_control.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/overlay.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.scss +3 -3
- data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +2 -0
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_breached.jsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_common.jsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_confirmation.jsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_meter_settings.jsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/docs/_passphrase_strength_change.jsx +1 -1
- data/app/pb_kits/playbook/pb_passphrase/passphrase.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.scss +1 -2
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_access_input_element.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_clear_field.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_initial_country.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_only_countries.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_preferred_countries.jsx +1 -1
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_validation.jsx +1 -1
- data/app/pb_kits/playbook/pb_pill/_pill.scss +2 -2
- data/app/pb_kits/playbook/pb_popover/docs/_popover_actionable_content.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_close.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index.jsx +1 -1
- data/app/pb_kits/playbook/pb_popover/popover.test.js +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.scss +2 -2
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_align.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_flex.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_muted.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_value.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_progress_simple/docs/_progress_simple_width.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_alignment.jsx +1 -1
- data/app/pb_kits/playbook/pb_radio/docs/_radio_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.scss +2 -2
- data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +8 -9
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_attributes.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_more_extensions.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx +4 -5
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_bottom.jsx +1 -1
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_toolbar_disabled.jsx +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_children.jsx +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_dashed.jsx +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_line.jsx +1 -1
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/_select.scss +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_compact.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +4 -4
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +2 -0
- data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_card/selectable_card.test.js +1 -1
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -0
- data/app/pb_kits/playbook/pb_selectable_list/docs/_selectable_list_checkbox.jsx +1 -1
- data/app/pb_kits/playbook/pb_selectable_list/docs/_selectable_list_radio.jsx +1 -1
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +132 -201
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +28 -33
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_interactive.jsx +14 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_star_rating/stars/utils.tsx +81 -0
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_display.tsx +56 -0
- data/app/pb_kits/playbook/pb_star_rating/subcomponents/_star_rating_interactive.tsx +64 -0
- data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit.jsx +1 -1
- data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit_two.jsx +1 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.scss +1 -1
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +3 -3
- data/app/pb_kits/playbook/pb_textarea/_textarea.scss +1 -1
- data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.scss +4 -4
- data/app/pb_kits/playbook/pb_time_range_inline/docs/_time_range_inline_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +2 -2
- data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_unstyled.jsx +1 -1
- data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -0
- data/app/pb_kits/playbook/pb_toggle/_toggle.scss +5 -5
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom.jsx +3 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_custom_radio.jsx +3 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_default.jsx +3 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_disabled.jsx +3 -1
- data/app/pb_kits/playbook/pb_toggle/docs/_toggle_name.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default_react.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_delay.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_icon.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_interaction.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_margin.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_show_tooltip_react.jsx +3 -1
- data/app/pb_kits/playbook/pb_tooltip/tooltip.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_async_createable.jsx +3 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx +3 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_inline.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_multi_kit.jsx +2 -0
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +5 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +3 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +21 -18
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_custom_options.jsx +31 -24
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +23 -20
- data/app/pb_kits/playbook/pb_user/docs/_user_block_content_subtitle_react.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_subtitle.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_text_only.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size.jsx +1 -1
- data/app/pb_kits/playbook/pb_user/docs/_user_with_territory.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +1 -1
- data/app/pb_kits/playbook/pb_walkthrough/walkthrough.test.jsx +1 -1
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +3 -2
- data/app/pb_kits/playbook/playbook-doc.js +215 -0
- data/app/pb_kits/playbook/playbook-rails-react-bindings.js +45 -0
- data/app/pb_kits/playbook/playbook-rails.js +51 -0
- data/app/pb_kits/playbook/tokens/exports/{_border_radius.module.scss → _border_radius.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_colors.module.scss → _colors.scss} +1 -1
- data/app/pb_kits/playbook/tokens/exports/{_line_height.module.scss → _line_height.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_opacity.module.scss → _opacity.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_positioning.module.scss → _positioning.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_screen_sizes.module.scss → _screen_sizes.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_shadows.module.scss → _shadows.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_spacing.module.scss → _spacing.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/{_typography.module.scss → _typography.scss} +0 -0
- data/app/pb_kits/playbook/tokens/exports/exports.d.ts +0 -1
- data/app/pb_kits/playbook/utilities/_hover.scss +5 -5
- data/app/pb_kits/playbook/utilities/_line_height.scss +1 -1
- data/app/pb_kits/playbook/utilities/_shadow.scss +1 -1
- data/dist/playbook-rails.js +59 -1
- data/dist/reset.css +1 -1
- data/lib/playbook/engine.rb +0 -2
- data/lib/playbook/version.rb +1 -1
- metadata +26 -23
- data/app/pb_kits/playbook/pb_rich_text_editor/types.d.ts +0 -1
- data/app/pb_kits/playbook/utilities/globalPropNames.mjs +0 -50
- data/dist/chunks/_typeahead.js +0 -22
- data/dist/chunks/_weekday_stacked.js +0 -45
- data/dist/chunks/lazysizes.js +0 -1
- data/dist/chunks/pb_form_validation.js +0 -1
- data/dist/chunks/vendor.js +0 -1
- data/dist/playbook-doc.js +0 -1
- data/dist/playbook-rails-react-bindings.js +0 -1
- data/dist/playbook.css +0 -4
- /data/app/pb_kits/playbook/pb_textarea/{index.ts → index.tsx} +0 -0
- /data/app/pb_kits/playbook/tokens/exports/{_scale.module.scss → _scale.scss} +0 -0
@@ -28,7 +28,7 @@ $pb_selectable_card_border: 2px;
|
|
28
28
|
padding: $space_sm;
|
29
29
|
margin-bottom: $space_sm;
|
30
30
|
cursor: pointer;
|
31
|
-
outline: 1px solid transparent;
|
31
|
+
outline: 1px solid transparent;
|
32
32
|
|
33
33
|
@media (hover:hover) {
|
34
34
|
&:hover {
|
@@ -43,7 +43,7 @@ $pb_selectable_card_border: 2px;
|
|
43
43
|
align-items: center;
|
44
44
|
height: $pb_selectable_card_indicator_size;
|
45
45
|
width: $pb_selectable_card_indicator_size;
|
46
|
-
border-radius:
|
46
|
+
border-radius: ($pb_selectable_card_indicator_size/2) + ($pb_selectable_card_border/2);
|
47
47
|
border-width: $pb_selectable_card_border;
|
48
48
|
border-style: solid;
|
49
49
|
border-color: $white;
|
@@ -52,8 +52,8 @@ $pb_selectable_card_border: 2px;
|
|
52
52
|
font-size: $font_smaller;
|
53
53
|
text-align: center;
|
54
54
|
position: absolute;
|
55
|
-
top: -(
|
56
|
-
right: -(
|
55
|
+
top: -($pb_selectable_card_indicator_size/2);
|
56
|
+
right: -($pb_selectable_card_indicator_size/2);
|
57
57
|
opacity: 0;
|
58
58
|
}
|
59
59
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from 'react'
|
2
2
|
import { render, screen } from '../utilities/test-utils'
|
3
3
|
import SelectableCard from './_selectable_card'
|
4
|
-
import { Body, Title, Image } from '
|
4
|
+
import { Body, Title, Image } from '../'
|
5
5
|
|
6
6
|
const SelectableCardMultiSelect = () => {
|
7
7
|
const [selected, setSelected] = useState(true)
|
@@ -7,217 +7,148 @@ import { globalProps, GlobalProps } from '../utilities/globalProps'
|
|
7
7
|
import Caption from '../pb_caption/_caption'
|
8
8
|
import Body from '../pb_body/_body'
|
9
9
|
import Title from '../pb_title/_title'
|
10
|
-
import
|
11
|
-
import
|
10
|
+
import StarRatingInteractive from "./subcomponents/_star_rating_interactive"
|
11
|
+
import StarRatingDisplay from "./subcomponents/_star_rating_display"
|
12
12
|
|
13
13
|
type StarRatingProps = {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
aria?: { [key: string]: string },
|
15
|
+
className?: string,
|
16
|
+
data?: { [key: string]: string },
|
17
|
+
dark?: boolean,
|
18
|
+
fixedWidth?: boolean,
|
19
|
+
layoutOption?: "default" | "number" | "onestar",
|
20
|
+
htmlOptions?: { [key: string]: string | number | boolean | (() => void) },
|
21
|
+
icon?: string,
|
22
|
+
id?: string,
|
23
|
+
rating: number,
|
24
|
+
denominator: number,
|
25
|
+
colorOption?: "yellow" | "primary" | "subtle" | "outline",
|
26
|
+
backgroundType?: "fill" | "outline",
|
27
|
+
size?: "xs" | "sm" | "md" | "lg",
|
28
|
+
variant?: "display" | "interactive",
|
29
|
+
onClick?: (interactiveStarValue: number) => void,
|
28
30
|
} & GlobalProps
|
29
31
|
|
30
32
|
const StarRating = (props: StarRatingProps) => {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
const {
|
34
|
+
aria = {},
|
35
|
+
className,
|
36
|
+
data = {},
|
37
|
+
dark = false,
|
38
|
+
layoutOption = "default",
|
39
|
+
htmlOptions = {},
|
40
|
+
id,
|
41
|
+
rating = 0,
|
42
|
+
denominator = 5,
|
43
|
+
colorOption = "yellow",
|
44
|
+
backgroundType = "fill",
|
45
|
+
size = "sm",
|
46
|
+
variant = "display",
|
47
|
+
onClick,
|
48
|
+
} = props
|
49
|
+
const classes = classnames(buildCss('pb_star_rating_kit'), globalProps(props), className)
|
50
|
+
const ariaProps = buildAriaProps(aria)
|
51
|
+
const dataProps = buildDataProps(data)
|
52
|
+
const htmlProps = buildHtmlProps(htmlOptions)
|
53
|
+
const oneDecimalRating = rating.toFixed(1)
|
45
54
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
return (
|
87
|
-
<div
|
88
|
-
{...ariaProps}
|
89
|
-
{...dataProps}
|
90
|
-
{...htmlProps}
|
91
|
-
className={classes}
|
92
|
-
id={id}
|
93
|
-
>
|
94
|
-
{layoutOption === "number" && (
|
95
|
-
<>
|
96
|
-
{size === 'xs' && (
|
97
|
-
<Caption
|
98
|
-
text={oneDecimalRating.toString()}
|
99
|
-
size="xs"
|
100
|
-
paddingRight="xs"
|
101
|
-
dark={dark}
|
102
|
-
className="pb_star_rating_number_sm"
|
103
|
-
/>
|
104
|
-
)}
|
105
|
-
{size === 'sm' && (
|
106
|
-
<Caption
|
107
|
-
text={oneDecimalRating.toString()}
|
108
|
-
size="xs"
|
109
|
-
paddingRight="xs"
|
110
|
-
dark={dark}
|
111
|
-
className="pb_star_rating_number_sm"
|
112
|
-
/>
|
55
|
+
return (
|
56
|
+
<div
|
57
|
+
{...ariaProps}
|
58
|
+
{...dataProps}
|
59
|
+
{...htmlProps}
|
60
|
+
className={classes}
|
61
|
+
id={id}
|
62
|
+
>
|
63
|
+
{layoutOption === "number" && (
|
64
|
+
<>
|
65
|
+
{(size === 'xs' || size === 'sm') && (
|
66
|
+
<Caption
|
67
|
+
className="pb_star_rating_number_sm"
|
68
|
+
dark={dark}
|
69
|
+
paddingRight="xs"
|
70
|
+
size="xs"
|
71
|
+
text={oneDecimalRating.toString()}
|
72
|
+
/>
|
73
|
+
)}
|
74
|
+
{size === 'md' && (
|
75
|
+
<Body
|
76
|
+
className="pb_star_rating_number_md"
|
77
|
+
color="light"
|
78
|
+
dark={dark}
|
79
|
+
paddingRight="xs"
|
80
|
+
text={oneDecimalRating.toString()}
|
81
|
+
/>
|
82
|
+
)}
|
83
|
+
{size === 'lg' && (
|
84
|
+
<Title
|
85
|
+
bold={false}
|
86
|
+
className="pb_star_rating_number_lg"
|
87
|
+
color="light"
|
88
|
+
dark={dark}
|
89
|
+
paddingRight="sm"
|
90
|
+
size={2}
|
91
|
+
text={oneDecimalRating.toString()}
|
92
|
+
/>
|
93
|
+
)}
|
94
|
+
</>
|
113
95
|
)}
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
text={oneDecimalRating.toString()}
|
126
|
-
size={2}
|
127
|
-
paddingRight="sm"
|
128
|
-
dark={dark}
|
129
|
-
color="light"
|
130
|
-
bold={false}
|
131
|
-
className="pb_star_rating_number_lg"
|
132
|
-
/>
|
133
|
-
)}
|
134
|
-
</>
|
135
|
-
)}
|
136
|
-
<Flex className="star_flex_area">
|
137
|
-
{[...Array(activeStars)].map((_, index) => (
|
138
|
-
<React.Fragment key={index}>
|
139
|
-
{colorOption === 'yellow' && (
|
140
|
-
<Icon
|
141
|
-
// @ts-ignore
|
142
|
-
customIcon={starYellow}
|
143
|
-
className={iconSize}
|
144
|
-
/>
|
145
|
-
) }
|
146
|
-
{colorOption === 'primary' && (
|
147
|
-
<Icon
|
148
|
-
// @ts-ignore
|
149
|
-
customIcon={starPrimary}
|
150
|
-
className={iconSize}
|
151
|
-
/>
|
152
|
-
) }
|
153
|
-
{colorOption === 'subtle' && (
|
154
|
-
<Icon
|
155
|
-
// @ts-ignore
|
156
|
-
customIcon={starSubtle}
|
157
|
-
className={iconSize}
|
158
|
-
/>
|
159
|
-
) }
|
160
|
-
</React.Fragment>
|
161
|
-
))}
|
162
|
-
{[...Array(emptyStars)].map((_, index) => (
|
163
|
-
<React.Fragment key={index}>
|
164
|
-
{backgroundType === 'outline' && (
|
165
|
-
<Icon
|
166
|
-
// @ts-ignore
|
167
|
-
customIcon={starOutline}
|
168
|
-
className={iconSize}
|
169
|
-
/>
|
170
|
-
) }
|
171
|
-
{backgroundType !== 'outline' && (
|
172
|
-
<Icon
|
173
|
-
// @ts-ignore
|
174
|
-
customIcon={starBackground}
|
175
|
-
className={iconSize}
|
176
|
-
/>
|
177
|
-
) }
|
178
|
-
</React.Fragment>
|
179
|
-
))}
|
180
|
-
</Flex>
|
181
|
-
{layoutOption === "onestar" && (
|
182
|
-
<>
|
183
|
-
{size === 'xs' && (
|
184
|
-
<Caption
|
185
|
-
text={`${rating.toString()} of ${denominator}`}
|
186
|
-
size="xs"
|
187
|
-
dark={dark}
|
188
|
-
className="pb_star_rating_number_sm"
|
189
|
-
/>
|
190
|
-
)}
|
191
|
-
{size === 'sm' && (
|
192
|
-
<Caption
|
193
|
-
text={`${rating.toString()} of ${denominator}`}
|
194
|
-
size="xs"
|
195
|
-
dark={dark}
|
196
|
-
className="pb_star_rating_number_sm"
|
197
|
-
/>
|
96
|
+
|
97
|
+
{variant === "display" && (
|
98
|
+
<StarRatingDisplay
|
99
|
+
backgroundType={backgroundType}
|
100
|
+
colorOption={colorOption}
|
101
|
+
dark={dark}
|
102
|
+
denominator={denominator}
|
103
|
+
layoutOption={layoutOption}
|
104
|
+
rating={rating}
|
105
|
+
size={size}
|
106
|
+
/>
|
198
107
|
)}
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
108
|
+
|
109
|
+
{variant === "interactive" && (
|
110
|
+
<StarRatingInteractive
|
111
|
+
backgroundType={backgroundType}
|
112
|
+
colorOption={colorOption}
|
113
|
+
dark={dark}
|
114
|
+
denominator={denominator}
|
115
|
+
onClick={onClick}
|
116
|
+
size={size}
|
117
|
+
/>
|
206
118
|
)}
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
119
|
+
|
120
|
+
{layoutOption === "onestar" && (
|
121
|
+
<>
|
122
|
+
{(size === 'xs' || size === 'sm') && (
|
123
|
+
<Caption
|
124
|
+
className="pb_star_rating_number_sm"
|
125
|
+
dark={dark}
|
126
|
+
size="xs"
|
127
|
+
text={`${rating.toString()} of ${denominator}`}
|
128
|
+
/>
|
129
|
+
)}
|
130
|
+
{size === 'md' && (
|
131
|
+
<Body
|
132
|
+
className="pb_star_rating_number_md"
|
133
|
+
color="light"
|
134
|
+
dark={dark}
|
135
|
+
text={`${rating.toString()} of ${denominator}`}
|
136
|
+
/>
|
137
|
+
)}
|
138
|
+
{size === 'lg' && (
|
139
|
+
<Title
|
140
|
+
bold={false}
|
141
|
+
className="pb_star_rating_number_lg"
|
142
|
+
color="light"
|
143
|
+
dark={dark}
|
144
|
+
size={2}
|
145
|
+
text={`${rating.toString()} of ${denominator}`}
|
146
|
+
/>
|
147
|
+
)}
|
148
|
+
</>
|
216
149
|
)}
|
217
|
-
|
218
|
-
)}
|
219
|
-
</div>
|
150
|
+
</div>
|
220
151
|
)
|
221
|
-
|
152
|
+
}
|
222
153
|
|
223
154
|
export default StarRating
|
@@ -1,40 +1,35 @@
|
|
1
1
|
import React from 'react'
|
2
|
-
|
3
2
|
import StarRating from '../_star_rating'
|
4
3
|
|
5
4
|
const StarRatingHide = (props) => (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
{...props}
|
35
|
-
/>
|
36
|
-
|
37
|
-
</>
|
5
|
+
<>
|
6
|
+
<StarRating
|
7
|
+
paddingBottom="xs"
|
8
|
+
rating={3}
|
9
|
+
{...props}
|
10
|
+
/>
|
11
|
+
|
12
|
+
<StarRating
|
13
|
+
layoutOption={"number"}
|
14
|
+
paddingBottom="xs"
|
15
|
+
rating={2.8}
|
16
|
+
{...props}
|
17
|
+
/>
|
18
|
+
|
19
|
+
<StarRating
|
20
|
+
layoutOption={"number"}
|
21
|
+
paddingBottom="xs"
|
22
|
+
rating={3}
|
23
|
+
{...props}
|
24
|
+
/>
|
25
|
+
|
26
|
+
<StarRating
|
27
|
+
layoutOption={"onestar"}
|
28
|
+
paddingBottom="xs"
|
29
|
+
rating={1}
|
30
|
+
{...props}
|
31
|
+
/>
|
32
|
+
</>
|
38
33
|
)
|
39
34
|
|
40
35
|
export default StarRatingHide
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import StarRating from '../_star_rating'
|
3
|
+
|
4
|
+
const StarRatingInteractive = (props) => (
|
5
|
+
<>
|
6
|
+
<StarRating
|
7
|
+
paddingBottom="xs"
|
8
|
+
variant="interactive"
|
9
|
+
{...props}
|
10
|
+
/>
|
11
|
+
</>
|
12
|
+
)
|
13
|
+
|
14
|
+
export default StarRatingInteractive
|
@@ -9,3 +9,5 @@ export { default as StarRatingHide } from './_star_rating_hide.jsx'
|
|
9
9
|
export { default as StarRatingNumberConfig } from './_star_rating_number_config.jsx'
|
10
10
|
|
11
11
|
export { default as StarRatingSizeOptions } from './_star_rating_size_options.jsx'
|
12
|
+
|
13
|
+
export { default as StarRatingInteractive } from './_star_rating_interactive.jsx'
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import React from "react";
|
2
|
+
|
3
|
+
const starYellow = (
|
4
|
+
<svg className="iamyellow"
|
5
|
+
fill="none"
|
6
|
+
viewBox="0 0 18 16"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
>
|
9
|
+
<path clipRule="evenodd"
|
10
|
+
d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z"
|
11
|
+
fill="#F9BB00"
|
12
|
+
fillRule="evenodd"
|
13
|
+
/>
|
14
|
+
</svg>
|
15
|
+
)
|
16
|
+
|
17
|
+
const starPrimary = (
|
18
|
+
<svg fill="none"
|
19
|
+
viewBox="0 0 18 16"
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
21
|
+
>
|
22
|
+
<path clipRule="evenodd"
|
23
|
+
d="M9.86015 0.4371C9.73527 0.187329 9.4855 0 9.17328 0C8.89229 0 8.64252 0.187329 8.51763 0.4371L6.36335 4.83932L1.58647 5.55742C1.30547 5.58864 1.08692 5.80719 0.99326 6.05696C0.899595 6.33795 0.962038 6.61895 1.18059 6.8375L4.64617 10.2719L3.80319 15.1112C3.77197 15.3922 3.89685 15.7044 4.11541 15.8605C4.36518 16.0166 4.64617 16.0478 4.89594 15.9229L9.17328 13.6126L13.4506 15.9229C13.7004 16.0478 14.0126 16.0166 14.2624 15.8605C14.4809 15.7044 14.6058 15.3922 14.5434 15.1112L13.7316 10.2719L17.1972 6.8375C17.4157 6.61895 17.4782 6.33795 17.3845 6.05696C17.2909 5.80719 17.0723 5.58864 16.7913 5.55742L12.0144 4.83932L9.86015 0.4371Z"
|
24
|
+
fill="#0056CF"
|
25
|
+
fillRule="evenodd"
|
26
|
+
/>
|
27
|
+
</svg>
|
28
|
+
)
|
29
|
+
|
30
|
+
const starSubtle = (
|
31
|
+
<svg fill="none"
|
32
|
+
viewBox="0 0 18 16"
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
34
|
+
>
|
35
|
+
<path clipRule="evenodd"
|
36
|
+
d="M8.90904 0.4371C8.78416 0.187329 8.53438 0 8.22217 0C7.94118 0 7.69141 0.187329 7.56652 0.4371L5.41224 4.83932L0.635357 5.55742C0.354364 5.58864 0.135813 5.80719 0.042149 6.05696C-0.0515154 6.33795 0.0109275 6.61895 0.229478 6.8375L3.69506 10.2719L2.85208 15.1112C2.82086 15.3922 2.94574 15.7044 3.16429 15.8605C3.41407 16.0166 3.69506 16.0478 3.94483 15.9229L8.22217 13.6126L12.4995 15.9229C12.7493 16.0478 13.0615 16.0166 13.3113 15.8605C13.5298 15.7044 13.6547 15.3922 13.5923 15.1112L12.7805 10.2719L16.2461 6.8375C16.4646 6.61895 16.5271 6.33795 16.4334 6.05696C16.3397 5.80719 16.1212 5.58864 15.8402 5.55742L11.0633 4.83932L8.90904 0.4371Z"
|
37
|
+
fillRule="evenodd"
|
38
|
+
/>
|
39
|
+
</svg>
|
40
|
+
)
|
41
|
+
|
42
|
+
const starOutline = (
|
43
|
+
<svg fill="none"
|
44
|
+
height="16"
|
45
|
+
viewBox="0 0 17 16"
|
46
|
+
width="17"
|
47
|
+
xmlns="http://www.w3.org/2000/svg"
|
48
|
+
>
|
49
|
+
<path d="M5.91323 5.33377L6.17269 5.29477L6.28801 5.0591L8.44116 0.659187C8.49971 0.543364 8.59517 0.5 8.64884 0.5C8.74499 0.5 8.83506 0.555009 8.88775 0.659235L11.0409 5.0591L11.1562 5.29477L11.4157 5.33377L16.1925 6.05186L16.2021 6.0533L16.2117 6.05436C16.2359 6.05706 16.2671 6.06847 16.3024 6.09973C16.3374 6.13062 16.3686 6.17476 16.3886 6.22412C16.4186 6.32162 16.401 6.40181 16.3198 6.48332C16.3196 6.48353 16.3194 6.48374 16.3192 6.48395L12.8552 9.91671L12.6712 10.0991L12.7141 10.3546L13.5258 15.1939L13.528 15.2068L13.5308 15.2196C13.5488 15.3004 13.5074 15.402 13.4567 15.4462C13.3391 15.5132 13.2227 15.5096 13.1546 15.4781L8.88646 13.1726L8.64884 13.0443L8.41121 13.1726L4.14274 15.4782C4.07877 15.5083 3.99031 15.5147 3.87267 15.4466C3.82302 15.4033 3.76655 15.2914 3.77463 15.1781L4.61431 10.3577L4.65911 10.1005L4.47368 9.91671L1.0097 6.48394C1.00947 6.48372 1.00925 6.4835 1.00903 6.48327C0.927878 6.40178 0.91031 6.3216 0.94026 6.22412C0.960274 6.17476 0.99154 6.13062 1.02646 6.09973C1.0618 6.06847 1.09296 6.05706 1.11724 6.05436L1.12682 6.0533L1.13635 6.05186L5.91323 5.33377Z"
|
50
|
+
stroke="#C1CDD6"
|
51
|
+
/>
|
52
|
+
</svg>
|
53
|
+
)
|
54
|
+
|
55
|
+
export const getStarIconObject = (backgroundType: string, color: string, dark: boolean, size: string) => {
|
56
|
+
const colorClassName = color === "subtle" ? (dark ? "suble_star_dark" : "suble_star_light") : `${color}_star`
|
57
|
+
const backgroundClassName = backgroundType === "outline" ? (dark ? "outline_empty_star_dark" : "outline_empty_star_light") : (dark ? "empty_star_dark" : "empty_star_light")
|
58
|
+
|
59
|
+
return {
|
60
|
+
yellow: {
|
61
|
+
className: `pb_star_${size} ${colorClassName}`,
|
62
|
+
icon: starYellow
|
63
|
+
},
|
64
|
+
primary: {
|
65
|
+
className: `pb_star_${size} ${colorClassName}`,
|
66
|
+
icon: starPrimary
|
67
|
+
},
|
68
|
+
subtle: {
|
69
|
+
className: `pb_star_${size} ${colorClassName}`,
|
70
|
+
icon: starSubtle
|
71
|
+
},
|
72
|
+
fill: {
|
73
|
+
className: `pb_star_${size} ${backgroundClassName}`,
|
74
|
+
icon: starYellow
|
75
|
+
},
|
76
|
+
outline: {
|
77
|
+
className: `pb_star_${size} ${backgroundClassName}`,
|
78
|
+
icon: starOutline
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|