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
@@ -2,19 +2,14 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
-
import {
|
6
|
-
Body,
|
7
|
-
Icon,
|
8
|
-
} from '../'
|
5
|
+
import { Body, Icon } from '../'
|
9
6
|
|
10
|
-
import {
|
11
|
-
|
12
|
-
|
13
|
-
buildDataProps,
|
14
|
-
} from '../utilities/props'
|
7
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
8
|
+
|
9
|
+
import { spacing } from '../utilities/spacing.js'
|
15
10
|
|
16
11
|
type IconValueProps = {
|
17
|
-
align?:
|
12
|
+
align?: "left" | "center" | "right",
|
18
13
|
aria?: object,
|
19
14
|
className?: string,
|
20
15
|
data?: object,
|
@@ -23,15 +18,16 @@ type IconValueProps = {
|
|
23
18
|
text: string,
|
24
19
|
}
|
25
20
|
|
26
|
-
const IconValue = ({
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
21
|
+
const IconValue = (props: IconValueProps) => {
|
22
|
+
const {
|
23
|
+
align = 'left',
|
24
|
+
aria = {},
|
25
|
+
className,
|
26
|
+
data = {},
|
27
|
+
icon,
|
28
|
+
id,
|
29
|
+
text,
|
30
|
+
} = props
|
35
31
|
const ariaProps = buildAriaProps(aria)
|
36
32
|
const dataProps = buildDataProps(data)
|
37
33
|
const pbCss = buildCss('pb_icon_value_kit', align)
|
@@ -40,7 +36,7 @@ const IconValue = ({
|
|
40
36
|
<div
|
41
37
|
{...ariaProps}
|
42
38
|
{...dataProps}
|
43
|
-
className={classnames(className, pbCss)}
|
39
|
+
className={classnames(className, pbCss, spacing(props))}
|
44
40
|
id={id}
|
45
41
|
>
|
46
42
|
<Body color="light">
|
@@ -1,21 +1,23 @@
|
|
1
1
|
/* @flow */
|
2
2
|
|
3
3
|
import React from 'react'
|
4
|
+
import classnames from 'classnames'
|
5
|
+
import { spacing } from '../utilities/spacing.js'
|
4
6
|
|
5
7
|
type ImageProps = {
|
6
8
|
url: string,
|
7
9
|
alt?: string,
|
8
10
|
}
|
9
11
|
|
10
|
-
const Image = ({
|
11
|
-
alt = '',
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
const Image = (props: ImageProps) => {
|
13
|
+
const { alt = '', url = '' } = props
|
14
|
+
return (
|
15
|
+
<img
|
16
|
+
alt={alt}
|
17
|
+
className={classnames('pb_image lazyload blur_up', spacing(props))}
|
18
|
+
data-src={url}
|
19
|
+
/>
|
20
|
+
)
|
21
|
+
}
|
20
22
|
|
21
23
|
export default Image
|
@@ -1,21 +1,56 @@
|
|
1
|
+
/* @flow */
|
2
|
+
|
1
3
|
import React from 'react'
|
2
|
-
import
|
4
|
+
import classnames from 'classnames'
|
5
|
+
import { spacing } from '../utilities/spacing.js'
|
3
6
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
}
|
7
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
8
|
+
|
9
|
+
import { Caption, Pill } from '../'
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
type LabelPillProps = {
|
12
|
+
aria?: object,
|
13
|
+
className?: String,
|
14
|
+
data?: object,
|
15
|
+
id?: String,
|
16
|
+
label?: String,
|
17
|
+
pillValue?: String,
|
18
|
+
variant: "error" | "info" | "neutral" | "primary" | "success" | "warning",
|
17
19
|
}
|
18
20
|
|
19
|
-
LabelPill
|
21
|
+
const LabelPill = (props: LabelPillProps) => {
|
22
|
+
const {
|
23
|
+
aria = {},
|
24
|
+
className,
|
25
|
+
data = {},
|
26
|
+
id,
|
27
|
+
label,
|
28
|
+
pillValue,
|
29
|
+
variant = 'neutral',
|
30
|
+
} = props
|
31
|
+
const ariaProps = buildAriaProps(aria)
|
32
|
+
const dataProps = buildDataProps(data)
|
33
|
+
const css = classnames(['pb_label_pill_kit', className], spacing(props))
|
34
|
+
|
35
|
+
return (
|
36
|
+
<div
|
37
|
+
{...ariaProps}
|
38
|
+
{...dataProps}
|
39
|
+
className={css}
|
40
|
+
id={id}
|
41
|
+
>
|
42
|
+
<Caption
|
43
|
+
className="pb_label_pill_label"
|
44
|
+
text={label}
|
45
|
+
/>
|
46
|
+
|
47
|
+
<Pill
|
48
|
+
className="pb_label_pill_pill"
|
49
|
+
text={pillValue}
|
50
|
+
variant={variant}
|
51
|
+
/>
|
52
|
+
</div>
|
53
|
+
)
|
54
|
+
}
|
20
55
|
|
21
56
|
export default LabelPill
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { LabelPill } from '../../'
|
3
|
+
|
4
|
+
const LabelPillDefault = () => (
|
5
|
+
|
6
|
+
<>
|
7
|
+
<LabelPill
|
8
|
+
label="Service Needed"
|
9
|
+
pillValue="76"
|
10
|
+
/>
|
11
|
+
|
12
|
+
<LabelPill
|
13
|
+
label="Waiting"
|
14
|
+
pillValue="69"
|
15
|
+
variant="success"
|
16
|
+
/>
|
17
|
+
|
18
|
+
<LabelPill
|
19
|
+
label="In Service"
|
20
|
+
pillValue="28"
|
21
|
+
variant="error"
|
22
|
+
/>
|
23
|
+
|
24
|
+
<LabelPill
|
25
|
+
label="Fully Serviced"
|
26
|
+
pillValue="101"
|
27
|
+
variant="warning"
|
28
|
+
/>
|
29
|
+
|
30
|
+
<LabelPill
|
31
|
+
label="Inbox"
|
32
|
+
pillValue="197"
|
33
|
+
variant="info"
|
34
|
+
/>
|
35
|
+
|
36
|
+
<LabelPill
|
37
|
+
label="Outbox"
|
38
|
+
pillValue="13"
|
39
|
+
variant="neutral"
|
40
|
+
/>
|
41
|
+
|
42
|
+
<LabelPill
|
43
|
+
label="Inbox"
|
44
|
+
pillValue="218"
|
45
|
+
variant="primary"
|
46
|
+
/>
|
47
|
+
</>
|
48
|
+
)
|
49
|
+
|
50
|
+
export default LabelPillDefault
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default as LabelPillDefault } from './_label_pill_default.jsx'
|
@@ -2,35 +2,47 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
+
import { buildAriaProps, buildDataProps } from '../utilities/props'
|
5
6
|
import { Body, Caption } from '../'
|
7
|
+
import { spacing } from '../utilities/spacing.js'
|
6
8
|
|
7
9
|
type LabelValueProps = {
|
10
|
+
aria?: object,
|
8
11
|
className?: String,
|
12
|
+
dark?: Boolean,
|
13
|
+
data?: object,
|
14
|
+
id?: String,
|
9
15
|
label: String,
|
10
16
|
value: String,
|
11
|
-
dark?: Boolean
|
12
17
|
}
|
13
18
|
|
14
|
-
const LabelValue = ({
|
15
|
-
|
16
|
-
|
17
|
-
value,
|
18
|
-
dark = false,
|
19
|
-
}: LabelValueProps) => {
|
20
|
-
const themeStyle = dark === true ? '_dark' : ''
|
21
|
-
const css = classnames([
|
22
|
-
'pb_label_value_kit' + themeStyle,
|
19
|
+
const LabelValue = (props: LabelValueProps) => {
|
20
|
+
const {
|
21
|
+
aria = {},
|
23
22
|
className,
|
24
|
-
|
23
|
+
dark = false,
|
24
|
+
data = {},
|
25
|
+
id,
|
26
|
+
label,
|
27
|
+
value } = props
|
28
|
+
|
29
|
+
const ariaProps = buildAriaProps(aria)
|
30
|
+
const dataProps = buildDataProps(data)
|
31
|
+
const themeStyle = dark === true ? '_dark' : ''
|
32
|
+
const css = classnames(
|
33
|
+
['pb_label_value_kit' + themeStyle, className],
|
34
|
+
spacing(props)
|
35
|
+
)
|
25
36
|
|
26
37
|
return (
|
27
|
-
<div
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
/>
|
38
|
+
<div
|
39
|
+
{...ariaProps}
|
40
|
+
{...dataProps}
|
41
|
+
className={css}
|
42
|
+
id={id}
|
43
|
+
>
|
44
|
+
<Caption text={label} />
|
45
|
+
<Body text={value} />
|
34
46
|
</div>
|
35
47
|
)
|
36
48
|
}
|
@@ -2,24 +2,24 @@
|
|
2
2
|
|
3
3
|
import React from 'react'
|
4
4
|
import classnames from 'classnames'
|
5
|
-
import {
|
6
|
-
|
7
|
-
|
8
|
-
buildDataProps,
|
9
|
-
} from '../utilities/props'
|
5
|
+
import { buildAriaProps, buildCss, buildDataProps } from '../utilities/props'
|
6
|
+
|
7
|
+
import { spacing } from '../utilities/spacing.js'
|
10
8
|
|
11
9
|
type LayoutPropTypes = {
|
12
10
|
aria?: object,
|
13
11
|
children?: Array<React.ReactNode> | React.ReactNode,
|
14
12
|
className?: String,
|
15
|
-
collapse?:
|
13
|
+
collapse?: "xs" | "sm" | "md" | "lg" | "xl",
|
16
14
|
dark?: Boolean,
|
17
15
|
data?: object,
|
18
16
|
full?: Boolean,
|
19
17
|
position?: 'left' | 'right',
|
20
18
|
size?: 'xs' | 'sm' | 'md' | 'base' | 'lg' | 'xl',
|
21
19
|
variant?: 'light' | 'dark' | 'gradient',
|
22
|
-
transparent?: Boolean
|
20
|
+
transparent?: Boolean,
|
21
|
+
layout?: 'sidebar' | 'collection',
|
22
|
+
|
23
23
|
}
|
24
24
|
|
25
25
|
type LayoutSideProps = {
|
@@ -33,69 +33,75 @@ type LayoutBodyProps = {
|
|
33
33
|
}
|
34
34
|
|
35
35
|
// Side component
|
36
|
-
const Side = ({
|
37
|
-
children,
|
38
|
-
className,
|
39
|
-
}: LayoutSideProps) => {
|
36
|
+
const Side = (props: LayoutSideProps) => {
|
37
|
+
const { children, className } = props
|
40
38
|
return (
|
41
|
-
<div className={classnames('layout_sidebar', className)}>
|
42
|
-
{children}
|
43
|
-
</div>
|
39
|
+
<div className={classnames('layout_sidebar', className, spacing(props))}>{children}</div>
|
44
40
|
)
|
45
41
|
}
|
46
42
|
|
47
43
|
// Body component
|
48
|
-
const Body = ({
|
49
|
-
children,
|
50
|
-
className,
|
51
|
-
}: LayoutBodyProps) => {
|
52
|
-
return (
|
53
|
-
<div className={classnames('layout_body', className)}>
|
54
|
-
{children}
|
55
|
-
</div>
|
56
|
-
)
|
44
|
+
const Body = (props: LayoutBodyProps) => {
|
45
|
+
const { children, className } = props
|
46
|
+
return <div className={classnames('layout_body', className, spacing(props))}>{children}</div>
|
57
47
|
}
|
58
48
|
|
59
49
|
// Main componenet
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
50
|
+
|
51
|
+
const Layout = (props: LayoutPropTypes) => {
|
52
|
+
const {
|
53
|
+
aria = {},
|
54
|
+
children,
|
55
|
+
className,
|
56
|
+
collapse = 'md',
|
57
|
+
dark = false,
|
58
|
+
data = {},
|
59
|
+
full = false,
|
60
|
+
position = 'left',
|
61
|
+
size = 'md',
|
62
|
+
layout = 'sidebar',
|
63
|
+
variant = 'light',
|
64
|
+
transparent = false,
|
65
|
+
} = props
|
73
66
|
const ariaProps = buildAriaProps(aria)
|
74
67
|
const dataProps = buildDataProps(data)
|
75
|
-
const layoutCss = buildCss(
|
68
|
+
const layoutCss = buildCss(`pb_layout_kit_${layout}`, `size_${size}`, position, variant, {
|
76
69
|
'dark': dark,
|
77
70
|
'transparent': transparent,
|
78
71
|
'full': full,
|
79
72
|
})
|
73
|
+
|
80
74
|
const layoutCollapseCss = buildCss('layout', position, 'collapse', collapse)
|
81
75
|
|
82
|
-
const layoutChildren =
|
76
|
+
const layoutChildren =
|
77
|
+
typeof children === 'object' && children.length ? children : [children]
|
83
78
|
|
84
79
|
const subComponentTags = (tagName) => {
|
85
|
-
return layoutChildren
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
80
|
+
return layoutChildren
|
81
|
+
.filter((c) => {
|
82
|
+
return c.type && c.type.displayName === tagName
|
83
|
+
})
|
84
|
+
.map((child, i) => {
|
85
|
+
return React.cloneElement(child, {
|
86
|
+
key: `${tagName.toLowerCase()}-${i}`,
|
87
|
+
})
|
88
|
+
})
|
90
89
|
}
|
91
90
|
|
92
|
-
const nonSideChildren = layoutChildren.filter(
|
91
|
+
const nonSideChildren = layoutChildren.filter(
|
92
|
+
(child) => !child.type || child.type.displayName !== 'Side'
|
93
|
+
)
|
93
94
|
|
94
95
|
return (
|
95
96
|
<div
|
96
97
|
{...ariaProps}
|
97
98
|
{...dataProps}
|
98
|
-
className={classnames(
|
99
|
+
className={classnames(
|
100
|
+
layoutCss,
|
101
|
+
layoutCollapseCss,
|
102
|
+
className,
|
103
|
+
spacing(props)
|
104
|
+
)}
|
99
105
|
>
|
100
106
|
{subComponentTags('Side')}
|
101
107
|
{nonSideChildren}
|