app/pb_kits/playbook/pb_title_count/title_count.rb
# frozen_string_literal: true module Playbook module PbTitleCount class TitleCount < Playbook::KitBase prop :align, type: Playbook::Props::Enum, values: %w[left center right], default: "left" prop :size, type: Playbook::Props::Enum, values: %w[lg sm], default: "sm" prop :title prop :count, type: Playbook::Props::Numeric def classname generate_classname("pb_title_count_kit", align, size) end def title_size size == "lg" ? 3 : 4 end def format_count count.to_s.gsub(/(\d)(?=\d{3}+(?:\.|$))(\d{3}\..*)?/, '\1,\2') end end end end
Source Files
- app/pb_kits/playbook/pb_advanced_table/advanced_table.rb
- app/pb_kits/playbook/pb_advanced_table/table_body.rb
- app/pb_kits/playbook/pb_advanced_table/table_header.rb
- app/pb_kits/playbook/pb_advanced_table/table_row.rb
- app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb
- app/pb_kits/playbook/pb_avatar/avatar.rb
- app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb
- app/pb_kits/playbook/pb_background/background.rb
- app/pb_kits/playbook/pb_badge/badge.rb
- app/pb_kits/playbook/pb_bar_graph/bar_graph.rb
- app/pb_kits/playbook/pb_body/body.rb
- app/pb_kits/playbook/pb_bread_crumbs/bread_crumb_item.rb
- app/pb_kits/playbook/pb_bread_crumbs/bread_crumbs.rb
- app/pb_kits/playbook/pb_button/button.rb
- app/pb_kits/playbook/pb_button_toolbar/button_toolbar.rb
- app/pb_kits/playbook/pb_caption/caption.rb
- app/pb_kits/playbook/pb_card/card.rb
- app/pb_kits/playbook/pb_card/card_body.rb
- app/pb_kits/playbook/pb_card/card_header.rb
- app/pb_kits/playbook/pb_checkbox/checkbox.rb
- app/pb_kits/playbook/pb_circle_chart/circle_chart.rb
- app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb
- app/pb_kits/playbook/pb_collapsible/collapsible.rb
- app/pb_kits/playbook/pb_collapsible/collapsible_content.rb
- app/pb_kits/playbook/pb_collapsible/collapsible_icon.rb
- app/pb_kits/playbook/pb_collapsible/collapsible_main.rb
- app/pb_kits/playbook/pb_contact/contact.rb
- app/pb_kits/playbook/pb_currency/currency.rb
- app/pb_kits/playbook/pb_dashboard_value/dashboard_value.rb
- app/pb_kits/playbook/pb_date/date.rb
- app/pb_kits/playbook/pb_date_picker/date_picker.rb
- app/pb_kits/playbook/pb_date_range_inline/date_range_inline.rb
- app/pb_kits/playbook/pb_date_range_stacked/date_range_stacked.rb
- app/pb_kits/playbook/pb_date_stacked/date_stacked.rb
- app/pb_kits/playbook/pb_date_time/date_time.rb
- app/pb_kits/playbook/pb_date_time_stacked/date_time_stacked.rb
- app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.rb
- app/pb_kits/playbook/pb_detail/detail.rb
- app/pb_kits/playbook/pb_dialog/dialog.rb
- app/pb_kits/playbook/pb_dialog/dialog_body.rb
- app/pb_kits/playbook/pb_dialog/dialog_footer.rb
- app/pb_kits/playbook/pb_dialog/dialog_header.rb
- app/pb_kits/playbook/pb_distribution_bar/distribution_bar.rb
- app/pb_kits/playbook/pb_docs/kit_example.rb
- app/pb_kits/playbook/pb_draggable/draggable.rb
- app/pb_kits/playbook/pb_draggable/draggable_container.rb
- app/pb_kits/playbook/pb_draggable/draggable_item.rb
- app/pb_kits/playbook/pb_drawer/drawer.rb
- app/pb_kits/playbook/pb_dropdown/dropdown.rb
- app/pb_kits/playbook/pb_dropdown/dropdown_container.rb
- app/pb_kits/playbook/pb_dropdown/dropdown_option.rb
- app/pb_kits/playbook/pb_dropdown/dropdown_trigger.rb
- app/pb_kits/playbook/pb_file_upload/file_upload.rb
- app/pb_kits/playbook/pb_filter/filter.rb
- app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb
- app/pb_kits/playbook/pb_flex/flex.rb
- app/pb_kits/playbook/pb_flex/flex_item.rb
- app/pb_kits/playbook/pb_form/form.rb
- app/pb_kits/playbook/pb_form_group/form_group.rb
- app/pb_kits/playbook/pb_form_pill/form_pill.rb
- app/pb_kits/playbook/pb_gauge/gauge.rb
- app/pb_kits/playbook/pb_hashtag/hashtag.rb
- app/pb_kits/playbook/pb_highlight/highlight.rb
- app/pb_kits/playbook/pb_home_address_street/city_emphasis.rb
- app/pb_kits/playbook/pb_home_address_street/home_address_street.rb
- app/pb_kits/playbook/pb_home_address_street/none_emphasis.rb
- app/pb_kits/playbook/pb_home_address_street/street_emphasis.rb
- app/pb_kits/playbook/pb_icon/icon.rb
- app/pb_kits/playbook/pb_icon_circle/icon_circle.rb
- app/pb_kits/playbook/pb_icon_stat_value/icon_stat_value.rb
- app/pb_kits/playbook/pb_icon_value/icon_value.rb
- app/pb_kits/playbook/pb_image/image.rb
- app/pb_kits/playbook/pb_kit/pb_date_time.rb
- app/pb_kits/playbook/pb_label_pill/label_pill.rb
- app/pb_kits/playbook/pb_label_value/label_value.rb
- app/pb_kits/playbook/pb_layout/body.rb
- app/pb_kits/playbook/pb_layout/footer.rb
- app/pb_kits/playbook/pb_layout/header.rb
- app/pb_kits/playbook/pb_layout/item.rb
- app/pb_kits/playbook/pb_layout/layout.rb
- app/pb_kits/playbook/pb_layout/sidebar.rb
- app/pb_kits/playbook/pb_legend/legend.rb
- app/pb_kits/playbook/pb_line_graph/line_graph.rb
- app/pb_kits/playbook/pb_link/link.rb
- app/pb_kits/playbook/pb_list/item.rb
- app/pb_kits/playbook/pb_list/list.rb
- app/pb_kits/playbook/pb_loading_inline/loading_inline.rb
- app/pb_kits/playbook/pb_message/message.rb
- app/pb_kits/playbook/pb_message/message_mention.rb
- app/pb_kits/playbook/pb_multi_level_select/multi_level_select.rb
- app/pb_kits/playbook/pb_multiple_users/multiple_users.rb
- app/pb_kits/playbook/pb_multiple_users_stacked/multiple_users_stacked.rb
- app/pb_kits/playbook/pb_nav/item.rb
- app/pb_kits/playbook/pb_nav/nav.rb
- app/pb_kits/playbook/pb_online_status/online_status.rb
- app/pb_kits/playbook/pb_overlay/overlay.rb
- app/pb_kits/playbook/pb_pagination/pagination.rb
- app/pb_kits/playbook/pb_passphrase/passphrase.rb
- app/pb_kits/playbook/pb_person/person.rb
- app/pb_kits/playbook/pb_person_contact/person_contact.rb
- app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb
- app/pb_kits/playbook/pb_pill/pill.rb
- app/pb_kits/playbook/pb_popover/popover.rb
- app/pb_kits/playbook/pb_progress_pills/progress_pills.rb
- app/pb_kits/playbook/pb_progress_simple/progress_simple.rb
- app/pb_kits/playbook/pb_progress_step/progress_step.rb
- app/pb_kits/playbook/pb_progress_step/progress_step_item.rb
- app/pb_kits/playbook/pb_radio/radio.rb
- app/pb_kits/playbook/pb_rich_text_editor/rich_text_editor.rb
- app/pb_kits/playbook/pb_section_separator/section_separator.rb
- app/pb_kits/playbook/pb_select/select.rb
- app/pb_kits/playbook/pb_selectable_card/selectable_card.rb
- app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb
- app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb
- app/pb_kits/playbook/pb_selectable_list/selectable_list.rb
- app/pb_kits/playbook/pb_selectable_list/selectable_list_item.rb
- app/pb_kits/playbook/pb_skeleton_loading/skeleton_loading.rb
- app/pb_kits/playbook/pb_source/source.rb
- app/pb_kits/playbook/pb_star_rating/star_rating.rb
- app/pb_kits/playbook/pb_stat_change/stat_change.rb
- app/pb_kits/playbook/pb_stat_value/stat_value.rb
- app/pb_kits/playbook/pb_table/table.rb
- app/pb_kits/playbook/pb_table/table_body.rb
- app/pb_kits/playbook/pb_table/table_cell.rb
- app/pb_kits/playbook/pb_table/table_head.rb
- app/pb_kits/playbook/pb_table/table_header.rb
- app/pb_kits/playbook/pb_table/table_row.rb
- app/pb_kits/playbook/pb_text_input/add_on.rb
- app/pb_kits/playbook/pb_text_input/text_input.rb
- app/pb_kits/playbook/pb_textarea/textarea.rb
- app/pb_kits/playbook/pb_time/time.rb
- app/pb_kits/playbook/pb_time_range_inline/time_range_inline.rb
- app/pb_kits/playbook/pb_time_stacked/time_stacked.rb
- app/pb_kits/playbook/pb_timeline/detail.rb
- app/pb_kits/playbook/pb_timeline/item.rb
- app/pb_kits/playbook/pb_timeline/label.rb
- app/pb_kits/playbook/pb_timeline/step.rb
- app/pb_kits/playbook/pb_timeline/timeline.rb
- app/pb_kits/playbook/pb_timestamp/timestamp.rb
- app/pb_kits/playbook/pb_title/title.rb
- app/pb_kits/playbook/pb_title_count/title_count.rb
- app/pb_kits/playbook/pb_title_detail/title_detail.rb
- app/pb_kits/playbook/pb_toggle/toggle.rb
- app/pb_kits/playbook/pb_tooltip/tooltip.rb
- app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb
- app/pb_kits/playbook/pb_typeahead/typeahead.rb
- app/pb_kits/playbook/pb_user/user.rb
- app/pb_kits/playbook/pb_user_badge/user_badge.rb
- app/pb_kits/playbook/pb_weekday_stacked/weekday_stacked.rb
- lib/playbook.rb
- lib/playbook/align_content.rb
- lib/playbook/align_items.rb
- lib/playbook/align_self.rb
- lib/playbook/border_radius.rb
- lib/playbook/bottom.rb
- lib/playbook/classnames.rb
- lib/playbook/cursor.rb
- lib/playbook/display.rb
- lib/playbook/engine.rb
- lib/playbook/flex.rb
- lib/playbook/flex_direction.rb
- lib/playbook/flex_grow.rb
- lib/playbook/flex_shrink.rb
- lib/playbook/flex_wrap.rb
- lib/playbook/forms.rb
- lib/playbook/forms/builder.rb
- lib/playbook/forms/builder/action_area.rb
- lib/playbook/forms/builder/checkbox_field.rb
- lib/playbook/forms/builder/collection_select_field.rb
- lib/playbook/forms/builder/date_picker_field.rb
- lib/playbook/forms/builder/dropdown_field.rb
- lib/playbook/forms/builder/form_field_builder.rb
- lib/playbook/forms/builder/intl_telephone_field.rb
- lib/playbook/forms/builder/multi_level_select_field.rb
- lib/playbook/forms/builder/phone_number_field.rb
- lib/playbook/forms/builder/select_field.rb
- lib/playbook/forms/builder/star_rating_field.rb
- lib/playbook/forms/builder/typeahead_field.rb
- lib/playbook/height.rb
- lib/playbook/hover.rb
- lib/playbook/justify_content.rb
- lib/playbook/justify_self.rb
- lib/playbook/kit_base.rb
- lib/playbook/kit_resolver.rb
- lib/playbook/left.rb
- lib/playbook/line_height.rb
- lib/playbook/max_height.rb
- lib/playbook/min_height.rb
- lib/playbook/number_spacing.rb
- lib/playbook/order.rb
- lib/playbook/overflow.rb
- lib/playbook/pagination_renderer.rb
- lib/playbook/pb_doc_helper.rb
- lib/playbook/pb_forms_helper.rb
- lib/playbook/pb_kit_helper.rb
- lib/playbook/position.rb
- lib/playbook/position_props_css.rb
- lib/playbook/props.rb
- lib/playbook/props/array.rb
- lib/playbook/props/base.rb
- lib/playbook/props/boolean.rb
- lib/playbook/props/date.rb
- lib/playbook/props/enum.rb
- lib/playbook/props/hash.rb
- lib/playbook/props/hash_array.rb
- lib/playbook/props/nested_props.rb
- lib/playbook/props/number.rb
- lib/playbook/props/number_array.rb
- lib/playbook/props/numeric.rb
- lib/playbook/props/percentage.rb
- lib/playbook/props/proc.rb
- lib/playbook/props/string.rb
- lib/playbook/right.rb
- lib/playbook/shadow.rb
- lib/playbook/spacing.rb
- lib/playbook/text_align.rb
- lib/playbook/top.rb
- lib/playbook/truncate.rb
- lib/playbook/version.rb
- lib/playbook/vertical_align.rb
- lib/playbook/z_index.rb
- lib/playbook_ui.rb