playbook_ui 13.13.0 → 13.14.0.pre.alpha.play1101betaicons1798

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/_playbook.scss +1 -0
  3. data/app/pb_kits/playbook/index.js +14 -1
  4. data/app/pb_kits/playbook/pb_avatar/_avatar.tsx +5 -5
  5. data/app/pb_kits/playbook/pb_avatar_action_button/_avatar_action_button.tsx +3 -3
  6. data/app/pb_kits/playbook/pb_background/_background.tsx +9 -9
  7. data/app/pb_kits/playbook/pb_badge/_badge.tsx +2 -2
  8. data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +3 -3
  9. data/app/pb_kits/playbook/pb_beta_icon/_icon.scss +12 -0
  10. data/app/pb_kits/playbook/pb_beta_icon/_icon.tsx +164 -0
  11. data/app/pb_kits/playbook/pb_beta_icon/docs/_description.md +1 -0
  12. data/app/pb_kits/playbook/pb_beta_icon/docs/_footer.md +2 -0
  13. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.html.erb +3 -0
  14. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.jsx +35 -0
  15. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_animate.md +1 -0
  16. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.html.erb +1 -0
  17. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border.jsx +19 -0
  18. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_border_swift.md +7 -0
  19. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.html.erb +16 -0
  20. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.jsx +34 -0
  21. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_custom.md +19 -0
  22. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.html.erb +1 -0
  23. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default.jsx +17 -0
  24. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_default_swift.md +7 -0
  25. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.html.erb +1 -0
  26. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.jsx +21 -0
  27. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_fa_kit.md +7 -0
  28. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.html.erb +3 -0
  29. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip.jsx +33 -0
  30. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_flip_swift.md +11 -0
  31. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_props_swift.md +8 -0
  32. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.html.erb +2 -0
  33. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.jsx +26 -0
  34. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_pull.md +1 -0
  35. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.html.erb +3 -0
  36. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate.jsx +33 -0
  37. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_rotate_swift.md +11 -0
  38. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.html.erb +16 -0
  39. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes.jsx +133 -0
  40. data/app/pb_kits/playbook/pb_beta_icon/docs/_icon_sizes_swift.md +46 -0
  41. data/app/pb_kits/playbook/pb_beta_icon/docs/example.yml +30 -0
  42. data/app/pb_kits/playbook/pb_beta_icon/docs/index.js +9 -0
  43. data/app/pb_kits/playbook/pb_beta_icon/icon.html.erb +15 -0
  44. data/app/pb_kits/playbook/pb_beta_icon/icon.rb +153 -0
  45. data/app/pb_kits/playbook/pb_beta_icon/icon.test.js +155 -0
  46. data/app/pb_kits/playbook/pb_body/_body.scss +0 -5
  47. data/app/pb_kits/playbook/pb_body/_body.tsx +5 -9
  48. data/app/pb_kits/playbook/pb_body/_body_mixins.scss +0 -20
  49. data/app/pb_kits/playbook/pb_body/body.rb +1 -8
  50. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumb_item.tsx +3 -4
  51. data/app/pb_kits/playbook/pb_bread_crumbs/_bread_crumbs.tsx +3 -3
  52. data/app/pb_kits/playbook/pb_button/_button.tsx +40 -37
  53. data/app/pb_kits/playbook/pb_button/docs/_button_props_swift.md +11 -0
  54. data/app/pb_kits/playbook/pb_button/docs/_button_reaction_swift.md +26 -0
  55. data/app/pb_kits/playbook/pb_button/docs/example.yml +1 -0
  56. data/app/pb_kits/playbook/pb_button_toolbar/_button_toolbar.tsx +3 -3
  57. data/app/pb_kits/playbook/pb_caption/_caption.tsx +1 -1
  58. data/app/pb_kits/playbook/pb_card/_card.tsx +2 -2
  59. data/app/pb_kits/playbook/pb_card/_card_mixin.scss +0 -1
  60. data/app/pb_kits/playbook/pb_card/docs/_card_background.jsx +5 -4
  61. data/app/pb_kits/playbook/pb_checkbox/_checkbox.tsx +3 -3
  62. data/app/pb_kits/playbook/pb_circle_chart/_circle_chart.tsx +9 -9
  63. data/app/pb_kits/playbook/pb_circle_icon_button/_circle_icon_button.tsx +1 -1
  64. data/app/pb_kits/playbook/pb_collapsible/_collapsible.tsx +5 -7
  65. data/app/pb_kits/playbook/pb_collapsible/_helper_functions.ts +2 -2
  66. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleContent.tsx +5 -4
  67. data/app/pb_kits/playbook/pb_collapsible/child_kits/CollapsibleMain.tsx +16 -12
  68. data/app/pb_kits/playbook/pb_contact/_contact.tsx +3 -3
  69. data/app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md +14 -0
  70. data/app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md +6 -0
  71. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md +14 -0
  72. data/app/pb_kits/playbook/pb_contact/docs/example.yml +6 -0
  73. data/app/pb_kits/playbook/pb_currency/_currency.tsx +2 -2
  74. data/app/pb_kits/playbook/pb_dashboard/pbChartsColorsHelper.ts +1 -1
  75. data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.ts +4 -57
  76. data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.ts +4 -57
  77. data/app/pb_kits/playbook/pb_dashboard/themeTypes.ts +20 -16
  78. data/app/pb_kits/playbook/pb_dashboard_value/_dashboard_value.tsx +1 -1
  79. data/app/pb_kits/playbook/pb_date/_date.tsx +7 -7
  80. data/app/pb_kits/playbook/pb_date/docs/_date_alignment_swift.md +11 -0
  81. data/app/pb_kits/playbook/pb_date/docs/_date_default_swift.md +16 -0
  82. data/app/pb_kits/playbook/pb_date/docs/_date_props_swift.md +8 -0
  83. data/app/pb_kits/playbook/pb_date/docs/_date_unstyled_swift.md +11 -0
  84. data/app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md +14 -0
  85. data/app/pb_kits/playbook/pb_date/docs/example.yml +7 -0
  86. data/app/pb_kits/playbook/pb_date_picker/_date_picker.tsx +4 -1
  87. data/app/pb_kits/playbook/pb_date_picker/date_picker.rb +3 -0
  88. data/app/pb_kits/playbook/pb_date_picker/date_picker_helper.ts +11 -10
  89. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.html.erb +29 -0
  90. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.jsx +34 -0
  91. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom.md +7 -0
  92. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.html.erb +28 -0
  93. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.jsx +34 -0
  94. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_custom_override.md +1 -0
  95. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_quick_pick_react.jsx +2 -2
  96. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +4 -0
  97. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +2 -0
  98. data/app/pb_kits/playbook/pb_date_picker/plugins/quickPick.tsx +69 -3
  99. data/app/pb_kits/playbook/pb_date_range_inline/_date_range_inline.tsx +2 -2
  100. data/app/pb_kits/playbook/pb_date_range_stacked/_date_range_stacked.tsx +2 -2
  101. data/app/pb_kits/playbook/pb_date_stacked/_date_stacked.tsx +8 -8
  102. data/app/pb_kits/playbook/pb_date_time/_date_time.tsx +2 -2
  103. data/app/pb_kits/playbook/pb_date_time_stacked/_date_time_stacked.tsx +1 -1
  104. data/app/pb_kits/playbook/pb_date_year_stacked/_date_year_stacked.tsx +2 -2
  105. data/app/pb_kits/playbook/pb_date_year_stacked/date_year_stacked.test.js +6 -3
  106. data/app/pb_kits/playbook/pb_detail/_detail.scss +2 -2
  107. data/app/pb_kits/playbook/pb_detail/_detail.tsx +5 -5
  108. data/app/pb_kits/playbook/pb_detail/detail.rb +1 -1
  109. data/app/pb_kits/playbook/pb_detail/detail.test.jsx +2 -2
  110. data/app/pb_kits/playbook/pb_dialog/_close_icon.tsx +2 -2
  111. data/app/pb_kits/playbook/pb_dialog/_dialog.tsx +42 -34
  112. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_body.tsx +1 -1
  113. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +4 -5
  114. data/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_header.tsx +4 -4
  115. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_default_swift.md +11 -0
  116. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height.jsx +8 -4
  117. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_full_height_placement.jsx +8 -4
  118. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_props_table.md +13 -0
  119. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx +4 -2
  120. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_sizes_swift.md +18 -0
  121. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status.jsx +1 -1
  122. data/app/pb_kits/playbook/pb_dialog/docs/_dialog_status_swift.md +14 -0
  123. data/app/pb_kits/playbook/pb_dialog/docs/example.yml +7 -0
  124. data/app/pb_kits/playbook/pb_distribution_bar/_distribution_bar.tsx +5 -5
  125. data/app/pb_kits/playbook/pb_enhanced_element/element_observer.ts +1 -1
  126. data/app/pb_kits/playbook/pb_enhanced_element/index.ts +1 -1
  127. data/app/pb_kits/playbook/pb_file_upload/_file_upload.tsx +1 -1
  128. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +1 -1
  129. data/app/pb_kits/playbook/pb_flex/_flex.tsx +1 -1
  130. data/app/pb_kits/playbook/pb_flex/_flex_item.tsx +1 -1
  131. data/app/pb_kits/playbook/pb_form_group/_form_group.tsx +1 -1
  132. data/app/pb_kits/playbook/pb_form_pill/_form_pill.tsx +1 -1
  133. data/app/pb_kits/playbook/pb_gauge/_gauge.tsx +1 -1
  134. data/app/pb_kits/playbook/pb_hashtag/_hashtag.tsx +1 -1
  135. data/app/pb_kits/playbook/pb_highlight/_highlight.tsx +1 -1
  136. data/app/pb_kits/playbook/pb_home_address_street/_home_address_street.tsx +1 -1
  137. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default_swift.md +18 -0
  138. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis_swift.md +34 -0
  139. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_link_swift.md +18 -0
  140. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_modified_swift.md +13 -0
  141. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_props_swift.md +14 -0
  142. data/app/pb_kits/playbook/pb_home_address_street/docs/example.yml +6 -0
  143. data/app/pb_kits/playbook/pb_icon/_icon.tsx +1 -1
  144. data/app/pb_kits/playbook/pb_icon_circle/_icon_circle.tsx +1 -1
  145. data/app/pb_kits/playbook/pb_icon_stat_value/_icon_stat_value.tsx +1 -1
  146. data/app/pb_kits/playbook/pb_icon_value/_icon_value.tsx +1 -1
  147. data/app/pb_kits/playbook/pb_image/_image.tsx +1 -1
  148. data/app/pb_kits/playbook/pb_label_pill/_label_pill.tsx +1 -1
  149. data/app/pb_kits/playbook/pb_label_value/_label_value.tsx +1 -1
  150. data/app/pb_kits/playbook/pb_layout/_layout.tsx +1 -1
  151. data/app/pb_kits/playbook/pb_legend/_legend.tsx +1 -1
  152. data/app/pb_kits/playbook/pb_lightbox/Header/_lightbox_header.tsx +1 -1
  153. data/app/pb_kits/playbook/pb_lightbox/_lightbox.tsx +1 -1
  154. data/app/pb_kits/playbook/pb_line_graph/_line_graph.tsx +1 -1
  155. data/app/pb_kits/playbook/pb_list/_list.tsx +1 -1
  156. data/app/pb_kits/playbook/pb_list/_list_item.tsx +1 -1
  157. data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.tsx +1 -1
  158. data/app/pb_kits/playbook/pb_map/_map.tsx +1 -1
  159. data/app/pb_kits/playbook/pb_message/_message.tsx +1 -1
  160. data/app/pb_kits/playbook/pb_message/_message_mention.tsx +1 -1
  161. data/app/pb_kits/playbook/pb_multi_level_select/_multi_level_select.tsx +1 -1
  162. data/app/pb_kits/playbook/pb_multiple_users/_multiple_users.tsx +1 -1
  163. data/app/pb_kits/playbook/pb_multiple_users_stacked/_multiple_users_stacked.tsx +1 -1
  164. data/app/pb_kits/playbook/pb_nav/_item.tsx +1 -1
  165. data/app/pb_kits/playbook/pb_nav/_nav.tsx +1 -1
  166. data/app/pb_kits/playbook/pb_online_status/_online_status.tsx +1 -1
  167. data/app/pb_kits/playbook/pb_passphrase/_passphrase.tsx +1 -1
  168. data/app/pb_kits/playbook/pb_person/_person.tsx +1 -1
  169. data/app/pb_kits/playbook/pb_person/docs/_person_default_swift.md +8 -0
  170. data/app/pb_kits/playbook/pb_person/docs/_person_props_swift.md +5 -0
  171. data/app/pb_kits/playbook/pb_person/docs/example.yml +4 -0
  172. data/app/pb_kits/playbook/pb_person_contact/_person_contact.tsx +1 -1
  173. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -1
  174. data/app/pb_kits/playbook/pb_pill/_pill.tsx +1 -1
  175. data/app/pb_kits/playbook/pb_popover/_popover.tsx +1 -1
  176. data/app/pb_kits/playbook/pb_progress_pills/_progress_pills.tsx +1 -1
  177. data/app/pb_kits/playbook/pb_progress_simple/_progress_simple.tsx +1 -1
  178. data/app/pb_kits/playbook/pb_progress_step/_progress_step.tsx +1 -1
  179. data/app/pb_kits/playbook/pb_progress_step/_progress_step_item.tsx +1 -1
  180. data/app/pb_kits/playbook/pb_radio/_radio.tsx +1 -1
  181. data/app/pb_kits/playbook/pb_rich_text_editor/_rich_text_editor.tsx +1 -1
  182. data/app/pb_kits/playbook/pb_section_separator/_section_separator.tsx +1 -1
  183. data/app/pb_kits/playbook/pb_select/_select.tsx +1 -1
  184. data/app/pb_kits/playbook/pb_select/docs/_select_default_swift.md +15 -0
  185. data/app/pb_kits/playbook/pb_select/docs/_select_error_swift.md +18 -0
  186. data/app/pb_kits/playbook/pb_select/docs/_select_props_table.md +8 -0
  187. data/app/pb_kits/playbook/pb_select/docs/example.yml +5 -0
  188. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.tsx +1 -1
  189. data/app/pb_kits/playbook/pb_selectable_card_icon/_selectable_card_icon.tsx +1 -1
  190. data/app/pb_kits/playbook/pb_selectable_icon/_selectable_icon.tsx +1 -1
  191. data/app/pb_kits/playbook/pb_selectable_list/_item.tsx +1 -1
  192. data/app/pb_kits/playbook/pb_selectable_list/_selectable_list.tsx +1 -1
  193. data/app/pb_kits/playbook/pb_source/_source.tsx +1 -1
  194. data/app/pb_kits/playbook/pb_star_rating/_star_rating.scss +105 -53
  195. data/app/pb_kits/playbook/pb_star_rating/_star_rating.tsx +185 -63
  196. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.html.erb +2 -0
  197. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_background_options.jsx +25 -0
  198. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.html.erb +3 -0
  199. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_color_options.jsx +31 -0
  200. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.html.erb +6 -8
  201. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +19 -6
  202. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.html.erb +4 -1
  203. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +30 -5
  204. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.html.erb +6 -0
  205. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_number_config.jsx +58 -0
  206. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.html.erb +16 -0
  207. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_size_options.jsx +60 -0
  208. data/app/pb_kits/playbook/pb_star_rating/docs/example.yml +12 -5
  209. data/app/pb_kits/playbook/pb_star_rating/docs/index.js +8 -0
  210. data/app/pb_kits/playbook/pb_star_rating/star_rating.html.erb +54 -26
  211. data/app/pb_kits/playbook/pb_star_rating/star_rating.rb +86 -6
  212. data/app/pb_kits/playbook/pb_star_rating/star_rating.test.js +34 -34
  213. data/app/pb_kits/playbook/pb_star_rating/stars/primary_star.svg +3 -0
  214. data/app/pb_kits/playbook/pb_star_rating/stars/star_outline.svg +3 -0
  215. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_dark_star.svg +3 -0
  216. data/app/pb_kits/playbook/pb_star_rating/stars/subtle_star.svg +3 -0
  217. data/app/pb_kits/playbook/pb_star_rating/stars/yellow_star.svg +3 -0
  218. data/app/pb_kits/playbook/pb_stat_change/_stat_change.tsx +1 -1
  219. data/app/pb_kits/playbook/pb_stat_value/_stat_value.tsx +1 -1
  220. data/app/pb_kits/playbook/pb_table/_table.tsx +1 -1
  221. data/app/pb_kits/playbook/pb_table/_table_row.tsx +1 -1
  222. data/app/pb_kits/playbook/pb_text_input/_text_input.tsx +1 -1
  223. data/app/pb_kits/playbook/pb_textarea/_textarea.tsx +1 -1
  224. data/app/pb_kits/playbook/pb_time/_time.tsx +1 -1
  225. data/app/pb_kits/playbook/pb_time_range_inline/_time_range_inline.tsx +1 -1
  226. data/app/pb_kits/playbook/pb_time_stacked/_time_stacked.tsx +1 -1
  227. data/app/pb_kits/playbook/pb_timeline/_item.tsx +1 -1
  228. data/app/pb_kits/playbook/pb_timeline/_timeline.tsx +1 -1
  229. data/app/pb_kits/playbook/pb_timestamp/_timestamp.tsx +1 -1
  230. data/app/pb_kits/playbook/pb_title/_title.scss +0 -5
  231. data/app/pb_kits/playbook/pb_title/_title.tsx +2 -5
  232. data/app/pb_kits/playbook/pb_title/_title_mixin.scss +0 -19
  233. data/app/pb_kits/playbook/pb_title/title.rb +2 -9
  234. data/app/pb_kits/playbook/pb_title_count/_title_count.tsx +1 -1
  235. data/app/pb_kits/playbook/pb_title_detail/_title_detail.tsx +1 -1
  236. data/app/pb_kits/playbook/pb_toggle/_toggle.tsx +1 -1
  237. data/app/pb_kits/playbook/pb_tooltip/_tooltip.tsx +1 -1
  238. data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.tsx +1 -1
  239. data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +1 -1
  240. data/app/pb_kits/playbook/pb_user/_user.tsx +1 -1
  241. data/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md +37 -0
  242. data/app/pb_kits/playbook/pb_user/docs/_user_props_table.md +10 -0
  243. data/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md +35 -0
  244. data/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md +27 -0
  245. data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md +35 -0
  246. data/app/pb_kits/playbook/pb_user/docs/example.yml +7 -0
  247. data/app/pb_kits/playbook/pb_user_badge/_user_badge.tsx +1 -1
  248. data/app/pb_kits/playbook/pb_walkthrough/_walkthrough.tsx +1 -1
  249. data/app/pb_kits/playbook/pb_weekday_stacked/_weekday_stacked.tsx +1 -1
  250. data/app/pb_kits/playbook/tokens/exports/exports.d.ts +1 -0
  251. data/app/pb_kits/playbook/utilities/_truncate.scss +20 -0
  252. data/app/pb_kits/playbook/utilities/globalProps.ts +13 -2
  253. data/app/pb_kits/playbook/utilities/props.ts +2 -2
  254. data/app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js +21 -0
  255. data/dist/menu.yml +240 -168
  256. data/dist/playbook-rails.js +6 -6
  257. data/lib/playbook/classnames.rb +1 -0
  258. data/lib/playbook/kit_base.rb +2 -0
  259. data/lib/playbook/truncate.rb +29 -0
  260. data/lib/playbook/version.rb +2 -2
  261. metadata +95 -7
