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
@@ -0,0 +1,37 @@
1
+ ![user-horizontal](https://github.com/powerhome/playbook/assets/92755007/63680051-6a88-4ae7-bffd-74d8e9b3a805)
2
+
3
+ ```swift
4
+
5
+ let img = Image("andrew", bundle: .module)
6
+ let name = "Andrew K"
7
+ let title = "Rebels Developer"
8
+
9
+ VStack(alignment: .leading, spacing: Spacing.small) {
10
+ PBUser(
11
+ name: name,
12
+ image: img,
13
+ territory: "PHL",
14
+ title: title
15
+ )
16
+
17
+ PBUser(
18
+ name: name,
19
+ territory: "PHL",
20
+ title: title
21
+ )
22
+
23
+ PBUser(
24
+ name: name,
25
+ image: img,
26
+ size: .small,
27
+ title: title
28
+ )
29
+
30
+ PBUser(
31
+ name: name,
32
+ image: img,
33
+ size: .small
34
+ )
35
+ }
36
+
37
+ ```
@@ -0,0 +1,10 @@
1
+ ### Props
2
+ | Name | Type | Description | Default | Values |
3
+ | --- | ----------- | --------- | --------- | --------- |
4
+ | **name** | `String` | Sets the User's name | | |
5
+ | **displayAvatar** | `Bool` | Displays the User's avatar | `true` | `true` `false` |
6
+ | **image** | `Image` | Sets image for the avatar | | |
7
+ | **orientation** | `Orientation` | Changes the orientation of the User | `.horizontal` | `.horizontal` `.verticle` |
8
+ | **size** | `UserAvatarSize` | Changes the size of the User | `.medium` | `.small` `.medium` `.large` |
9
+ | **territory** | `String` | Adds the User's territory | | |
10
+ | **title** | `String` | Adds a title | | |
@@ -0,0 +1,35 @@
1
+ ![user-size](https://github.com/powerhome/playbook/assets/54749071/ed012a15-64a1-4c13-a0bc-7457660992f6)
2
+
3
+
4
+ ```swift
5
+
6
+ let img = Image("andrew", bundle: .module)
7
+ let name = "Andrew K"
8
+ let title = "Rebels Developer"
9
+
10
+ VStack(alignment: .leading, spacing: Spacing.small) {
11
+ PBUser(
12
+ name: name,
13
+ image: img,
14
+ size: .small,
15
+ territory: "PHL",
16
+ title: title
17
+ )
18
+
19
+ PBUser(
20
+ name: name,
21
+ image: img,
22
+ territory: "PHL",
23
+ title: title
24
+ )
25
+
26
+ PBUser(
27
+ name: name,
28
+ image: img,
29
+ size: .large,
30
+ territory: "PHL",
31
+ title: title
32
+ )
33
+ }
34
+
35
+ ```
@@ -0,0 +1,27 @@
1
+ ![user-text-only](https://github.com/powerhome/playbook/assets/54749071/ba04df54-6590-4db6-ad32-38932a08aced)
2
+
3
+
4
+ ```swift
5
+
6
+ let img = Image("andrew", bundle: .module)
7
+ let name = "Andrew K"
8
+ let title = "Rebels Developer"
9
+
10
+ VStack(spacing: Spacing.small) {
11
+ PBUser(
12
+ name: name,
13
+ displayAvatar: false,
14
+ size: .large,
15
+ territory: "PHL",
16
+ title: title
17
+ )
18
+
19
+ PBUser(
20
+ name: name,
21
+ displayAvatar: false,
22
+ territory: "PHL",
23
+ title: title
24
+ )
25
+ }
26
+
27
+ ```
@@ -0,0 +1,35 @@
1
+ ![user-verticle-size](https://github.com/powerhome/playbook/assets/54749071/e99b4c9b-0752-467e-971e-a6a5f520009e)
2
+
3
+
4
+ ```swift
5
+
6
+ let img = Image("andrew", bundle: .module)
7
+ let name = "Andrew K"
8
+ let title = "Rebels Developer"
9
+
10
+ VStack(alignment: .leading, spacing: Spacing.small) {
11
+ PBUser(
12
+ name: name,
13
+ image: img,
14
+ orientation: .vertical,
15
+ size: .small,
16
+ title: title
17
+ )
18
+
19
+ PBUser(
20
+ name: name,
21
+ image: img,
22
+ orientation: .vertical,
23
+ title: title
24
+ )
25
+
26
+ PBUser(
27
+ name: name,
28
+ image: img,
29
+ orientation: .vertical,
30
+ size: .large,
31
+ title: title
32
+ )
33
+ }
34
+
35
+ ```
@@ -17,3 +17,10 @@ examples:
17
17
  - user_vertical_size: Vertical Size
18
18
  - user_subtitle: Subtitle
19
19
  - user_block_content_subtitle_react: Block Content Subtitle
20
+
21
+ swift:
22
+ - user_horizontal_swift: Horizontal
23
+ - user_vertical_size_swift: Vertical
24
+ - user_text_only_swift: Text Only
25
+ - user_size_swift: Horizontal Size
26
+ - user_props_table: ""
@@ -10,7 +10,7 @@ type UserBadgeProps = {
10
10
  badge?: "million-dollar" | "veteran",
11
11
  className?: string,
12
12
  data?: {[key: string]: string},
13
- htmlOptions?: {[key: string]: string | number | boolean | Function},
13
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
14
14
  id?: string,
15
15
  size?: "sm" | "md" | "lg",
16
16
  }
@@ -14,7 +14,7 @@ type WalkthroughProps = {
14
14
  className?: string,
15
15
  continuous?: boolean,
16
16
  data?: { [key: string]: string },
17
- htmlOptions?: {[key: string]: string | number | boolean | Function},
17
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
18
18
  id?: string,
19
19
  run?: boolean,
20
20
  steps?: [],
@@ -16,7 +16,7 @@ type WeekdayStackedProps = {
16
16
  dark?: boolean,
17
17
  data?: object,
18
18
  date: Date,
19
- htmlOptions?: {[key: string]: string | number | boolean | Function},
19
+ htmlOptions?: {[key: string]: string | number | boolean | (() => void)},
20
20
  id?: string,
21
21
  variant?: "day_only" | "month_day" | "expanded",
22
22
  compact?: boolean,
@@ -0,0 +1 @@
1
+ declare module '*.scss';
@@ -0,0 +1,20 @@
1
+ $truncate-styles: (
2
+ truncate_1: 1,
3
+ truncate_2: 2,
4
+ truncate_3: 3,
5
+ truncate_4: 4,
6
+ truncate_5: 5
7
+ );
8
+
9
+ @mixin apply_truncate_styles($number) {
10
+ overflow: hidden;
11
+ display: -webkit-box;
12
+ -webkit-line-clamp: $number;
13
+ -webkit-box-orient: vertical;
14
+ }
15
+
16
+ @each $class, $number in $truncate-styles {
17
+ .#{$class} {
18
+ @include apply_truncate_styles($number);
19
+ }
20
+ }
@@ -135,6 +135,11 @@ overflowY?: OverflowTypes,
135
135
  overflow?: OverflowTypes
136
136
  }
137
137
 
138
+ type TruncateType = None | 1 | 2 | 3 | 4 | 5
139
+ type Truncate = {
140
+ truncate?: TruncateType
141
+ }
142
+
138
143
  type ZIndexType = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
139
144
  type ZIndexResponsiveType = {[key: string]: ZIndexType}
140
145
  type ZIndex = {
@@ -146,7 +151,7 @@ export type GlobalProps = AlignContent & AlignItems & AlignSelf &
146
151
  BorderRadius & Cursor & Dark & Display & DisplaySizes & Flex & FlexDirection &
147
152
  FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
148
153
  LineHeight & Margin & MaxWidth & NumberSpacing & Order & Overflow & Padding &
149
- Position & Shadow & TextAlign & ZIndex & { hover?: string };
154
+ Position & Shadow & TextAlign & Truncate & ZIndex & { hover?: string };
150
155
 
151
156
  const getResponsivePropClasses = (prop: {[key: string]: string}, classPrefix: string) => {
152
157
  const keys: string[] = Object.keys(prop)
@@ -269,7 +274,13 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
269
274
  css += overflowY ? `overflow_y_${overflowY}` : ''
270
275
  return css
271
276
  },
272
-
277
+ truncateProps: ({ truncate }: Truncate) => {
278
+ if (typeof truncate === 'object') {
279
+ return ''
280
+ } else {
281
+ return truncate ? `truncate_${truncate}` : ''
282
+ }
283
+ },
273
284
  darkProps: ({ dark }: Dark) => dark ? 'dark' : '',
274
285
  numberSpacingProps: ({ numberSpacing }: NumberSpacing) => {
275
286
  let css = ''
@@ -57,8 +57,8 @@ export const buildCss = (...rules: (string | { [x: string]: string | boolean; })
57
57
  * @returns {Object} an object holding the HTML valid props and their values.
58
58
  */
59
59
 
60
- export const buildHtmlProps = (htmlOptions: { [key: string]: string | number | boolean | Function }) => {
61
- const htmlProps: { [attr: string]: string | number | boolean | Function } = {}
60
+ export const buildHtmlProps = (htmlOptions: { [key: string]: string | number | boolean | (() => void)}) => {
61
+ const htmlProps: { [attr: string]: string | number | boolean | (() => void) } = {}
62
62
  Object.keys(htmlOptions).forEach((key) => {
63
63
  htmlProps[key] = htmlOptions[key]
64
64
  })
@@ -0,0 +1,21 @@
1
+ import React from 'react'
2
+ import { render, screen } from '../../test-utils'
3
+
4
+ import Body from '../../../pb_body/_body'
5
+
6
+ const testSubject = 'body'
7
+
8
+ test('Global Props: Returns corrrect truncate class name', () => {
9
+ for(let x = 1, y = 5; x <= y; ++x) {
10
+ const testId = `${testSubject}-${x}`
11
+ render(
12
+ <Body
13
+ data={{ testid: testId }}
14
+ text="Hi"
15
+ truncate={`${x}`}
16
+ />
17
+ )
18
+ const kit = screen.getByTestId(testId)
19
+ expect(kit).toHaveClass(`truncate_${x}`)
20
+ }
21
+ })