playbook_ui 4.15.0 → 4.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -1
- data/app/pb_kits/playbook/_playbook.scss +7 -1
- data/app/pb_kits/playbook/data/menu.yml +5 -1
- data/app/pb_kits/playbook/index.js +5 -0
- data/app/pb_kits/playbook/packs/examples.js +8 -0
- data/app/pb_kits/playbook/packs/samples.js +2 -0
- data/app/pb_kits/playbook/packs/site_styles/docs/_markdown.scss +1 -1
- data/app/pb_kits/playbook/pb_avatar/_avatar.jsx +24 -15
- data/app/pb_kits/playbook/pb_avatar/docs/_avatar_status.jsx +45 -0
- data/app/pb_kits/playbook/pb_avatar/docs/example.yml +6 -5
- data/app/pb_kits/playbook/pb_avatar/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.html.erb +33 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.jsx +81 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.scss +63 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/avatar_action_button.rb +44 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.html.erb +15 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_actions.jsx +19 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.html.erb +8 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +13 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_on_click.jsx +15 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_onclick.html.erb +14 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.html.erb +27 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_placement.jsx +29 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_tooltip.html.erb +11 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/example.yml +16 -0
- data/app/pb_kits/playbook/pb_avatar_action_button/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_badge/_badge.jsx +20 -14
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.jsx +9 -2
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +5 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.html.erb +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.html.erb +26 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +36 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.html.erb +14 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +23 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_body/_body.jsx +2 -1
- data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +4 -0
- data/app/pb_kits/playbook/pb_button/_button.jsx +2 -1
- data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +6 -0
- data/app/pb_kits/playbook/pb_caption/_caption.jsx +19 -17
- data/app/pb_kits/playbook/pb_card/_card.html.erb +1 -1
- data/app/pb_kits/playbook/pb_card/_card.jsx +35 -38
- data/app/pb_kits/playbook/pb_card/_card.scss +0 -10
- data/app/pb_kits/playbook/pb_card/card.rb +9 -3
- data/app/pb_kits/playbook/pb_card/card_body.rb +1 -5
- data/app/pb_kits/playbook/pb_card/card_header.rb +0 -3
- data/app/pb_kits/playbook/pb_card/docs/_card_light.html.erb +2 -1
- data/app/pb_kits/playbook/pb_checkbox/_checkbox.jsx +17 -18
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.html.erb +1 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.jsx +10 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +3 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +11 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +25 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_contact/_contact.html.erb +16 -3
- data/app/pb_kits/playbook/pb_contact/_contact.jsx +58 -34
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +1 -0
- data/app/pb_kits/playbook/pb_currency/_currency.html.erb +7 -9
- data/app/pb_kits/playbook/pb_currency/_currency.jsx +37 -21
- data/app/pb_kits/playbook/pb_currency/currency.rb +22 -29
- data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.html.erb +3 -3
- data/app/pb_kits/playbook/pb_currency/docs/_currency_dark.jsx +2 -3
- data/app/pb_kits/playbook/pb_currency/docs/_currency_large.jsx +2 -3
- data/app/pb_kits/playbook/pb_currency/docs/_currency_medium.jsx +2 -2
- data/app/pb_kits/playbook/pb_currency/docs/_currency_small.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_small.jsx +5 -2
- data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.jsx +2 -2
- data/app/pb_kits/playbook/pb_date/_date.jsx +39 -15
- data/app/pb_kits/playbook/pb_date/docs/_date_default.jsx +3 -1
- data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.jsx +43 -37
- data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +2 -2
- data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.jsx +6 -16
- data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.jsx +21 -18
- data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.jsx +30 -33
- data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.jsx +10 -15
- data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.jsx +8 -8
- data/app/pb_kits/playbook/pb_file_upload/_file_upload.jsx +13 -23
- data/app/pb_kits/playbook/pb_filter/Filter/FilterBackground.jsx +16 -14
- data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.jsx +13 -12
- data/app/pb_kits/playbook/pb_flex/_flex.jsx +35 -20
- data/app/pb_kits/playbook/pb_flex/_flex_item.jsx +6 -9
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +14 -19
- data/app/pb_kits/playbook/pb_hashtag/_hashtag.jsx +26 -22
- data/app/pb_kits/playbook/pb_highlight/_highlight.jsx +13 -12
- data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.jsx +85 -80
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +54 -33
- data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.jsx +13 -9
- data/app/pb_kits/playbook/pb_icon_value/_icon_value.jsx +16 -20
- data/app/pb_kits/playbook/pb_image/_image.jsx +12 -10
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.html.erb +1 -0
- data/app/pb_kits/playbook/pb_label_pill/_label_pill.jsx +49 -14
- data/app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.jsx +50 -0
- data/app/pb_kits/playbook/pb_label_pill/docs/example.yml +4 -3
- data/app/pb_kits/playbook/pb_label_pill/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_label_pill/label_pill.rb +1 -1
- data/app/pb_kits/playbook/pb_label_value/_label_value.html.erb +1 -0
- data/app/pb_kits/playbook/pb_label_value/_label_value.jsx +30 -18
- data/app/pb_kits/playbook/pb_layout/_layout.jsx +51 -45
- data/app/pb_kits/playbook/pb_layout/_layout.scss +76 -57
- data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.html.erb +54 -0
- data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.jsx +27 -0
- data/app/pb_kits/playbook/pb_layout/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_layout/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_layout/layout.rb +10 -2
- data/app/pb_kits/playbook/pb_legend/_legend.jsx +17 -15
- data/app/pb_kits/playbook/pb_line_graph/_line_graph.jsx +9 -2
- data/app/pb_kits/playbook/pb_line_graph/docs/_description.md +3 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.html.erb +8 -8
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +1 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.html.erb +26 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +35 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.html.erb +15 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +23 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +5 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +2 -0
- data/app/pb_kits/playbook/pb_line_graph/line_graph.rb +6 -0
- data/app/pb_kits/playbook/pb_list/_list.jsx +24 -21
- data/app/pb_kits/playbook/pb_list/docs/_description.md +7 -1
- data/app/pb_kits/playbook/pb_list/docs/_list_layout_left.html.erb +8 -0
- data/app/pb_kits/playbook/pb_list/docs/_list_layout_right.html.erb +8 -0
- data/app/pb_kits/playbook/pb_list/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +21 -19
- data/app/pb_kits/playbook/pb_logistic/_logistic.html.erb +1 -0
- data/app/pb_kits/playbook/pb_logistic/_logistic.jsx +26 -11
- data/app/pb_kits/playbook/pb_message/_message.html.erb +1 -0
- data/app/pb_kits/playbook/pb_message/_message.jsx +33 -11
- data/app/pb_kits/playbook/pb_message/docs/_message_default.jsx +1 -2
- data/app/pb_kits/playbook/pb_message/message.rb +1 -1
- data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.jsx +10 -10
- data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.jsx +7 -19
- data/app/pb_kits/playbook/pb_nav/_nav.jsx +17 -14
- data/app/pb_kits/playbook/pb_online_status/_online_status.jsx +5 -13
- data/app/pb_kits/playbook/pb_person/_person.html.erb +9 -2
- data/app/pb_kits/playbook/pb_person/_person.jsx +36 -18
- data/app/pb_kits/playbook/pb_person/docs/_person_default.html.erb +5 -1
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.html.erb +1 -0
- data/app/pb_kits/playbook/pb_person_contact/_person_contact.jsx +73 -21
- data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +32 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_person_contact/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_pill/_pill.jsx +5 -10
- data/app/pb_kits/playbook/pb_popover/_popover.jsx +52 -41
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.html.erb +1 -0
- data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.jsx +41 -13
- data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.jsx +15 -12
- data/app/pb_kits/playbook/pb_progress_step/_progress_step.jsx +17 -10
- data/app/pb_kits/playbook/pb_radio/_radio.jsx +3 -1
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.html.erb +1 -0
- data/app/pb_kits/playbook/pb_section_separator/_section_separator.jsx +30 -15
- data/app/pb_kits/playbook/pb_section_separator/docs/_section_separator_text.jsx +3 -1
- data/app/pb_kits/playbook/pb_select/_select.jsx +4 -2
- data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.jsx +12 -7
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.html.erb +30 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.jsx +97 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.scss +74 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_checkmark.html.erb +29 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_checkmark.jsx +41 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_dark.html.erb +30 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_dark.jsx +40 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_default.html.erb +26 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_default.jsx +37 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_single_select.html.erb +27 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_single_select.jsx +40 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/example.yml +16 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/docs/index.js +4 -0
- data/app/pb_kits/playbook/pb_selectable_card_icon/selectable_card_icon.rb +50 -0
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.html.erb +24 -0
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.jsx +107 -0
- data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.scss +85 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_dark.html.erb +26 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_dark.jsx +43 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.html.erb +23 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +40 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.html.erb +27 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +46 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/example.yml +12 -0
- data/app/pb_kits/playbook/pb_selectable_icon/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_selectable_icon/selectable_icon.rb +55 -0
- data/app/pb_kits/playbook/pb_source/_source.jsx +113 -13
- data/app/pb_kits/playbook/pb_source/docs/_source_default.html.erb +3 -1
- data/app/pb_kits/playbook/pb_source/docs/_source_default.jsx +37 -0
- data/app/pb_kits/playbook/pb_source/docs/_source_noicon.jsx +40 -0
- data/app/pb_kits/playbook/pb_source/docs/_source_types.jsx +85 -0
- data/app/pb_kits/playbook/pb_source/docs/example.yml +3 -0
- data/app/pb_kits/playbook/pb_source/docs/index.js +5 -0
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.html.erb +6 -2
- data/app/pb_kits/playbook/pb_star_rating/_star_rating.jsx +98 -13
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +28 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +13 -0
- data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_star_rating/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +2 -1
- data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +14 -13
- data/app/pb_kits/playbook/pb_stat_value/_stat_value.jsx +2 -1
- data/app/pb_kits/playbook/pb_table/_table.jsx +29 -28
- data/app/pb_kits/playbook/pb_table/_table.scss +1 -1
- data/app/pb_kits/playbook/pb_table/_table_row.jsx +6 -7
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.html.erb +52 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.jsx +52 -8
- data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.md +3 -1
- data/app/pb_kits/playbook/pb_text_input/_text_input.html.erb +5 -3
- data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +21 -5
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.html.erb +31 -5
- data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +3 -0
- data/app/pb_kits/playbook/pb_text_input/text_input.rb +1 -1
- data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +2 -1
- data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.jsx +38 -18
- data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.jsx +12 -11
- data/app/pb_kits/playbook/pb_timeline/_item.html.erb +28 -0
- data/app/pb_kits/playbook/pb_timeline/_item.jsx +54 -0
- data/app/pb_kits/playbook/pb_timeline/_timeline.html.erb +6 -0
- data/app/pb_kits/playbook/pb_timeline/_timeline.jsx +43 -0
- data/app/pb_kits/playbook/pb_timeline/_timeline.scss +271 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_description.md +3 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_default.html.erb +43 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx +73 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.html.erb +43 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx +73 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.html.erb +44 -0
- data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx +85 -0
- data/app/pb_kits/playbook/pb_timeline/docs/example.yml +13 -0
- data/app/pb_kits/playbook/pb_timeline/docs/index.js +3 -0
- data/app/pb_kits/playbook/pb_timeline/item.rb +25 -0
- data/app/pb_kits/playbook/pb_timeline/timeline.rb +27 -0
- data/app/pb_kits/playbook/pb_timestamp/_timestamp.jsx +7 -14
- data/app/pb_kits/playbook/pb_title/_title.jsx +12 -13
- data/app/pb_kits/playbook/pb_title/docs/_title_light.html.erb +1 -1
- data/app/pb_kits/playbook/pb_title_count/_title_count.jsx +49 -28
- data/app/pb_kits/playbook/pb_title_count/docs/_title_count_align.jsx +31 -0
- data/app/pb_kits/playbook/pb_title_count/docs/_title_count_default.jsx +13 -2
- data/app/pb_kits/playbook/pb_title_count/docs/example.yml +4 -5
- data/app/pb_kits/playbook/pb_title_count/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_title_detail/_title_detail.jsx +7 -18
- data/app/pb_kits/playbook/pb_toggle/_toggle.jsx +9 -11
- data/app/pb_kits/playbook/pb_user/_user.jsx +37 -37
- data/app/pb_kits/playbook/pb_user_badge/_user_badge.jsx +7 -7
- data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.jsx +32 -30
- data/app/pb_kits/playbook/plugins/pb_chart.js +4 -0
- data/app/pb_kits/playbook/props.rb +48 -0
- data/app/pb_kits/playbook/tokens/_colors.scss +3 -3
- data/app/pb_kits/playbook/tokens/_spacing.scss +1 -0
- data/app/pb_kits/playbook/utilities/_spacing.scss +42 -0
- data/app/pb_kits/playbook/utilities/spacing.js +33 -0
- data/app/views/playbook/samples/dashboards/index.html.erb +3 -1
- data/app/views/playbook/samples/registration/index.html.erb +316 -0
- data/app/views/playbook/samples/registration/index.jsx +476 -0
- data/lib/playbook/version.rb +1 -1
- metadata +88 -4
@@ -0,0 +1,44 @@
|
|
1
|
+
<%= pb_rails("timeline", props: {orientation: "horizontal", show_date: true}) do %>
|
2
|
+
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal", line_style: "solid", date: Date.today }) do %>
|
3
|
+
<%= pb_rails("title_detail", props: {
|
4
|
+
title: "Jackson Heights",
|
5
|
+
detail: "37-27 74th Street"
|
6
|
+
}) %>
|
7
|
+
<% end %>
|
8
|
+
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted" }) do %>
|
9
|
+
<%= pb_rails("title_detail", props: {
|
10
|
+
title: "Greenpoint",
|
11
|
+
detail: "81 Gate St Brooklyn"
|
12
|
+
}) %>
|
13
|
+
<% end %>
|
14
|
+
<%= pb_rails("timeline/item", props: {icon: "map-marker-alt", icon_color: "purple", date: Date.today+1 }) do %>
|
15
|
+
<%= pb_rails("title_detail", props: {
|
16
|
+
title: "Society Hill",
|
17
|
+
detail: "72 E St Astoria"
|
18
|
+
}) %>
|
19
|
+
<% end %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<br /><br /><br />
|
23
|
+
|
24
|
+
<%= pb_rails("timeline", props: {orientation: "vertical", show_date: true}) do %>
|
25
|
+
<%= pb_rails("timeline/item", props: {icon: "user", icon_color: "royal", line_style: "solid", date: Date.today }) do %>
|
26
|
+
<%= pb_rails("title_detail", props: {
|
27
|
+
title: "Jackson Heights",
|
28
|
+
detail: "37-27 74th Street"
|
29
|
+
}) %>
|
30
|
+
<% end %>
|
31
|
+
<%= pb_rails("timeline/item", props: {icon: "check", icon_color: "teal", line_style: "dotted" }) do %>
|
32
|
+
<%= pb_rails("title_detail", props: {
|
33
|
+
title: "Greenpoint",
|
34
|
+
detail: "81 Gate St Brooklyn"
|
35
|
+
}) %>
|
36
|
+
<% end %>
|
37
|
+
<%= pb_rails("timeline/item", props: {icon: "map-marker-alt", icon_color: "purple", date: Date.today+1 }) do %>
|
38
|
+
<%= pb_rails("title_detail", props: {
|
39
|
+
title: "Society Hill",
|
40
|
+
detail: "72 E St Astoria"
|
41
|
+
}) %>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
44
|
+
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Timeline from '../_timeline.jsx'
|
3
|
+
import { TitleDetail } from '../../'
|
4
|
+
|
5
|
+
const TimelineWithDate = () => (
|
6
|
+
<div>
|
7
|
+
<Timeline
|
8
|
+
orientation="horizontal"
|
9
|
+
showDate
|
10
|
+
>
|
11
|
+
<Timeline.Item
|
12
|
+
date={new Date()}
|
13
|
+
icon="user"
|
14
|
+
iconColor="royal"
|
15
|
+
>
|
16
|
+
<TitleDetail
|
17
|
+
detail="37-27 74th Street"
|
18
|
+
title="Jackson heights"
|
19
|
+
/>
|
20
|
+
</Timeline.Item>
|
21
|
+
<Timeline.Item
|
22
|
+
icon="check"
|
23
|
+
iconColor="teal"
|
24
|
+
lineStyle="dotted"
|
25
|
+
>
|
26
|
+
<TitleDetail
|
27
|
+
detail="81 Gate St Brooklyn"
|
28
|
+
title="Greenpoint"
|
29
|
+
/>
|
30
|
+
</Timeline.Item>
|
31
|
+
<Timeline.Item
|
32
|
+
date={new Date().setDate(new Date().getDate() + 1)}
|
33
|
+
icon="map-marker-alt"
|
34
|
+
iconColor="purple"
|
35
|
+
>
|
36
|
+
<TitleDetail
|
37
|
+
detail="72 E St Astoria"
|
38
|
+
title="Society Hill"
|
39
|
+
/>
|
40
|
+
</Timeline.Item>
|
41
|
+
</Timeline>
|
42
|
+
|
43
|
+
<br />
|
44
|
+
<br />
|
45
|
+
<br />
|
46
|
+
|
47
|
+
<Timeline
|
48
|
+
orientation="vertical"
|
49
|
+
showDate
|
50
|
+
>
|
51
|
+
<Timeline.Item
|
52
|
+
date={new Date()}
|
53
|
+
icon="user"
|
54
|
+
iconColor="royal"
|
55
|
+
>
|
56
|
+
<TitleDetail
|
57
|
+
detail="37-27 74th Street"
|
58
|
+
title="Jackson heights"
|
59
|
+
/>
|
60
|
+
</Timeline.Item>
|
61
|
+
<Timeline.Item
|
62
|
+
icon="check"
|
63
|
+
iconColor="teal"
|
64
|
+
lineStyle="dotted"
|
65
|
+
>
|
66
|
+
<TitleDetail
|
67
|
+
detail="81 Gate St Brooklyn"
|
68
|
+
title="Greenpoint"
|
69
|
+
/>
|
70
|
+
</Timeline.Item>
|
71
|
+
<Timeline.Item
|
72
|
+
date={new Date().setDate(new Date().getDate() + 1)}
|
73
|
+
icon="map-marker-alt"
|
74
|
+
iconColor="purple"
|
75
|
+
>
|
76
|
+
<TitleDetail
|
77
|
+
detail="72 E St Astoria"
|
78
|
+
title="Society Hill"
|
79
|
+
/>
|
80
|
+
</Timeline.Item>
|
81
|
+
</Timeline>
|
82
|
+
</div>
|
83
|
+
)
|
84
|
+
|
85
|
+
export default TimelineWithDate
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Playbook
|
4
|
+
module PbTimeline
|
5
|
+
class Item
|
6
|
+
include Playbook::Props
|
7
|
+
|
8
|
+
partial "pb_timeline/item"
|
9
|
+
|
10
|
+
prop :date
|
11
|
+
prop :icon, type: Playbook::Props::String,
|
12
|
+
default: "user"
|
13
|
+
prop :icon_color, type: Playbook::Props::Enum,
|
14
|
+
values: %w[default royal blue purple teal red yellow green],
|
15
|
+
default: "default"
|
16
|
+
prop :line_style, type: Playbook::Props::Enum,
|
17
|
+
values: %w[solid dotted],
|
18
|
+
default: "solid"
|
19
|
+
|
20
|
+
def classname
|
21
|
+
generate_classname("pb_timeline_item_kit", line_style)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Playbook
|
4
|
+
module PbTimeline
|
5
|
+
class Timeline
|
6
|
+
include Playbook::Props
|
7
|
+
|
8
|
+
partial "pb_timeline/timeline"
|
9
|
+
|
10
|
+
prop :orientation, type: Playbook::Props::Enum,
|
11
|
+
values: %w[vertical horizontal],
|
12
|
+
default: "horizontal"
|
13
|
+
prop :show_date, type: Playbook::Props::Boolean,
|
14
|
+
default: false
|
15
|
+
|
16
|
+
def classname
|
17
|
+
generate_classname("pb_timeline_kit", orientation, date_class)
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def date_class
|
23
|
+
show_date ? "with_date" : nil
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -3,14 +3,11 @@
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
5
|
|
6
|
-
import {
|
7
|
-
Caption,
|
8
|
-
} from '../'
|
6
|
+
import { Caption } from '../'
|
9
7
|
|
10
|
-
import {
|
11
|
-
|
12
|
-
|
13
|
-
} from '../utilities/props'
|
8
|
+
import { buildCss, buildDataProps } from '../utilities/props'
|
9
|
+
|
10
|
+
import { spacing } from '../utilities/spacing.js'
|
14
11
|
|
15
12
|
type TimestampProps = {
|
16
13
|
id?: String,
|
@@ -19,19 +16,15 @@ type TimestampProps = {
|
|
19
16
|
text?: String,
|
20
17
|
}
|
21
18
|
|
22
|
-
const Timestamp = ({
|
23
|
-
id,
|
24
|
-
className,
|
25
|
-
data = {},
|
26
|
-
text,
|
27
|
-
}: TimestampProps) => {
|
19
|
+
const Timestamp = (props: TimestampProps) => {
|
20
|
+
const { id, className, data = {}, text } = props
|
28
21
|
const dataProps = buildDataProps(data)
|
29
22
|
const pbCss = buildCss('pb_timestamp_kit')
|
30
23
|
|
31
24
|
return (
|
32
25
|
<div
|
33
26
|
{...dataProps}
|
34
|
-
className={classnames(className, pbCss)}
|
27
|
+
className={classnames(className, pbCss, spacing(props))}
|
35
28
|
id={id}
|
36
29
|
>
|
37
30
|
<Caption
|
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
+
import { spacing } from '../utilities/spacing.js'
|
5
6
|
|
6
7
|
type TitleProps = {
|
7
8
|
className?: String,
|
@@ -9,13 +10,10 @@ type TitleProps = {
|
|
9
10
|
dark?: Boolean,
|
10
11
|
size?: 1 | 2 | 3 | 4,
|
11
12
|
text?: String,
|
12
|
-
tag?:
|
13
|
+
tag?: "h1" | "h2" | "h3",
|
13
14
|
}
|
14
15
|
|
15
|
-
const tagCSS = ({
|
16
|
-
dark = false,
|
17
|
-
size = 3,
|
18
|
-
}) => {
|
16
|
+
const tagCSS = ({ dark = false, size = 3 }) => {
|
19
17
|
let css = ''
|
20
18
|
|
21
19
|
css += `_${size}`
|
@@ -25,18 +23,19 @@ const tagCSS = ({
|
|
25
23
|
}
|
26
24
|
|
27
25
|
const Title = (props: TitleProps) => {
|
28
|
-
const {
|
29
|
-
className,
|
30
|
-
children,
|
31
|
-
text,
|
32
|
-
tag = 'h3',
|
33
|
-
} = props
|
26
|
+
const { children, className, tag = 'h3', text } = props
|
34
27
|
|
35
28
|
const Tag = `${tag}`
|
36
29
|
|
37
30
|
return (
|
38
|
-
<Tag
|
39
|
-
|
31
|
+
<Tag
|
32
|
+
className={classnames(
|
33
|
+
`pb_title_kit${tagCSS(props)}`,
|
34
|
+
className,
|
35
|
+
spacing(props),
|
36
|
+
)}
|
37
|
+
>
|
38
|
+
{text || children}
|
40
39
|
</Tag>
|
41
40
|
)
|
42
41
|
}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
<br/>
|
4
4
|
|
5
|
-
<%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
|
5
|
+
<%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
|
6
6
|
<%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3 }) %>
|
7
7
|
<%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2 }) %>
|
8
8
|
<%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1 }) %>
|
@@ -1,39 +1,60 @@
|
|
1
1
|
/* @flow */
|
2
|
+
|
2
3
|
import React from 'react'
|
4
|
+
import classnames from 'classnames'
|
5
|
+
|
6
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
7
|
+
|
3
8
|
import { Body, Title } from '../'
|
9
|
+
import { spacing } from '../utilities/spacing.js'
|
4
10
|
|
5
11
|
type TitleCountProps = {
|
12
|
+
align: "center" | "left" | "right",
|
13
|
+
aria?: object,
|
6
14
|
className?: String,
|
7
|
-
|
15
|
+
count?: Numeric,
|
16
|
+
data?: object,
|
8
17
|
id?: String,
|
9
18
|
title?: String,
|
10
|
-
|
11
|
-
|
12
|
-
|
19
|
+
size?: "lg" | "sm",
|
20
|
+
};
|
21
|
+
|
22
|
+
const TitleCount = (props: TitleCountProps) => {
|
23
|
+
const {
|
24
|
+
align = 'left',
|
25
|
+
aria = {},
|
26
|
+
className,
|
27
|
+
data = {},
|
28
|
+
count,
|
29
|
+
id,
|
30
|
+
title,
|
31
|
+
size = 'sm' } = props
|
32
|
+
const ariaProps = buildAriaProps(aria)
|
33
|
+
const dataProps = buildDataProps(data)
|
13
34
|
|
14
|
-
const
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
}
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
const css = classnames(buildCss('pb_title_count_kit', align, size), className, spacing(props))
|
36
|
+
|
37
|
+
const formatCount = count.toLocaleString()
|
38
|
+
|
39
|
+
return (
|
40
|
+
<div
|
41
|
+
{...ariaProps}
|
42
|
+
{...dataProps}
|
43
|
+
className={css}
|
44
|
+
id={id}
|
45
|
+
>
|
46
|
+
<Title
|
47
|
+
className={title !== undefined ? 'pb_title_count_text' : ''}
|
48
|
+
size={size === 'lg' ? 3 : 4}
|
49
|
+
text={title}
|
50
|
+
/>
|
51
|
+
|
52
|
+
<Body color="light">
|
53
|
+
<If condition={count}>{formatCount}</If>
|
54
|
+
</Body>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
)
|
58
|
+
}
|
38
59
|
|
39
60
|
export default TitleCount
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { TitleCount } from '../../'
|
3
|
+
|
4
|
+
const TitleCountAlign = () => {
|
5
|
+
return (
|
6
|
+
<>
|
7
|
+
<TitleCount
|
8
|
+
count={527}
|
9
|
+
title="Remodeling Consultants"
|
10
|
+
/>
|
11
|
+
|
12
|
+
<br />
|
13
|
+
|
14
|
+
<TitleCount
|
15
|
+
align="center"
|
16
|
+
count={527}
|
17
|
+
title="Remodeling Consultants"
|
18
|
+
/>
|
19
|
+
|
20
|
+
<br />
|
21
|
+
|
22
|
+
<TitleCount
|
23
|
+
align="right"
|
24
|
+
count={527}
|
25
|
+
title="Remodeling Consultants"
|
26
|
+
/>
|
27
|
+
</>
|
28
|
+
)
|
29
|
+
}
|
30
|
+
|
31
|
+
export default TitleCountAlign
|
@@ -5,11 +5,22 @@ const TitleCountDefault = () => {
|
|
5
5
|
return (
|
6
6
|
<>
|
7
7
|
<TitleCount
|
8
|
-
count={35}
|
8
|
+
count={35.78}
|
9
9
|
title="Appointments"
|
10
10
|
/>
|
11
|
+
|
12
|
+
<br />
|
13
|
+
|
14
|
+
<TitleCount
|
15
|
+
count={7399}
|
16
|
+
size="lg"
|
17
|
+
title="Appointments"
|
18
|
+
/>
|
19
|
+
|
20
|
+
<br />
|
21
|
+
|
11
22
|
<TitleCount
|
12
|
-
count={
|
23
|
+
count={-379503.372}
|
13
24
|
size="lg"
|
14
25
|
title="Appointments"
|
15
26
|
/>
|