@@ -15,12 +15,11 @@ type BodyProps = {
15
15
  data?: {[key: string]: string},
16
16
  highlightedText?: string[],
17
17
  highlighting?: boolean,
18
- htmlOptions?: {[key: string]: string | number | boolean | Function},
18
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
19
19
  id?: string,
20
20
  status?: 'neutral' | 'negative' | 'positive',
21
21
  tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div',
22
22
  text?: string,
23
- truncate?: null | '1' | '2' | '3' | '4' | '5',
24
23
  variant?: null | 'link',
25
24
  } & GlobalProps
26
25
 
@@ -39,21 +38,18 @@ const Body = (props: BodyProps): React.ReactElement => {
39
38
  status = null,
40
39
  tag = 'div',
41
40
  text = '',
42
- truncate = null,
43
41
  variant = null,
44
42
  } = props
45
43
 
46
- const ariaProps: {[key: string]: any} = buildAriaProps(aria)
47
- const dataProps: {[key: string]: any} = buildDataProps(data)
44
+ const ariaProps: {[key: string]: string} = buildAriaProps(aria)
45
+ const dataProps: {[key: string]: string} = buildDataProps(data)
48
46
  const htmlProps = buildHtmlProps(htmlOptions);
49
- const isTruncated = truncate ? `truncate_${truncate}` : ''
50
47
  const classes = classnames(
51
- buildCss('pb_body_kit', color, variant, status, isTruncated),
48
+ buildCss('pb_body_kit', color, variant, status),
52
49
  globalProps(props),
53
50
  className
54
51
  )
