playbook_ui 7.9.0 → 7.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (395) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/playbook/application_controller.rb +5 -3
  3. data/app/helpers/playbook/application_helper.rb +13 -19
  4. data/app/helpers/playbook/pb_doc_helper.rb +35 -34
  5. data/app/helpers/playbook/pb_kit_helper.rb +1 -25
  6. data/app/helpers/playbook/pb_sample_helper.rb +27 -25
  7. data/app/pb_kits/playbook/index.js +3 -1
  8. data/app/pb_kits/playbook/pb_avatar_action_button/docs/_avatar_action_button_default.jsx +1 -1
  9. data/app/pb_kits/playbook/pb_background/docs/_background_dark.jsx +2 -1
  10. data/app/pb_kits/playbook/pb_background/docs/_background_gradient.jsx +2 -1
  11. data/app/pb_kits/playbook/pb_background/docs/_background_image.jsx +11 -3
  12. data/app/pb_kits/playbook/pb_background/docs/_background_light.jsx +2 -1
  13. data/app/pb_kits/playbook/pb_background/docs/_background_white.jsx +2 -1
  14. data/app/pb_kits/playbook/pb_badge/docs/_badge_colors.jsx +18 -18
  15. data/app/pb_kits/playbook/pb_badge/docs/_badge_default.jsx +3 -3
  16. data/app/pb_kits/playbook/pb_badge/docs/_badge_rounded.jsx +3 -3
  17. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_default.jsx +2 -1
  18. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_height.jsx +3 -1
  19. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend.jsx +2 -1
  20. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_non_clickable.jsx +2 -1
  21. data/app/pb_kits/playbook/pb_body/docs/_body_light.jsx +5 -5
  22. data/app/pb_kits/playbook/pb_button/docs/_button_accessibility.jsx +1 -1
  23. data/app/pb_kits/playbook/pb_button/docs/_button_block_content.jsx +1 -1
  24. data/app/pb_kits/playbook/pb_button/docs/_button_default.jsx +1 -1
  25. data/app/pb_kits/playbook/pb_button/docs/_button_full_width.jsx +1 -1
  26. data/app/pb_kits/playbook/pb_button/docs/_button_link.jsx +3 -3
  27. data/app/pb_kits/playbook/pb_button/docs/_button_loading.jsx +3 -3
  28. data/app/pb_kits/playbook/pb_button/docs/_button_options.jsx +1 -1
  29. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_default.jsx +10 -10
  30. data/app/pb_kits/playbook/pb_button_toolbar/docs/_button_toolbar_secondary.jsx +10 -10
  31. data/app/pb_kits/playbook/pb_caption/docs/_caption_block.jsx +2 -2
  32. data/app/pb_kits/playbook/pb_caption/docs/_caption_light.jsx +3 -3
  33. data/app/pb_kits/playbook/pb_caption/docs/_caption_variants.jsx +2 -1
  34. data/app/pb_kits/playbook/pb_card/_card.scss +3 -0
  35. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_checked.jsx +1 -1
  36. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_custom.jsx +2 -1
  37. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_default.jsx +1 -1
  38. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_error.jsx +1 -1
  39. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_block.jsx +3 -1
  40. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_colors.jsx +2 -1
  41. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_default.jsx +2 -1
  42. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_inner_sizes.jsx +5 -1
  43. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_live_data.jsx +3 -1
  44. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_rounded.jsx +2 -1
  45. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_labels.jsx +2 -1
  46. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_legend_kit.jsx +2 -1
  47. data/app/pb_kits/playbook/pb_circle_chart/docs/_circle_chart_with_title.jsx +2 -1
  48. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx +1 -1
  49. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.jsx +4 -4
  50. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +2 -3
  51. data/app/pb_kits/playbook/pb_contact/docs/_contact_default.jsx +5 -6
  52. data/app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx +4 -4
  53. data/app/pb_kits/playbook/pb_currency/docs/_currency_alignment.jsx +3 -3
  54. data/app/pb_kits/playbook/pb_currency/docs/_currency_no_symbol.jsx +1 -1
  55. data/app/pb_kits/playbook/pb_currency/docs/_currency_size.jsx +3 -3
  56. data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +3 -3
  57. data/app/pb_kits/playbook/pb_dashboard_value/docs/_dashboard_value_align.jsx +3 -3
  58. data/app/pb_kits/playbook/pb_dashboard_value/docs/_dashboard_value_default.jsx +3 -3
  59. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_anti_patterns.html.erb +23 -0
  60. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default.jsx +2 -1
  61. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.html.erb +4 -4
  62. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.jsx +6 -2
  63. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_default_date.md +3 -1
  64. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_disabled.html.erb +8 -8
  65. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_disabled.jsx +6 -1
  66. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_error.jsx +2 -1
  67. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_flatpickr_methods.html.erb +27 -0
  68. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_flatpickr_methods.jsx +44 -0
  69. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.html.erb +4 -4
  70. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_format.jsx +5 -1
  71. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_hide_icon.jsx +2 -1
  72. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_hooks.jsx +3 -1
  73. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_input.jsx +5 -1
  74. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_label.jsx +3 -1
  75. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.html.erb +2 -2
  76. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_min_max.jsx +3 -1
  77. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_on_change.jsx +4 -1
  78. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.html.erb +1 -1
  79. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range.jsx +3 -2
  80. data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_year_range.jsx +2 -1
  81. data/app/pb_kits/playbook/pb_date_picker/docs/_description.md +4 -2
  82. data/app/pb_kits/playbook/pb_date_picker/docs/example.yml +3 -1
  83. data/app/pb_kits/playbook/pb_date_picker/docs/index.js +1 -0
  84. data/app/pb_kits/playbook/pb_date_range_inline/docs/_date_range_inline_default.jsx +6 -6
  85. data/app/pb_kits/playbook/pb_date_range_stacked/docs/_date_range_stacked_dark.jsx +2 -1
  86. data/app/pb_kits/playbook/pb_date_range_stacked/docs/_date_range_stacked_default.jsx +2 -1
  87. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_align.jsx +7 -1
  88. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_dark.jsx +3 -1
  89. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_default.jsx +3 -1
  90. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_not_current_year.jsx +3 -1
  91. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_reverse.jsx +3 -1
  92. data/app/pb_kits/playbook/pb_date_stacked/docs/_date_stacked_sizes.jsx +3 -1
  93. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_dark.jsx +2 -1
  94. data/app/pb_kits/playbook/pb_date_time_stacked/docs/_date_time_stacked_default.jsx +5 -2
  95. data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_dark.jsx +4 -1
  96. data/app/pb_kits/playbook/pb_date_year_stacked/docs/_date_year_stacked_default.jsx +3 -1
  97. data/app/pb_kits/playbook/pb_distribution_bar/docs/_distribution_bar_default.jsx +3 -1
  98. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_accept.jsx +6 -2
  99. data/app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx +6 -2
  100. data/app/pb_kits/playbook/pb_filter/Filter/FilterDouble.jsx +20 -3
  101. data/app/pb_kits/playbook/pb_filter/Filter/FilterSingle.jsx +51 -31
  102. data/app/pb_kits/playbook/pb_filter/Filter/FiltersPopover.jsx +3 -4
  103. data/app/pb_kits/playbook/pb_filter/Filter/SortMenu.jsx +2 -2
  104. data/app/pb_kits/playbook/pb_filter/Filter/index.jsx +17 -16
  105. data/app/pb_kits/playbook/pb_filter/_filter.html.erb +1 -1
  106. data/app/pb_kits/playbook/pb_filter/_filter.scss +0 -2
  107. data/app/pb_kits/playbook/pb_filter/docs/_filter_default.jsx +6 -1
  108. data/app/pb_kits/playbook/pb_filter/docs/_filter_min_width.html.erb +41 -0
  109. data/app/pb_kits/playbook/pb_filter/docs/_filter_min_width.jsx +57 -0
  110. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.jsx +12 -2
  111. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_background.md +1 -0
  112. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.html.erb +35 -0
  113. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.jsx +52 -0
  114. data/app/pb_kits/playbook/pb_filter/docs/_filter_no_sort.md +1 -0
  115. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.html.erb +1 -1
  116. data/app/pb_kits/playbook/pb_filter/docs/_filter_only.jsx +6 -1
  117. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.html.erb +1 -1
  118. data/app/pb_kits/playbook/pb_filter/docs/_filter_single.jsx +6 -1
  119. data/app/pb_kits/playbook/pb_filter/docs/_sort_only.jsx +1 -1
  120. data/app/pb_kits/playbook/pb_filter/docs/example.yml +4 -0
  121. data/app/pb_kits/playbook/pb_filter/docs/index.js +2 -0
  122. data/app/pb_kits/playbook/pb_filter/filter.rb +1 -0
  123. data/app/pb_kits/playbook/pb_filter/templates/_core.html.erb +9 -9
  124. data/app/pb_kits/playbook/pb_filter/templates/_default.html.erb +1 -1
  125. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_close.jsx +4 -1
  126. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_dark.jsx +4 -1
  127. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_default.jsx +4 -1
  128. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx +2 -1
  129. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_dark.jsx +2 -1
  130. data/app/pb_kits/playbook/pb_flex/docs/_flex_default.jsx +5 -1
  131. data/app/pb_kits/playbook/pb_flex/docs/_flex_horizontal.jsx +17 -1
  132. data/app/pb_kits/playbook/pb_flex/docs/_flex_inline.jsx +5 -1
  133. data/app/pb_kits/playbook/pb_flex/docs/_flex_reverse.jsx +5 -1
  134. data/app/pb_kits/playbook/pb_flex/docs/_flex_spacing.jsx +9 -1
  135. data/app/pb_kits/playbook/pb_flex/docs/_flex_vertical.jsx +17 -5
  136. data/app/pb_kits/playbook/pb_flex/docs/_flex_wrap.jsx +5 -1
  137. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_tag.jsx +2 -1
  138. data/app/pb_kits/playbook/pb_form_pill/docs/_form_pill_user.jsx +5 -3
  139. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_default.jsx +2 -1
  140. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_disable_animation.jsx +2 -1
  141. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_full_circle.jsx +2 -1
  142. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_height.jsx +3 -1
  143. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_live_data.jsx +4 -1
  144. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_min_max.jsx +2 -1
  145. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_sizing.jsx +18 -4
  146. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_title.jsx +2 -1
  147. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_units.jsx +3 -1
  148. data/app/pb_kits/playbook/pb_highlight/docs/_highlight_default.jsx +3 -1
  149. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_default.jsx +2 -1
  150. data/app/pb_kits/playbook/pb_icon/docs/_icon_animate.jsx +3 -1
  151. data/app/pb_kits/playbook/pb_icon/docs/_icon_border.jsx +2 -1
  152. data/app/pb_kits/playbook/pb_icon/docs/_icon_default.jsx +2 -1
  153. data/app/pb_kits/playbook/pb_icon/docs/_icon_default_dark.jsx +2 -1
  154. data/app/pb_kits/playbook/pb_icon/docs/_icon_flip.jsx +4 -1
  155. data/app/pb_kits/playbook/pb_icon/docs/_icon_pull.jsx +3 -1
  156. data/app/pb_kits/playbook/pb_icon/docs/_icon_rotate.jsx +4 -1
  157. data/app/pb_kits/playbook/pb_icon/docs/_icon_sizes.jsx +14 -1
  158. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color.jsx +8 -1
  159. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_color_dark.jsx +8 -1
  160. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_dark.jsx +2 -1
  161. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_default.jsx +2 -1
  162. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes.jsx +5 -1
  163. data/app/pb_kits/playbook/pb_icon_circle/docs/_icon_circle_sizes_dark.jsx +5 -1
  164. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_color.jsx +8 -1
  165. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_default.jsx +3 -1
  166. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_sizes.jsx +4 -1
  167. data/app/pb_kits/playbook/pb_icon_stat_value/docs/_icon_stat_value_vertical.jsx +2 -1
  168. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_align.jsx +4 -1
  169. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_align_dark.jsx +4 -1
  170. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_dark.jsx +4 -1
  171. data/app/pb_kits/playbook/pb_icon_value/docs/_icon_value_default.jsx +4 -1
  172. data/app/pb_kits/playbook/pb_image/docs/_default_image.jsx +7 -1
  173. data/app/pb_kits/playbook/pb_image/docs/_rounded_image.jsx +6 -1
  174. data/app/pb_kits/playbook/pb_label_pill/docs/_label_pill_default.jsx +8 -1
  175. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_default.jsx +4 -1
  176. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details.jsx +5 -1
  177. data/app/pb_kits/playbook/pb_label_value/docs/_label_value_details_examples.jsx +12 -1
  178. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection.jsx +2 -1
  179. data/app/pb_kits/playbook/pb_layout/docs/_layout_collection_detail.jsx +7 -1
  180. data/app/pb_kits/playbook/pb_layout/docs/_layout_colors.jsx +6 -1
  181. data/app/pb_kits/playbook/pb_layout/docs/_layout_kanban.jsx +150 -1
  182. data/app/pb_kits/playbook/pb_layout/docs/_layout_kanban_responsive.jsx +2 -1
  183. data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes.jsx +6 -1
  184. data/app/pb_kits/playbook/pb_layout/docs/_layout_sizes_dark.jsx +6 -1
  185. data/app/pb_kits/playbook/pb_layout/docs/_layout_transparent.jsx +2 -1
  186. data/app/pb_kits/playbook/pb_legend/docs/_legend_default.jsx +2 -1
  187. data/app/pb_kits/playbook/pb_legend/docs/_legend_prefix.jsx +2 -1
  188. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_default.jsx +2 -1
  189. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_height.jsx +3 -1
  190. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend.jsx +2 -1
  191. data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_legend_nonclickable.jsx +2 -1
  192. data/app/pb_kits/playbook/pb_list/docs/_list_borderless.jsx +2 -1
  193. data/app/pb_kits/playbook/pb_list/docs/_list_layout_left.jsx +12 -1
  194. data/app/pb_kits/playbook/pb_list/docs/_list_layout_right.jsx +10 -1
  195. data/app/pb_kits/playbook/pb_list/docs/_list_lg.jsx +2 -1
  196. data/app/pb_kits/playbook/pb_list/docs/_list_ordered.jsx +2 -1
  197. data/app/pb_kits/playbook/pb_list/docs/_list_xpadding.jsx +2 -1
  198. data/app/pb_kits/playbook/pb_loading_inline/docs/_loading_inline_light.jsx +12 -4
  199. data/app/pb_kits/playbook/pb_message/docs/_message_default.jsx +7 -1
  200. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_default.jsx +3 -1
  201. data/app/pb_kits/playbook/pb_multiple_users/docs/_multiple_users_reverse.jsx +3 -1
  202. data/app/pb_kits/playbook/pb_multiple_users_stacked/docs/_multiple_users_stacked_default.jsx +4 -1
  203. data/app/pb_kits/playbook/pb_nav/_horizontal_nav.scss +22 -0
  204. data/app/pb_kits/playbook/pb_nav/_item.jsx +3 -0
  205. data/app/pb_kits/playbook/pb_nav/_subtle_mixin.scss +47 -0
  206. data/app/pb_kits/playbook/pb_nav/_vertical_nav.scss +2 -46
  207. data/app/pb_kits/playbook/pb_nav/docs/_block_nav.jsx +3 -1
  208. data/app/pb_kits/playbook/pb_nav/docs/_block_no_title_nav.jsx +6 -1
  209. data/app/pb_kits/playbook/pb_nav/docs/_borderless_nav.jsx +5 -1
  210. data/app/pb_kits/playbook/pb_nav/docs/_default_nav.jsx +6 -1
  211. data/app/pb_kits/playbook/pb_nav/docs/_horizontal_nav.jsx +6 -1
  212. data/app/pb_kits/playbook/pb_nav/docs/_new_tab.html.erb +6 -0
  213. data/app/pb_kits/playbook/pb_nav/docs/_new_tab.jsx +39 -0
  214. data/app/pb_kits/playbook/pb_nav/docs/_no_highlight_nav.jsx +5 -1
  215. data/app/pb_kits/playbook/pb_nav/docs/_subtle_horizontal_nav.html.erb +6 -0
  216. data/app/pb_kits/playbook/pb_nav/docs/_subtle_horizontal_nav.jsx +38 -0
  217. data/app/pb_kits/playbook/pb_nav/docs/_subtle_nav.jsx +7 -1
  218. data/app/pb_kits/playbook/pb_nav/docs/_subtle_no_highlight_nav.jsx +5 -1
  219. data/app/pb_kits/playbook/pb_nav/docs/_subtle_with_icons_nav.jsx +8 -1
  220. data/app/pb_kits/playbook/pb_nav/docs/_with_icons_nav.jsx +7 -1
  221. data/app/pb_kits/playbook/pb_nav/docs/_with_img_nav.jsx +7 -1
  222. data/app/pb_kits/playbook/pb_nav/docs/example.yml +4 -1
  223. data/app/pb_kits/playbook/pb_nav/docs/index.js +2 -0
  224. data/app/pb_kits/playbook/pb_nav/item.rb +5 -2
  225. data/app/pb_kits/playbook/pb_person/docs/_person_default.jsx +2 -1
  226. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_default.jsx +2 -1
  227. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_multiple.jsx +3 -1
  228. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_detail.jsx +2 -1
  229. data/app/pb_kits/playbook/pb_person_contact/docs/_person_contact_with_wrong_numbers.jsx +2 -1
  230. data/app/pb_kits/playbook/pb_popover/docs/_popover_close.jsx +4 -1
  231. data/app/pb_kits/playbook/pb_popover/docs/_popover_close_dark.jsx +4 -1
  232. data/app/pb_kits/playbook/pb_popover/docs/_popover_dark.jsx +4 -1
  233. data/app/pb_kits/playbook/pb_popover/docs/_popover_default.jsx +3 -1
  234. data/app/pb_kits/playbook/pb_popover/docs/_popover_list.jsx +2 -1
  235. data/app/pb_kits/playbook/pb_popover/docs/_popover_list_dark.jsx +4 -1
  236. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height.jsx +4 -1
  237. data/app/pb_kits/playbook/pb_popover/docs/_popover_scroll_height_dark.jsx +4 -1
  238. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index.jsx +3 -1
  239. data/app/pb_kits/playbook/pb_popover/docs/_popover_z_index_dark.jsx +3 -1
  240. data/app/pb_kits/playbook/pb_radio/_radio.jsx +4 -3
  241. data/app/pb_kits/playbook/pb_radio/docs/_radio_custom.jsx +7 -1
  242. data/app/pb_kits/playbook/pb_radio/docs/_radio_default.jsx +3 -0
  243. data/app/pb_kits/playbook/pb_radio/docs/index.js +1 -0
  244. data/app/pb_kits/playbook/pb_radio/radio.test.js +71 -0
  245. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_default.jsx +4 -2
  246. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_focus.jsx +9 -3
  247. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.html.erb +25 -0
  248. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_preview.jsx +45 -0
  249. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_simple.jsx +5 -2
  250. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_sticky.jsx +2 -1
  251. data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_templates.jsx +3 -1
  252. data/app/pb_kits/playbook/pb_rich_text_editor/docs/example.yml +3 -1
  253. data/app/pb_kits/playbook/pb_rich_text_editor/docs/index.js +1 -0
  254. data/app/pb_kits/playbook/pb_select/_select.jsx +4 -3
  255. data/app/pb_kits/playbook/pb_select/docs/_select_blank.jsx +2 -1
  256. data/app/pb_kits/playbook/pb_select/docs/_select_custom_select.jsx +2 -1
  257. data/app/pb_kits/playbook/pb_select/docs/_select_default.jsx +2 -1
  258. data/app/pb_kits/playbook/pb_select/docs/_select_disabled.jsx +2 -1
  259. data/app/pb_kits/playbook/pb_select/docs/_select_disabled_options.jsx +2 -1
  260. data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +3 -1
  261. data/app/pb_kits/playbook/pb_select/docs/_select_required.jsx +2 -1
  262. data/app/pb_kits/playbook/pb_select/docs/_select_value_text_same.jsx +2 -1
  263. data/app/pb_kits/playbook/pb_select/select.test.js +51 -0
  264. data/app/pb_kits/playbook/pb_selectable_card/_selectable_card.scss +2 -1
  265. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_block.jsx +4 -1
  266. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_default.jsx +5 -1
  267. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_image.jsx +5 -1
  268. data/app/pb_kits/playbook/pb_selectable_card/docs/_selectable_card_single_select.jsx +4 -1
  269. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_checkmark.jsx +4 -1
  270. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_default.jsx +4 -1
  271. data/app/pb_kits/playbook/pb_selectable_card_icon/docs/_selectable_card_icon_single_select.jsx +4 -1
  272. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_default.jsx +4 -1
  273. data/app/pb_kits/playbook/pb_selectable_icon/docs/_selectable_icon_single_select.jsx +4 -1
  274. data/app/pb_kits/playbook/pb_selectable_list/docs/_selectable_list_checkbox.jsx +4 -1
  275. data/app/pb_kits/playbook/pb_selectable_list/docs/_selectable_list_radio.jsx +4 -1
  276. data/app/pb_kits/playbook/pb_source/docs/_source_default.jsx +4 -1
  277. data/app/pb_kits/playbook/pb_source/docs/_source_noicon.jsx +4 -1
  278. data/app/pb_kits/playbook/pb_source/docs/_source_types.jsx +9 -1
  279. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_default.jsx +4 -1
  280. data/app/pb_kits/playbook/pb_star_rating/docs/_star_rating_hide.jsx +2 -1
  281. data/app/pb_kits/playbook/pb_stat_change/_stat_change.html.erb +1 -1
  282. data/app/pb_kits/playbook/pb_stat_change/_stat_change.jsx +8 -4
  283. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_default.html.erb +1 -1
  284. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_default.jsx +4 -1
  285. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit.html.erb +17 -0
  286. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit.jsx +31 -0
  287. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit_two.html.erb +20 -0
  288. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit_two.jsx +34 -0
  289. data/app/pb_kits/playbook/pb_stat_change/docs/_stat_change_unit_two.md +1 -0
  290. data/app/pb_kits/playbook/pb_stat_change/docs/example.yml +6 -4
  291. data/app/pb_kits/playbook/pb_stat_change/docs/index.js +2 -0
  292. data/app/pb_kits/playbook/pb_stat_change/stat_change.rb +12 -7
  293. data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_default.jsx +9 -3
  294. data/app/pb_kits/playbook/pb_stat_value/docs/_stat_value_unit.jsx +2 -1
  295. data/app/pb_kits/playbook/pb_table/_table.scss +1 -57
  296. data/app/pb_kits/playbook/pb_table/docs/_table_action_middle.jsx +8 -2
  297. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +4 -2
  298. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +4 -2
  299. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +4 -2
  300. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +1 -1
  301. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +5 -3
  302. data/app/pb_kits/playbook/pb_table/docs/_table_container.jsx +2 -1
  303. data/app/pb_kits/playbook/pb_table/docs/_table_data_table.jsx +5 -2
  304. data/app/pb_kits/playbook/pb_table/docs/_table_disable_hover.jsx +2 -1
  305. data/app/pb_kits/playbook/pb_table/docs/_table_icon_buttons.jsx +11 -2
  306. data/app/pb_kits/playbook/pb_table/docs/_table_lg.jsx +4 -1
  307. data/app/pb_kits/playbook/pb_table/docs/_table_md.jsx +5 -2
  308. data/app/pb_kits/playbook/pb_table/docs/_table_multiline.jsx +4 -1
  309. data/app/pb_kits/playbook/pb_table/docs/_table_one_action.jsx +8 -2
  310. data/app/pb_kits/playbook/pb_table/docs/_table_responsive_table.jsx +10 -3
  311. data/app/pb_kits/playbook/pb_table/docs/_table_side_highlight.jsx +61 -16
  312. data/app/pb_kits/playbook/pb_table/docs/_table_single_line.jsx +2 -1
  313. data/app/pb_kits/playbook/pb_table/docs/_table_sm.jsx +5 -2
  314. data/app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx +11 -2
  315. data/app/pb_kits/playbook/pb_table/docs/_table_two_plus_actions.jsx +8 -2
  316. data/app/pb_kits/playbook/pb_table/styles/_alignment.scss +32 -0
  317. data/app/pb_kits/playbook/pb_table/styles/_all.scss +4 -3
  318. data/app/pb_kits/playbook/pb_table/styles/_side_highlight.scss +24 -0
  319. data/app/pb_kits/playbook/pb_text_input/_text_input.jsx +8 -4
  320. data/app/pb_kits/playbook/pb_text_input/docs/_description.md +2 -1
  321. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_custom.jsx +10 -2
  322. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_default.jsx +84 -56
  323. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_disabled.jsx +2 -1
  324. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_error.jsx +20 -11
  325. data/app/pb_kits/playbook/pb_text_input/text_input.test.js +77 -0
  326. data/app/pb_kits/playbook/pb_textarea/_textarea.html.erb +16 -1
  327. data/app/pb_kits/playbook/pb_textarea/_textarea.jsx +49 -9
  328. data/app/pb_kits/playbook/pb_textarea/_textarea.scss +4 -0
  329. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_character_counter.html.erb +68 -0
  330. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_character_counter.jsx +83 -0
  331. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_custom.jsx +2 -1
  332. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_default.jsx +4 -1
  333. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_error.jsx +2 -1
  334. data/app/pb_kits/playbook/pb_textarea/docs/_textarea_resize.jsx +4 -1
  335. data/app/pb_kits/playbook/pb_textarea/docs/example.yml +2 -3
  336. data/app/pb_kits/playbook/pb_textarea/docs/index.js +1 -0
  337. data/app/pb_kits/playbook/pb_textarea/textarea.rb +7 -0
  338. data/app/pb_kits/playbook/pb_time_range_inline/docs/_time_range_inline_default.jsx +9 -1
  339. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_default.jsx +13 -1
  340. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_vertical.jsx +14 -2
  341. data/app/pb_kits/playbook/pb_timeline/docs/_timeline_with_date.jsx +17 -3
  342. data/app/pb_kits/playbook/pb_timestamp/docs/_timestamp_default.jsx +5 -2
  343. data/app/pb_kits/playbook/pb_title/docs/_title_light.jsx +9 -2
  344. data/app/pb_kits/playbook/pb_title/docs/_title_variants.jsx +2 -1
  345. data/app/pb_kits/playbook/pb_title_count/docs/_title_count_align.jsx +4 -1
  346. data/app/pb_kits/playbook/pb_title_count/docs/_title_count_default.jsx +4 -1
  347. data/app/pb_kits/playbook/pb_title_detail/docs/_title_detail_default.jsx +4 -1
  348. data/app/pb_kits/playbook/pb_tooltip/_tooltip.scss +10 -7
  349. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_default.html.erb +4 -4
  350. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_selectors.html.erb +17 -0
  351. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_selectors.md +3 -0
  352. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_white.html.erb +1 -1
  353. data/app/pb_kits/playbook/pb_tooltip/docs/_tooltip_with_icon_circle.html.erb +10 -0
  354. data/app/pb_kits/playbook/pb_tooltip/docs/example.yml +2 -0
  355. data/app/pb_kits/playbook/pb_tooltip/index.js +87 -37
  356. data/app/pb_kits/playbook/pb_tooltip/tooltip.rb +3 -1
  357. data/app/pb_kits/playbook/pb_typeahead/_typeahead.jsx +5 -1
  358. data/app/pb_kits/playbook/pb_typeahead/_typeahead.scss +9 -0
  359. data/app/pb_kits/playbook/pb_typeahead/components/Option.jsx +2 -3
  360. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx +2 -1
  361. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.jsx +2 -1
  362. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.html.erb +19 -3
  363. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.jsx +8 -3
  364. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async.md +10 -2
  365. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills_async_users.jsx +4 -1
  366. data/app/pb_kits/playbook/pb_typeahead/typeahead.rb +5 -0
  367. data/app/pb_kits/playbook/pb_user/docs/_user_default.jsx +5 -1
  368. data/app/pb_kits/playbook/pb_user/docs/_user_size.jsx +4 -1
  369. data/app/pb_kits/playbook/pb_user/docs/_user_text_only.jsx +3 -1
  370. data/app/pb_kits/playbook/pb_user/docs/_user_vertical_size.jsx +4 -1
  371. data/app/pb_kits/playbook/pb_user/docs/_user_with_territory.jsx +5 -1
  372. data/app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_compact.jsx +4 -1
  373. data/app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_default.jsx +13 -4
  374. data/app/pb_kits/playbook/pb_weekday_stacked/docs/_weekday_stacked_variant.jsx +4 -1
  375. data/app/pb_kits/playbook/react_rails_kits.js +1 -0
  376. data/lib/playbook.rb +6 -17
  377. data/lib/playbook/engine.rb +0 -1
  378. data/{app/pb_kits → lib}/playbook/props.rb +0 -0
  379. data/{app/pb_kits → lib}/playbook/props/array.rb +0 -0
  380. data/{app/pb_kits → lib}/playbook/props/base.rb +19 -3
  381. data/{app/pb_kits → lib}/playbook/props/boolean.rb +0 -0
  382. data/{app/pb_kits → lib}/playbook/props/date.rb +0 -0
  383. data/{app/pb_kits → lib}/playbook/props/enum.rb +0 -0
  384. data/{app/pb_kits → lib}/playbook/props/hash.rb +0 -0
  385. data/{app/pb_kits → lib}/playbook/props/hash_array.rb +0 -0
  386. data/{app/pb_kits → lib}/playbook/props/number.rb +0 -0
  387. data/{app/pb_kits → lib}/playbook/props/number_array.rb +0 -0
  388. data/{app/pb_kits → lib}/playbook/props/numeric.rb +0 -0
  389. data/{app/pb_kits → lib}/playbook/props/percentage.rb +0 -0
  390. data/{app/pb_kits → lib}/playbook/props/proc.rb +0 -0
  391. data/{app/pb_kits → lib}/playbook/props/string.rb +0 -0
  392. data/lib/playbook/version.rb +1 -1
  393. metadata +51 -22
  394. data/app/helpers/playbook/layout_helper.rb +0 -9
  395. data/app/pb_kits/playbook/pb_table/styles/_mixins.scss +0 -0