55
- const Tag: React.ReactElement | any = `${tag}`
56
-
52
+ const Tag: keyof JSX.IntrinsicElements = `${tag}`
57
53
 
58
54
  return (
59
55
  <Tag
@@ -36,26 +36,6 @@ $pb_body_status: (
36
36
  font-family: $font-family-base;
37
37
  }
38
38
 
39
- $pb_body_truncate: (
40
- truncate_1: 1,
41
- truncate_2: 2,
42
- truncate_3: 3,
43
- truncate_4: 4,
44
- truncate_5: 5
45
- );
46
-
47
- @mixin body_truncate {
48
- @each $name, $number in $pb_body_truncate {
49
- &[class*=_#{$name}] {
50
- overflow: hidden;
51
- display: -webkit-box;
52
- -webkit-line-clamp: $number;
53
- -webkit-box-orient: vertical;
54
- }
55
- }
56
- }
57
-
58
-
59
39
  // Colors ======================
60
40
  @mixin pb_body_light {
61
41
  @include pb_body($text_lt_light);
@@ -18,12 +18,9 @@ module Playbook
18
18
  default: false
19
19
  prop :highlighted_text, type: Playbook::Props::Array,
20
20
  default: []
21
- prop :truncate, type: Playbook::Props::Enum,
22
- values: [nil, "1", "2", "3", "4", "5"],
23
- default: nil
24
21
 
25
22
  def classname
26
- generate_classname("pb_body_kit", color_class, status_class, is_truncated)
23
+ generate_classname("pb_body_kit", color_class, status_class)
27
24
  end
28
25
 
29
26
  def content
@@ -31,10 +28,6 @@ module Playbook
31
28
  highlighting ? apply_highlight(body_text) : body_text
32
29
  end
33
30
 
34
- def is_truncated
35
- truncate ? "truncate_#{truncate}" : nil
36
- end
37
-
38
31
  private
39
32
 
40
33
  def apply_highlight(text)
@@ -13,15 +13,14 @@ import {
13
13
  type BreadCrumbItemProps = {
14
14
  aria?: {[key: string]: string},
15
15
  className?: string,
16
- data?: object,
17
- htmlOptions?: {[key: string]: string | number | boolean | Function},
16
+ data?: {[key: string]: string},
17
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
18
18
  id?: string,
19
19
  component?: "a" | "span",
20
20
  [x:string]: any;
21
21
  }
22
22
 
23
-
24
- const BreadCrumbItem = (props: BreadCrumbItemProps) => {
23
+ const BreadCrumbItem = (props: BreadCrumbItemProps): React.ReactElement => {
25
24
  const {
26
25
  aria = {},
27
26
  className,
@@ -12,13 +12,13 @@ import {
12
12
  type BreadCrumbsProps = {
13
13
  aria?: {[key: string]: string},
14
14
  className?: string,
15
- data?: object,
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
15
+ data?: {[key: string]: string},
16
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
17
  id?: string,
18
18
  text?: string,
19
19
  children?: React.ReactChild[] | React.ReactNode,
20
20
  }
21
- const BreadCrumbs = (props: BreadCrumbsProps) => {
21
+ const BreadCrumbs = (props: BreadCrumbsProps): React.ReactElement => {
22
22
  const {
23
23
  aria = { label: 'Breadcrumb Navigation' },
24
24
  className,
@@ -21,7 +21,7 @@ type ButtonPropTypes = {
21
21
  form?: string,
22
22
  fullWidth?: boolean,
23
23
  highlight?: boolean,
24
- htmlOptions?: {[key: string]: string | number | boolean | Function},
24
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
25
25
  icon?: string,
26
26
  iconRight?: boolean,
27
27
  id?: string,
@@ -66,7 +66,7 @@ const buttonClassName = (props: ButtonPropTypes) => {
66
66
  return className
67
67
  }
68
68
 
69
- const Button = (props: ButtonPropTypes) => {
69
+ const Button = (props: ButtonPropTypes): React.ReactElement => {
70
70
  const {
71
71
  aria = {},
72
72
  children,
@@ -150,16 +150,16 @@ const Button = (props: ButtonPropTypes) => {
150
150
  if (link) {
151
151
  return (
152
152
  <a
153
- {...ariaProps}
154
- {...dataProps}
155
- {...htmlProps}
156
- className={css}
157
- href={link}
158
- id={id}
159
- rel={target !== "child" ? "noreferrer" : null}
160
- role="link"
161
- tabIndex={tabIndex}
162
- target={getTargetAttribute()}
153
+ {...ariaProps}
154
+ {...dataProps}
155
+ {...htmlProps}
156
+ className={css}
157
+ href={link}
158
+ id={id}
159
+ rel={target !== "child" ? "noreferrer" : null}
160
+ role="link"
161
+ tabIndex={tabIndex}
162
+ target={getTargetAttribute()}
163
163
  >
164
164
  {ifLoading()}
165
165
  </a>
@@ -167,24 +167,27 @@ const Button = (props: ButtonPropTypes) => {
167
167
  } else if (variant === "reaction") {
168
168
  return (
169
169
  <button
170
- {...ariaProps}
171
- {...dataProps}
172
- {...htmlProps}
173
- className={css}
174
- disabled={disabled}
175
- form={form}
176
- id={id}
177
- onClick={onClick}
178
- role="button"
179
- tabIndex={tabIndex}
180
- type={htmlType}
181
- value={value}
170
+ {...ariaProps}
171
+ {...dataProps}
172
+ {...htmlProps}
173
+ className={css}
174
+ disabled={disabled}
175
+ form={form}
176
+ id={id}
177
+ onClick={onClick}
178
+ role="button"
179
+ tabIndex={tabIndex}
180
+ type={htmlType}
181
+ value={value}
182
182
  >
183
183
  {icon && isValidEmoji(icon) && (
184
184
  <Flex align='center'>
185
185
  <Icon icon={icon} />
186
186
  {count && (
187
- <Caption paddingLeft="xxs" size="xs">
187
+ <Caption
188
+ paddingLeft="xxs"
189
+ size="xs"
190
+ >
188
191
  {count}
189
192
  </Caption>
190
193
  )}
@@ -203,18 +206,18 @@ const Button = (props: ButtonPropTypes) => {
203
206
  } else {
204
207
  return (
205
208
  <button
206
- {...ariaProps}
207
- {...dataProps}
208
- {...htmlProps}
209
- className={css}
210
- disabled={disabled}
211
- form={form}
212
- id={id}
213
- onClick={onClick}
214
- role="button"
215
- tabIndex={tabIndex}
216
- type={htmlType}
217
- value={value}
209
+ {...ariaProps}
210
+ {...dataProps}
211
+ {...htmlProps}
212
+ className={css}
213
+ disabled={disabled}
214
+ form={form}
215
+ id={id}
216
+ onClick={onClick}
217
+ role="button"
218
+ tabIndex={tabIndex}
219
+ type={htmlType}
220
+ value={value}
218
221
  >
219
222
  {ifLoading()}
220
223
  </button>
@@ -9,3 +9,14 @@
9
9
  | **Icon** | `PBIcon` | Adds an icon to the Button | `nil` | |
10
10
  | **Icon Position** | `IconPosition` | Adjusts the icon's position | `.left` | `.left` `.right` |
11
11
  | **Action** | `(() -> Void)` | Adds an action for the Button to perform | `{}` | |
12
+
13
+ ### Reaction Button Props
14
+ | Name | Type | Description | Default | Values |
15
+ | --- | ----------- | --------- | --------- | --------- |
16
+ | **count** | `Int` | Tracks number of times a reaction button has been pressed | `0` | |
17
+ | **isHighlighted** | `Bool` | Boolean for whether or not a reaction button has a highlight | ` false` | `true` `false` |
18
+ | **isHovering** | `Bool` | Boolean for whether or not a mouse is hovering over the reaction button | `false` | `true` `false` |
19
+ | **icon** | `String` | Allows user to use a unicode string for an emoji reaction button | | |
20
+ | **pbIcon** | `PBIcon` | A PlayBook Icon option for reaction button | | |
21
+ | **isInteractive** | `Bool` | Boolean for whether or not a reaction button is interactive | `false` | `true` `false` |
22
+
@@ -0,0 +1,26 @@
1
+ ![reaction-button](https://github.com/powerhome/playbook/assets/54749071/10d21ee2-4faf-4c18-ab72-242df8f837c4)
2
+
3
+ ```swift
4
+ @State private var count: Int = 153
5
+ @State private var count1: Int = 5
6
+
7
+ HStack(alignment: .center, spacing: 12) {
8
+ PBReactionButton(
9
+ count: $count,
10
+ icon: "\u{1F389}",
11
+ isInteractive: true
12
+ )
13
+ PBReactionButton(
14
+ count: $count1,
15
+ icon: "1️⃣",
16
+ isInteractive: false
17
+ )
18
+ PBReactionButton(
19
+ isInteractive: false
20
+ )
21
+ PBReactionButton(
22
+ pbIcon: PBIcon(FontAwesome.user),
23
+ isInteractive: false
24
+ )
25
+ }
26
+ ```
@@ -32,4 +32,5 @@ examples:
32
32
  - button_icon_options_swift: Button Icon Options
33
33
  - button_circle_swift: Circle Button
34
34
  - button_size_swift: Button Size
35
+ - button_reaction_swift: Button Reaction
35
36
  - button_props_swift: ""
@@ -12,8 +12,8 @@ type ButtonToolbarProps = {
12
12
  children?: React.ReactChild[] | React.ReactChild,
13
13
  className?: string,
14
14
  connected?: boolean,
15
- data?: object,
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
15
+ data?: {[key: string]: string},
16
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
17
  id?: string,
18
18
  onClick?: React.MouseEventHandler<HTMLSpanElement>,
19
19
  orientation?: "horizontal" | "vertical",
@@ -21,7 +21,7 @@ type ButtonToolbarProps = {
21
21
  variant?: "primary" | "secondary",
22
22
  }
23
23
 
24
- const ButtonToolbar = (props: ButtonToolbarProps) => {
24
+ const ButtonToolbar = (props: ButtonToolbarProps): React.ReactElement => {
25
25
  const {
26
26
  aria = {},
27
27
  children,
@@ -9,7 +9,7 @@ type CaptionProps = {
9
9
  className?: string,
10
10
  color?: "default" | "light" | "lighter" | "success" | "error" | "link",
11
11
  data?: {[key: string]: string},
12
- htmlOptions?: {[key: string]: string | number | boolean | Function},
12
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
13
13
  id?: string,
14
14
  size?: "xs" | "sm" | "md" | "lg" | "xl",
15
15
  tag?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "caption",
@@ -16,7 +16,7 @@ type CardPropTypes = {
16
16
  children: React.ReactChild[] | React.ReactChild | number,
17
17
  className?: string,
18
18
  data?: {[key: string]: string},
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
19
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
20
20
  highlight?: {
21
21
  position?: "side" | "top",
22
22
  color?: string,
@@ -69,7 +69,7 @@ const Body = (props: CardBodyProps) => {
69
69
  )
70
70
  }
71
71
 
72
- const Card = (props: CardPropTypes) => {
72
+ const Card = (props: CardPropTypes): React.ReactElement => {
73
73
  const {
74
74
  aria = {},
75
75
  background = 'none',
@@ -80,7 +80,6 @@ $pb_card_header_colors: map-merge(map-merge($product_colors, $additional_colors)
80
80
  width: $width;
81
81
  height: $height;
82
82
  background: $background;
83
- z-index: 10;
84
83
  }
85
84
 
86
85
  @mixin pb_card_header_color($header_color) {
@@ -57,7 +57,7 @@ const CardBackground = (props) => {
57
57
  background="product_1_background"
58
58
  marginBottom="sm"
59
59
  {...props}
60
- >
60
+ >
61
61
  <Body
62
62
  dark
63
63
  text="Product 1 Background"
@@ -69,11 +69,12 @@ const CardBackground = (props) => {
69
69
  <Card
70
70
  background="product_7_highlight"
71
71
  marginBottom="sm"
72
- {...props} >
72
+ {...props}
73
+ >
73
74
  <Body
74
75
  dark
75
- text="Product 7 Highlight"
76
- />
76
+ text="Product 7 Highlight"
77
+ />
77
78
  </Card>
78
79
 
79
80
 
@@ -13,7 +13,7 @@ type CheckboxProps = {
13
13
  dark?: boolean,
14
14
  data?: {[key: string]: string},
15
15
  error?: boolean,
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
16
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
17
  id?: string,
18
18
  indeterminate?: boolean,
19
19
  name?: string,
@@ -23,7 +23,7 @@ type CheckboxProps = {
23
23
  value?: string,
24
24
  } & GlobalProps
25
25
 
26
- const Checkbox = (props: CheckboxProps): JSX.Element => {
26
+ const Checkbox = (props: CheckboxProps): React.ReactElement => {
27
27
  const {
28
28
  aria = {},
29
29
  checked = false,
@@ -73,7 +73,7 @@ const Checkbox = (props: CheckboxProps): JSX.Element => {
73
73
  tabIndex={tabIndex}
74
74
  type="checkbox"
75
75
  value={value}
76
- />)
76
+ />)
77
77
  }
78
78
 
79
79
  return (
@@ -18,12 +18,12 @@ type CircleChartProps = {
18
18
  children?: Node;
19
19
  className?: string;
20
20
  colors?: string[];
21
- dark?: Boolean;
22
- data?: Object;
21
+ dark?: boolean;
22
+ data?: {[key: string]: string},
23
23
  dataLabelHtml?: string;
24
24
  dataLabels?: boolean;
25
25
  height?: string;
26
- htmlOptions?: { [key: string]: string | number | boolean | Function };
26
+ htmlOptions?: { [key: string]: string | number | boolean | (() => void) };
27
27
  id?: string;
28
28
  innerSize?: "sm" | "md" | "lg" | "none";
29
29
  legend?: boolean;
@@ -180,29 +180,29 @@ const CircleChart = ({
180
180
  {children ? (
181
181
  <div id={`wrapper-circle-chart-${id}`}>
182
182
  <HighchartsReact
183
- containerProps={{
183
+ containerProps={{
184
184
  className: classnames("pb_circle_chart", globalProps(props)),
185
185
  id: id,
186
186
  ...ariaProps,
187
187
  ...dataProps,
188
188
  ...htmlProps,
189
189
  }}
190
- highcharts={Highcharts}
191
- options={options}
190
+ highcharts={Highcharts}
191
+ options={options}
192
192
  />
193
193
  <div className="pb-circle-chart-block">{children}</div>
194
194
  </div>
195
195
  ) : (
196
196
  <HighchartsReact
197
- containerProps={{
197
+ containerProps={{
198
198
  className: classnames("pb_circle_chart", globalProps(props)),
199
199
  id: id,
200
200
  ...ariaProps,
201
201
  ...dataProps,
202
202
  ...htmlProps,
203
203
  }}
204
- highcharts={Highcharts}
205
- options={options}
204
+ highcharts={Highcharts}
205
+ options={options}
206
206
  />
207
207
  )}
208
208
  </>
@@ -13,7 +13,7 @@ type CircleIconButtonProps = {
13
13
  data?: { [key: string]: string },
14
14
  disabled?: boolean,
15
15
  icon: string,
16
- htmlOptions?: {[key: string]: string | number | boolean | Function},
16
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
17
17
  id?: string,
18
18
  link?: string,
19
19
  onClick?: React.MouseEventHandler<HTMLElement>,
@@ -12,22 +12,20 @@ import { IconSizes } from "../pb_icon/_icon"
12
12
 
13
13
 
14
14
  type CollapsibleProps = {
15
- children?: JSX.Element | [] | any,
15
+ children?: React.ReactElement | [] | any,
16
16
  aria?: {[key: string]: string},
17
17
  className?: string,
18
18
  collapsed?: boolean,
19
- data?: object,
19
+ data?: {[key: string]: string},
20
20
  icon?: string | string[],
21
21
  iconColor?: 'default' | 'light' | 'lighter' | 'link' | 'error' | 'success',
22
22
  iconSize?: IconSizes,
23
23
  onIconClick?: ()=> void,
24
24
  onClick?: ()=> void,
25
- htmlOptions?: {[key: string]: string | number | boolean | Function},
25
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
26
26
  id?: string,
27
27
  }
28
28
 
29
-
30
-
31
29
  const Collapsible = ({
32
30
  aria = {},
33
31
  className,
@@ -42,14 +40,14 @@ const Collapsible = ({
42
40
  onClick,
43
41
  id,
44
42
  ...props
45
- }: CollapsibleProps) => {
43
+ }: CollapsibleProps): React.ReactElement => {
46
44
  const [isCollapsed, toggle, setIsCollapsed] = useCollapsible(collapsed)
47
45
 
48
46
  useEffect(()=> {
49
47
  setIsCollapsed(collapsed)
50
48
  },[collapsed])
51
49
 
52
- const CollapsibleParent = React.Children.toArray(children) as JSX.Element[]
50
+ const CollapsibleParent = React.Children.toArray(children) as React.ReactElement[]
53
51
 
54
52
  if (CollapsibleParent.length !== 2) {
55
53
  throw new Error('Collapsible requires <CollapsibleMain> and <CollapsibleContent> to function properly.')
@@ -1,4 +1,4 @@
1
- export const showElement = (elem:any) => {
1
+ export const showElement = (elem: HTMLElement) => {
2
2
  elem.style.display = 'block';
3
3
  const height = elem.scrollHeight + 'px'; // Get its height
4
4
  elem.style.height = height; // Update the max-height
@@ -11,7 +11,7 @@ export const showElement = (elem:any) => {
11
11
  }, 300);
12
12
  };
13
13
 
14
- export const hideElement = (elem:any) => {
14
+ export const hideElement = (elem: HTMLElement) => {
15
15
  elem.style.height = elem.scrollHeight + 'px';
16
16
 
17
17
  window.setTimeout(() => {
@@ -15,7 +15,7 @@ const CollapsibleContent = ({
15
15
  children,
16
16
  className,
17
17
  ...props
18
- }: CollapsibleContentProps) => {
18
+ }: CollapsibleContentProps): React.ReactElement => {
19
19
  const context: {[key: string]: boolean | string} = useContext(CollapsibleContext)
20
20
  const contentCSS = buildCss('pb_collapsible_content_kit')
21
21
  const contentSpacing = globalProps(props)
@@ -33,9 +33,10 @@ const CollapsibleContent = ({
33
33
  }, [context.collapsed]);
34
34
 
35
35
  return (
36
- <div ref={contentRef}
37
- data-collapsible-content="true"
38
- className={classnames(contentCSS, contentSpacing, "toggle-content", className)}>
36
+ <div className={classnames(contentCSS, contentSpacing, "toggle-content", className)}
37
+ data-collapsible-content="true"
38
+ ref={contentRef}
39
+ >
39
40
  {children}
40
41
  </div>
41
42
  )
@@ -56,7 +56,7 @@ const ToggleIcon = ({ collapsed, icon, iconSize, iconColor, onIconClick }: IconP
56
56
  return icon
57
57
  }
58
58
 
59
- const handleIconClick = (e:any) => {
59
+ const handleIconClick = (e: React.MouseEvent<HTMLElement>) => {
60
60
  if (onIconClick) {
61
61
  e.stopPropagation();
62
62
  onIconClick()
@@ -67,21 +67,25 @@ const ToggleIcon = ({ collapsed, icon, iconSize, iconColor, onIconClick }: IconP
67
67
  <>
68
68
  {collapsed ? (
69
69
  <div
70
- className="icon_wrapper"
71
- key={icon ? showIcon(icon)[0] : "chevron-down"}
72
- style={{ verticalAlign: "middle", color: color }}
73
- onClick={(e)=> handleIconClick(e)}
70
+ className="icon_wrapper"
71
+ key={icon ? showIcon(icon)[0] : "chevron-down"}
72
+ onClick={(e)=> handleIconClick(e)}
73
+ style={{ verticalAlign: "middle", color: color }}
74
74
  >
75
- <Icon icon={icon ? showIcon(icon)[0] : "chevron-down"} size={iconSize} />
75
+ <Icon icon={icon ? showIcon(icon)[0] : "chevron-down"}
76
+ size={iconSize}
77
+ />
76
78
  </div>
77
79
  ) : (
78
80
  <div
79
- className="icon_wrapper"
80
- key={icon ? showIcon(icon)[1] : "chevron-up"}
81
- style={{ verticalAlign: "middle", color: color }}
82
- onClick={(e)=> handleIconClick(e)}
81
+ className="icon_wrapper"
82
+ key={icon ? showIcon(icon)[1] : "chevron-up"}
83
+ onClick={(e)=> handleIconClick(e)}
84
+ style={{ verticalAlign: "middle", color: color }}
83
85
  >
84
- <Icon icon={icon ? showIcon(icon)[1] : "chevron-up"} size={iconSize} />
86
+ <Icon icon={icon ? showIcon(icon)[1] : "chevron-up"}
87
+ size={iconSize}
88
+ />
85
89
  </div>
86
90
  )}
87
91
  </>
@@ -118,9 +122,9 @@ const CollapsibleMain = ({
118
122
  <FlexItem>
119
123
  <ToggleIcon
120
124
  collapsed={collapsed as () => void}
125
+ icon={icon as string[] | string}
121
126
  iconColor={iconColor as IconColors}
122
127
  iconSize={iconSize as IconSizes}
123
- icon={icon as string[] | string}
124
128
  onIconClick={onIconClick}
125
129
  />
126
130
  </FlexItem>
@@ -50,12 +50,12 @@ type ContactProps = {
50
50
  contactDetail?: string,
51
51
  contactType?: string,
52
52
  contactValue: string,
53
- data?: object,
54
- htmlOptions?: {[key: string]: string | number | boolean | Function},
53
+ data?: {[key: string]: string},
54
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
55
55
  id?: string,
56
56
  }
57
57
 
58
- const Contact = (props: ContactProps) => {
58
+ const Contact = (props: ContactProps): React.ReactElement => {
59
59
  const {
60
60
  aria = {},
61
61
  className,
@@ -0,0 +1,14 @@
1
+ ![contact-default](https://github.com/powerhome/playbook/assets/92755007/4226a1e0-5f31-4445-a536-57e95b83768a)
2
+
3
+ ```swift
4
+
5
+ VStack(alignment: .leading, spacing: Spacing.small) {
6
+ PBContact(type: .cell, value: "3491859988")
7
+ PBContact(value: "5555555555")
8
+ PBContact(type: .email, value: "email@example.com")
9
+ PBContact(type: .work, value: "3245627482")
10
+ PBContact(type: .workCell, value: "3245627482")
11
+ }
12
+
13
+
14
+ ```
@@ -0,0 +1,6 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **detail** | `Bool` | Displays text describing the Contact's type | `false` | `true` `false` |
5
+ | **contactValue** | `String` | Sets the Contact's text value | | |
6
+ | **type** | `ContactType` | Sets the icon | `.home` | `cell` `email` `home` `work` `workCell` `wrongPhone` `ext` `custom` |