@@ -1,9 +1,11 @@
1
1
  import React from 'react'
2
2
  import { RichTextEditor } from '../../'
3
3
 
4
- const RichTextEditorDefault = () => (
4
+ const RichTextEditorDefault = (props) => (
5
5
  <div>
6
- <RichTextEditor />
6
+ <RichTextEditor
7
+ {...props}
8
+ />
7
9
  </div>
8
10
  )
9
11
 
@@ -1,11 +1,17 @@
1
1
  import React from 'react'
2
2
  import { RichTextEditor } from '../../'
3
3
 
4
- const RichTextEditorFocus = () => (
4
+ const RichTextEditorFocus = (props) => (
5
5
  <>
6
- <RichTextEditor focus />
6
+ <RichTextEditor
7
+ focus
8
+ {...props}
9
+ />
7
10
  <br />
8
- <RichTextEditor focus />
11
+ <RichTextEditor
12
+ focus
13
+ {...props}
14
+ />
9
15
  </>
10
16
  )
11
17
  export default RichTextEditorFocus
@@ -0,0 +1,25 @@
1
+
2
+ <%= pb_rails("rich_text_editor", props: { id: "content-preview-editor" }) %>
3
+ <div id="card-obfuscation" style="display:none">
4
+ <%= pb_rails("card", props: { margin_top: "md" }) do %>
5
+ <div id="content-preview" class="trix-content">
6
+ </div>
7
+ <% end %>
8
+ </div>
9
+ <%= pb_rails("button", props: { id: "preview-button", variant: "secondary", margin_top: "md" }) do %>
10
+ <span>Preview Output</span>
11
+ <% end %>
12
+
13
+ <script>
14
+ // Button event handler
15
+ const button = document.getElementById('preview-button');
16
+ button.addEventListener('click', function() {
17
+ const content = document.getElementById('content-preview-editor');
18
+ const previewArea = document.getElementById('content-preview');
19
+ const cardDiv = document.getElementById('card-obfuscation');
20
+
21
+ previewArea.innerHTML = content.value;
22
+ cardDiv.classList.add('mt_md');
23
+ cardDiv.style.display = 'block';
24
+ });
25
+ </script>
@@ -0,0 +1,45 @@
1
+ import React, { useState } from 'react'
2
+ import {
3
+ Button,
4
+ Card,
5
+ RichTextEditor,
6
+ } from '../../'
7
+
8
+ const RichTextEditorPreview = () => {
9
+ const [showPreview, setShowPreview] = useState(false)
10
+ const [previewText, setPreviewText] = useState(<div />)
11
+
12
+ const handleChange = (event) => setPreviewText(event)
13
+ const handleClick = () => {
14
+ setShowPreview(true)
15
+ }
16
+
17
+ return (
18
+ <div>
19
+ <RichTextEditor
20
+ id="content-preview-editor"
21
+ onChange={handleChange}
22
+ />
23
+ <If condition={showPreview}>
24
+ <Card marginTop="md">
25
+ <div
26
+ className="trix-content"
27
+ // eslint-disable-next-line react/no-danger
28
+ dangerouslySetInnerHTML={{ __html: previewText }}
29
+ id="preview-content"
30
+ />
31
+ </Card>
32
+ <Else />
33
+ <div />
34
+ </If>
35
+ <Button
36
+ id="preview-button"
37
+ marginTop="md"
38
+ onClick={handleClick}
39
+ text="Preview Output"
40
+ variant="secondary"
41
+ />
42
+ </div>
43
+ )
44
+ }
45
+ export default RichTextEditorPreview
@@ -1,9 +1,12 @@
1
1
  import React from 'react'
2
2
  import { RichTextEditor } from '../../'
3
3
 
4
- const RichTextEditorSimple = () => (
4
+ const RichTextEditorSimple = (props) => (
5
5
  <div>
6
- <RichTextEditor simple />
6
+ <RichTextEditor
7
+ simple
8
+ {...props}
9
+ />
7
10
  </div>
8
11
  )
9
12
 
@@ -1,12 +1,13 @@
1
1
  import React from 'react'
2
2
  import { RichTextEditor } from '../../'
3
3
 
4
- const RichTextEditorSticky = () => (
4
+ const RichTextEditorSticky = (props) => (
5
5
  <div>
6
6
  <RichTextEditor
7
7
  id="sticky"
8
8
  sticky
9
9
  value="In this example, when you scroll down, the rich text editor's toolbar will scroll along with the page and it will no longer be visible at the top of the page. Dummy text to enable scroll.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ornare lorem ut pellentesque tempor. Vivamus ut ex vestibulum velit rich text editor eleifend fringilla. Sed non metus dictum, elementum mauris wysiwyg html editor non, sagittis odio. Nullam pellentesque leo sit amet ante suscipit wysiwyg html editor sagittis. Donec tempus vulputate suscipit. Ut non felis rich text editor ac dolor pulvinar lacinia eu eget urna. Sed tincidunt sapien vulputate tellus fringilla sodales. Morbi accumsan dui wysiwyg html editor sed massa pellentesque, quis vestibulum lectus scelerisque. Nulla ultrices mi id felis luctus aliquet. Donec nec ligula wysiwyg html editor pretium sapien semper dictum eu id quam. Etiam ut sollicitudin nibh. Quisque eu ultrices dui. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus rich text editor mi eu consequat. Nullam tincidunt erat et placerat mattis. Nunc rich text editor congue, enim vitae dictum dignissim, libero nisl sagittis augue, non aliquet nibh tortor sit amet ex. Aliquam cursus maximus mi eu consequat. Nullam tincidunt erat et placerat mattis."
10
+ {...props}
10
11
  />
11
12
  </div>
12
13
  )
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
2
2
  import { RichTextEditor, Select } from '../../'
3
3
  import { changelog, release } from './templates.js'
4
4
 
5
- const RichTextEditorTemplates = () => {
5
+ const RichTextEditorTemplates = (props) => {
6
6
  const [editorContent, setEditorContent] = useState('')
7
7
 
8
8
  const handleChange = (event) => {
@@ -27,10 +27,12 @@ const RichTextEditorTemplates = () => {
27
27
  label="Template"
28
28
  onChange={handleChange}
29
29
  options={options}
30
+ {...props}
30
31
  />
31
32
  <RichTextEditor
32
33
  id="template"
33
34
  template={editorContent}
35
+ {...props}
34
36
  />
35
37
  </div>
36
38
  )
@@ -1,11 +1,12 @@
1
1
  examples:
2
-
2
+
3
3
  rails:
4
4
  - rich_text_editor_default: Default
5
5
  - rich_text_editor_simple: Simple
6
6
  - rich_text_editor_focus: Focus
7
7
  - rich_text_editor_sticky: Sticky
8
8
  - rich_text_editor_templates: Templates
9
+ - rich_text_editor_preview: Preview
9
10
 
10
11
  react:
11
12
  - rich_text_editor_default: Default
@@ -13,3 +14,4 @@ examples:
13
14
  - rich_text_editor_focus: Focus
14
15
  - rich_text_editor_sticky: Sticky
15
16
  - rich_text_editor_templates: Templates
17
+ - rich_text_editor_preview: Preview
@@ -3,3 +3,4 @@ export { default as RichTextEditorSimple } from './_rich_text_editor_simple.jsx'
3
3
  export { default as RichTextEditorFocus } from './_rich_text_editor_focus.jsx'
4
4
  export { default as RichTextEditorSticky } from './_rich_text_editor_sticky.jsx'
5
5
  export { default as RichTextEditorTemplates } from './_rich_text_editor_templates.jsx'
6
+ export { default as RichTextEditorPreview } from './_rich_text_editor_preview.jsx'
@@ -1,6 +1,6 @@
1
1
  /* @flow */
2
2
 
3
- import React from 'react'
3
+ import React, { forwardRef } from 'react'
4
4
  import classnames from 'classnames'
5
5
  import {
6
6
  Body,
@@ -69,7 +69,7 @@ const Select = ({
69
69
  required = false,
70
70
  value,
71
71
  ...props
72
- }: SelectProps) => {
72
+ }: SelectProps, ref: React.ElementRef<"select">) => {
73
73
  const ariaProps = buildAriaProps(aria)
74
74
  const dataProps = buildDataProps(data)
75
75
  const optionsList = createOptions(options)
@@ -107,6 +107,7 @@ const Select = ({
107
107
  multiple={multiple}
108
108
  name={name}
109
109
  onChange={onChange}
110
+ ref={ref}
110
111
  required={required}
111
112
  value={value}
112
113
  >
@@ -132,4 +133,4 @@ const Select = ({
132
133
  )
133
134
  }
134
135
 
135
- export default Select
136
+ export default forwardRef(Select)
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectBlank = () => {
4
+ const SelectBlank = (props) => {
5
5
  const options = [
6
6
  { value: 'USA' },
7
7
  { value: 'Canada' },
@@ -16,6 +16,7 @@ const SelectBlank = () => {
16
16
  label="Where do you live"
17
17
  name="location"
18
18
  options={options}
19
+ {...props}
19
20
  />
20
21
  </div>
21
22
  )
@@ -1,13 +1,14 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectCustomSelect = () => {
4
+ const SelectCustomSelect = (props) => {
5
5
  return (
6
6
  <div>
7
7
  <Select label="Favorite Holiday">
8
8
  <select
9
9
  id="holiday"
10
10
  name="holiday"
11
+ {...props}
11
12
  >
12
13
  <option value="1">{'Christmas'}</option>
13
14
  <option value="2">{'Thanksgiving'}</option>
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectDefault = () => {
4
+ const SelectDefault = (props) => {
5
5
  const options = [
6
6
  {
7
7
  value: '1',
@@ -23,6 +23,7 @@ const SelectDefault = () => {
23
23
  label="Favorite Food"
24
24
  name="food"
25
25
  options={options}
26
+ {...props}
26
27
  />
27
28
  </div>
28
29
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectDisabled = () => {
4
+ const SelectDisabled = (props) => {
5
5
  const options = [
6
6
  { value: 'Apple Pie' },
7
7
  { value: 'Cookies' },
@@ -16,6 +16,7 @@ const SelectDisabled = () => {
16
16
  label="Favorite Dessert"
17
17
  name="dessert"
18
18
  options={options}
19
+ {...props}
19
20
  />
20
21
  </div>
21
22
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectDisabledOptions = () => {
4
+ const SelectDisabledOptions = (props) => {
5
5
  const options = [
6
6
  {
7
7
  value: '1',
@@ -38,6 +38,7 @@ const SelectDisabledOptions = () => {
38
38
  name="coffee"
39
39
  options={options}
40
40
  value="2"
41
+ {...props}
41
42
  />
42
43
  </div>
43
44
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Body, Select } from '../..'
3
3
 
4
- const SelectError = () => {
4
+ const SelectError = (props) => {
5
5
  const options = [
6
6
  {
7
7
  value: '1',
@@ -25,10 +25,12 @@ const SelectError = () => {
25
25
  name="food"
26
26
  options={options}
27
27
  value="2"
28
+ {...props}
28
29
  />
29
30
  <Body
30
31
  error="Please make a valid selection"
31
32
  status="negative"
33
+ {...props}
32
34
  />
33
35
  </div>
34
36
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectRequired = () => {
4
+ const SelectRequired = (props) => {
5
5
  const options = [
6
6
  { value: 'Left' },
7
7
  { value: 'Right' },
@@ -16,6 +16,7 @@ const SelectRequired = () => {
16
16
  name="shoe"
17
17
  options={options}
18
18
  required
19
+ {...props}
19
20
  />
20
21
  </div>
21
22
  )
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Select } from '../../'
3
3
 
4
- const SelectValueTextSame = () => {
4
+ const SelectValueTextSame = (props) => {
5
5
  const options = [
6
6
  { value: 'Football' },
7
7
  { value: 'Baseball' },
@@ -15,6 +15,7 @@ const SelectValueTextSame = () => {
15
15
  label="Favorite Sport"
16
16
  name="sports"
17
17
  options={options}
18
+ {...props}
18
19
  />
19
20
  </div>
20
21
  )
@@ -0,0 +1,51 @@
1
+ import React from 'react'
2
+ import { render, screen } from '../utilities/test-utils'
3
+
4
+ import Select from './_select'
5
+
6
+ const testId = 'select1',
7
+ kitClass = 'pb_select'
8
+
9
+ const options = [
10
+ {
11
+ value: '1',
12
+ text: 'Burgers',
13
+ },
14
+ {
15
+ value: '2',
16
+ text: 'Pizza',
17
+ },
18
+ {
19
+ value: '3',
20
+ text: 'Tacos',
21
+ },
22
+ ]
23
+
24
+ test('returns namespaced class name', () => {
25
+ render(
26
+ <Select
27
+ data={{ testid: testId }}
28
+ label="Favorite Food"
29
+ name="food"
30
+ options={options}
31
+ />
32
+ )
33
+
34
+ const kit = screen.getByTestId(testId)
35
+ expect(kit).toHaveClass(kitClass)
36
+ })
37
+
38
+ test('returns dark class name', () => {
39
+ render(
40
+ <Select
41
+ dark
42
+ data={{ testid: testId }}
43
+ label="Favorite Food"
44
+ name="food"
45
+ options={options}
46
+ />
47
+ )
48
+
49
+ const kit = screen.getByTestId(testId)
50
+ expect(kit).toHaveClass(`${kitClass} dark`)
51
+ })
@@ -12,6 +12,7 @@ $pb_selectable_card_border: 2px;
12
12
 
13
13
  [class^=pb_selectable_card_kit] {
14
14
  display: block;
15
+ margin-bottom: 0;
15
16
 
16
17
  label {
17
18
  @include pb_card;
@@ -87,4 +88,4 @@ $pb_selectable_card_border: 2px;
87
88
  }
88
89
  }
89
90
  }
90
- }
91
+ }
@@ -17,7 +17,7 @@ class SelectableCardBlock extends React.Component {
17
17
  })
18
18
  }
19
19
 
20
- render() {
20
+ render(props) {
21
21
  return (
22
22
  <div className="pb--doc-demo-row">
23
23
 
@@ -27,10 +27,12 @@ class SelectableCardBlock extends React.Component {
27
27
  name="block"
28
28
  onChange={this.handleSelect}
29
29
  value="block"
30
+ {...props}
30
31
  >
31
32
  <Title
32
33
  size={4}
33
34
  text="Block"
35
+ {...props}
34
36
  />
35
37
  <Body tag="span">{'This uses block'}</Body>
36
38
  </SelectableCard>
@@ -42,6 +44,7 @@ class SelectableCardBlock extends React.Component {
42
44
  onChange={this.handleSelect}
43
45
  text="This passes text through the tag"
44
46
  value="tag"
47
+ {...props}
45
48
  />
46
49
 
47
50
  </div>